Fork me on GitHub
#membrane-term
<
2021-12-01
>
phronmophobic00:12:22

ok, just pushed com.phronemophobic/vt and pushed an update to membrane.term. I might as well go ahead and push membrane.term to clojars as well. I think we decided to hold off on version 1.0 for now, so maybe start with 0.9.0?

lread17:12:09

Heya @smith.adriane do you prefer GitHub markdown over AsciiDoc? I’ve developed a preference for adoc and am wondering if a convert to that format would work for you for membrane.term? If not that’s fine too. Why do I ask for membrane.term? Other than it being my personal preference, I like that: • it generates a table of contents • it includes user attributes (replacement variables), this can make things like updates for release easier • and it might make reusing some code I have for changelog updating-on-release easier

phronmophobic17:12:06

I do prefer github markdown over asciidoc, but that's only because I don't know AsciiDoc. I'm not opposed to checking out alternatives. Let me read up on asciidoc and see what it's like!

lread18:12:03

It’s really not important. But… if it satisfies a curiosity, by all means! I am guessing that you will like it.

phronmophobic18:12:25

how does the substitution work? do you have a source file and an output file? what's the format for the output file?

lread19:12:28

It happens at render time. https://raw.githubusercontent.com/lread/test-doc-blocks/main/doc/01-user-guide.adoc. At the top I have the doc title, some adoc attributes, and then user attributes :clojure-version: and :lib-version:

= User Guide
:toclevels: 5
:toc:
:clojure-version: 1.10.3
// NOTE: lib-version is automatically updated by release workflow
:lib-version: 1.0.166-alpha
Then later in the doc I can use those attributes, for example:
[source,clojure,subs="attributes+"]
----
  :gen-doc-tests {:replace-deps {org.clojure/clojure {:mvn/version "{clojure-version}"}
                                 com.github.lread/test-doc-blocks {:mvn/version "{lib-version}"}}
                  ;; for -X syntax support specify exec-fn
                  :exec-fn lread.test-doc-blocks/gen-tests
                  ;; for -M syntax support specify main-opts
                  :main-opts ["-m" "lread.test-doc-blocks" "gen-tests"]}
----

lread19:12:48

I have a release workflow that updates :lib-version: within this file (and commits that change) when I do a release.

phronmophobic19:12:04

ah. ok, and github supports rendering like this?

phronmophobic19:12:39

or is there another step [to view the substituted version on github]?

lread19:12:14

the only way to not view substituted is to view raw version

lread19:12:06

GitHub replaces attributes at render time.

👍 1
lread19:12:01

Cljdoc does this too.

lread19:12:44

The only thing I don’t really like about GitHub treatment of adoc is that it does not honor the richness of adoc. It converts all elements but does not beautifully style all elements. Nothing is broken. Just stuff looks a bit rough sometimes.

lread19:12:21

No worse that CommonMark styling really, but adoc has a much richer set of elements.

lread19:12:04

Got a fresh snowfall here. Gonna go for a walk and enjoy it! Later!

❄️ 1
👍 1
lread19:12:03

Before I trod off: cljdoc does a bit of a better job at adoc styling, but I feel it should do more and I will eventually get back to working on that. FWIW, https://cljdoc.org/d/lread/cljdoc-exerciser/1.0.57/doc/document-tests/asciidoctor-features.