💾 Archived View for log.pfad.fr › 2024 › vanitydoc-reloaded captured on 2024-05-26 at 14:31:29. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-02-05)
-=-=-=-=-=-=-
I created vanitydoc to be able to use my own domain for my go modules while being able to host the code on different forges.
Introductory post of vanitydoc (2022)
A couple of evolutions happened in the meantime.
If you now run the executable without any argument, it will start an HTTP server to display the documentation of the module of the current directory.
go run code.pfad.fr/vanitydoc@latest
This is very handy to make a quick review of the documentation as it will render. The documentation is generated at every page load (so no need to restart vanitydoc between edits, just reload the webpage).
I used vanitydoc to generate the documentation of all (~10) my Go modules. I initially wrote a Go program that started multiple instances of vanitydoc in parallel to achieve this. After a while, this became quite cumbersome to maintain, so I integrated this capability directly into vanitydoc. My Go program has now been replaced by a straightforward JSON file.
go run code.pfad.fr/vanitydoc@latest path/to/config.json
The configuration of the JSON file is a bit involved, and I finally took the time to document it in the README (thanks @1268 for opening issues on Codeberg, to help me fix this).
Configuration documentation of vanitydoc
Since 2022, I stumbled upon a couple of other tools, related to handling vanity URLs and documentation for Go modules:
GoHome is an SQLite-based Go server to manage module information.
https://petersanchez.com/easily-host-go-modules-on-your-domain/
https://code.netlandish.com/~petersanchez/gohome
Generate documentation from a Go module (however not suitable yet to host on the vanity URL since the `go-import` meta tags are not generated).
https://abhinav.github.io/doc2go/docs/
Do you know of any other tool in this field? Please let me know!
📅 2024-02-01