Comments (3)
Also worth mentioning: Clerk should is useable standalone using clj -X
:
I'm working on some smaller fixes and improvements for this in https://github.com/nextjournal/clerk/compare/standalone-fixes
$ clj -Sdeps '{:deps {io.github.nextjournal/clerk {:git/sha "e5484675ad21a4d79ff1cbc699324b742a25e986"}}}}' -X nextjournal.clerk/serve! :paths '["Hello.md"]' :browse true
Clerk also ships with metadata to be https://github.com/babashka/cli compatible:
clj -Sdeps '{:deps {org.babashka/cli {:mvn/version "0.7.53"} io.github.nextjournal/clerk {:git/sha "e5484675ad21a4d79ff1cbc699324b742a25e986"}}}}' -M -m babashka.cli.exec nextjournal.clerk/serve! --browse
Need to add the missing :paths
in the serve for it, though. Have a busy week so I can't promise I'll get to it very soon. PR welcome in the meantime.
from clerk.
Hi Attila,
I think you're running into an issue where the browser request triggered by {:browse? true}
causes Clerk to show the homepage (which happens on requests to /
). I do see the right thing when navigating to http://localhost:7777/src/clerk_viewer in the browser.
Note that we've recently added the ability to disable the welcome page in #561 by passing a :paths
option. I'd recommend trying that with the lastet main
e8f275b. Please let me know if that helps!
from clerk.
I've documented the missing options and exposed them to babashka.cli
in 333727a. I'm considering to add a dependency on babashka.cli
and expose a main function directly (please let me know if you'd find that helpful!). For now it works by declaring an extra dep like so:
$ clojure -Sdeps '{:deps {io.github.nextjournal/clerk {:git/sha "333727ad3aa6b5c7d8244bb0b7703b757e9904c4"} org.babashka/cli {:mvn/version "0.7.53"}}}' -M -m babashka.cli.exec nextjournal.clerk/serve! --help
Start the Clerk webserver with an optional a file watcher.
Options:
--host Host or ip for the webserver to listen on, defaults to "locahost".
--port Port number for the webserver to listen on, defaults to 7777.
--browse Opens the browser on boot when set.
--watch-paths Paths on which to watch for changes and show a changed document.
--show-filter-fn Symbol resolving to a fn to restrict when to show a notebook as a result of file system event.
--paths Restricts serving to the given paths, supports glob patterns. Will disable Clerk's homepage when set.
--paths-fn Symbol resolving to a 0-arity function returning computed paths.
--index Override the name of the index file (default "index.clj|md", will be added to paths.
from clerk.
Related Issues (20)
- Problems with tablecloth HOT 1
- Exceptions are not shown when watcher uses filter-fn HOT 1
- Source File is missing from git Links in Header of static App
- Viewer crashes trying to present exceptions with function values in their data
- static builds should include git links to source documents
- # anchors in links to static builds don't work in Firefox when first opening a page
- Consider adding a specific code example to `clerk/use-headers` or `clerk/table` docstring?
- An edge case where the analyzer crashes
- clerk/image should have an option to set the size HOT 2
- clerk/image should have have an option to encode images as jpeg
- clerk/image should have an option to include an `alt` tag
- The :no-cache option does not propagate through dependencies across files HOT 1
- Inline redefs crash during eval HOT 1
- Improve error message when predicate throws
- Browser UI disappears when exception is thrown HOT 5
- Clerk cannot render nested wrapped values HOT 2
- Clerk doesn't load in java 22 HOT 5
- Top-level multiline strings are not rendered HOT 1
- Scroll position lost after browser refresh / error popup
- honey.sql format crashes in clerk notebook HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clerk.