-
◊span[{:class "author"}]{jyn} -
◊tag['span {:class "author"}]{jyn} -
want to implement preprocessors before writing the docs site so i don't need double-escaping
-
test all subcommands exhaustively, assert that i have tested them all
-
don't bind locals for transformers, only for pages (allows
ns) -
turn render-page into a transformer
- calls
flower/render-fileby default - can use
flower.unsafe/processfor other langs- works as a "runner", can use the same transformer for many different transformers
- gives us fewer caching points but that's fine, don't do dumb things that make builds slow
- calls
-
https://github.com/noprompt/garden for CSS generation
-
reload vfs itself when flower changes using ninja
-
custom merge isn't that hard https://github.com/mystor/git-revise/blob/main/gitrevise/merge.py
-
write lots of tests
- test in CI that
scripts/clean-build.shworks - pprint
- repl works without warnings
- can build jyn.dev
- incremental builds do nothing if no file has changed
- incremental builds rebuild if necessary
- test in CI that
-
auto-escaping with
hiccup.util/escape-html- opt-out with
hiccup/raw - only support HTML and attribute contexts
- urls: java.net.URLEncoder
- css: port https://github.com/mathiasbynens/CSS.escape/blob/master/css.escape.js
- js: https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/StringEscapeUtils.html#escapeJavaScript(java.lang.String)
- opt-out with
-
hiccup syntax is ok for embedded clojure, but it would be nice to have a simpler standalone syntax based on css selectors
-
prelude module? maybe inject
(eval "expressions/prelude.clj")? -
allow configuring build dirs in
flower.edn -
file watcher should cancel existing ninja processes if a new input is changed
-
generated build.ninja can't handle file deletes
- probably i can avoid this by deleting all the outputs of
ninja -t query <deleted file>
- probably i can avoid this by deleting all the outputs of
-
watchtries to rebuild if an intermediate file was rebuilt.- get a list of all outputs of the modified file and ignore them if they happen within a ~second of a completed build? unsure
- debouncing will help probably
-
nice syntax over ninja phony targets so you have some equivalent of
--drafts- build/generate lets you pass
:task "drafts"for each:build, defaults to"default" - note that
ninja -t browsedefaults toall. hm.
- build/generate lets you pass
-
flower emojis
-
bundle asciidoc; suggest for highly nested md->clj->md->clj
-
render needs to not blindly assume that the preprocessing language is clojure
-
bundle jinja by default
-
dependencies between index pages and rendered pages
- if we want "leads", they need to depend on contents also
- actually wait depfiles solve this owo
- if we want titles, we need them to be frontmatter
- if we want "leads", they need to depend on contents also
-
have a 7 line outline for
defaults/build.clj -
define an order for transforms
- defined in build.clj, defaults to alphabetical
- uses normal file extensions to determine how to run the transformer
- default function runs embed first
- very very simple to modify order, just a static list
- warn if a transformer is missing from the list
-
preprocessors are different from templates and transforms because they have a fixed point algorithm with templates
-
preprocessors are clojure files with a unified interface (
def transform)- add
flower.unsafe/process, asks you what the deps are
- add
-
renderneeds a mapping between language and preprocessor- can generate a JSON file in .ninja or something
"magic should only be for things you almost certainly want"
build.clj can be much simpler now that there's a unified api"build.ninja is mostly for custom commands"
- bsky comments
- SVG with embedded text for code blocks