Fork me on GitHub
#cljdoc
<
2023-12-05
>
Eugen13:12:43

@lee: regarding migrating metrics-clojure to cljdoc . I did explore cljdoc a bit, but I am not convinced. It has some nice features - esp related to clojure code but I also feel it's missing some things and some things seem way more complicated. It might be that I am not familiar with cljdoc Some of the features that I like about Sphinx (what metrics-clojure is currently using are): • Simple cli tool build process - don't need a running server and all the steps I saw here: https://github.com/cljdoc/cljdoc/blob/master/doc/running-cljdoc-locally-author.adoc • Docs are published from the local files as local files that I can inspect easily • I can get single page html (easy for searching), multi page html - easy for mobile, pdf / epub Will continue to investigate, but my first impression is that to do a local build and inspect the result is more complicated with cljdoc.

sphinx-build -M html docs/source/ docs/build/

martinklepsch15:12:38

Hey Eugen 🙂 I'll chime in here since I just read this. I think you're very much right that the local doc generation experience is probably not as straightforward as with something that just generates some files via a CLI. That said I think there's a few reasons why you might still want to consider publishing to cljdoc: • You get free versioning of your docs and it is auto-published as you publish new releases to Clojars. • Docs are presented in a consistent format that end-users are familiar with (which also has search) While local preview could be easier there's also not that much to it, as in there's a cljdoc.edn file pointing to Markdown/Asciidoc files and then there's docstrings which are interpreted as Markdown also. 🙂 And in the end you won't have to deal with publishing the documentation files, maintaining infrastructure around that etc.

❤️ 1
1
Eugen16:12:45

to me it's important to have the local flow and not depend on an external service

lread16:12:54

The choice is yours @U011NGC5FFY, everything has its pros and cons. One thing to keep in mind is that cljdoc will attempt to build your docs regardless. If you change your mind, my offer to help with cljdoc still stands.

seancorfield16:12:00

@U011NGC5FFY Users will look on cljdoc anyway. Here's what they currently see for metrics-clojure: https://cljdoc.org/d/metrics-clojure/metrics-clojure/2.10.0/doc/readme Fine for the API but doesn't include any articles.

seancorfield16:12:17

In order to have HTML docs available for metrics-clojure, you would need to generate them to the gh-pages branch (as a complete repo) so they show up as http://clj-commons.org/metrics-clojure/ and that is definitely not a simple, single CLI command.

Eugen16:12:49

I see this as 2 separate things: • building docs • publishing docs - which is gh-pages here

Eugen16:12:10

above I was refering to building docs - specifically - on my local system

Eugen16:12:34

let's say I have a strong opinion on local first

seancorfield16:12:07

Users don't care about building docs. They care about reading them online. Don't optimize for your convenience.

Eugen16:12:30

you have a good point, but as long as I am puting the effort it should be ok for me. Maybe I am a bit selfish in this regard but if I don't like the process, chancess are I won't do it.

lread17:12:38

But… if you are willing to accept my help you would not be alone 🙂

Eugen17:12:27

thanks @lee, I did not refuse it - but also did not accept it yet

Eugen17:12:51

I am not trying to be difficult, just making sure I am ok with what I am getting into

seancorfield17:12:53

And if you make it compatible with http://cljdoc.org once, every version will get its own docs automatically in future. With your approach, there are no versioned docs.

lread17:12:09

But you are volunteering your time so you should be comfortable with your choice.

seancorfield17:12:27

(we're in the same boat with marginalia -- but that's much more complex because it has to have its docs in a particular format and generating them as HTML is the only option right now... but it's manual, there's no versioning, and I'm definitely not happy with that)

Eugen17:12:05

I'll take some time and see if we can have our cake and eat it too

Eugen17:12:12

thanks for the help

❤️ 1