Hi,
JuDoc.jl is a simple static site generator (SSG) for Julia with a focus on simplicity, technical blogging and light, fast-loading pages.
It is inspired from an older simple SSG: Jemdoc (in python).
There’s a multitude of SSGs out there so why should you bother with this one? Here are a few reasons you may want to consider:
- it allows LaTex-like definition of commands which effectively allows you to extend markdown almost without limits; the definition of those commands can be made of markdown, HTML and/or other LaTeX-like commands.
- first class support for KaTeX (for maths) and highlight.js (for code) with the possibility to pre-render the corresponding javascript.
- support for hyperreferences both for equations (
\eqref{...}
) and references (\cite{...}
). - a simple templating system to adjust and interact with the layout.
- live rendering of modification (via LiveServer.jl) and fast page updating (a few milliseconds in a warm session).
Of course the package is still fairly young and rough around the edges (though I’ve been using it for a while) but I hope that with user feedback and suggestions it could become nice. See also how you could help.
Edit: as per comments, here is probably a point where you may want to know what it could look like, there are a few templates that are available and should be easily customisable (see here); I use a basic one for my website). Help to add more templates is more than welcome
Giving it a shot
The package was recently registered so you can just add JuDoc
and do
julia> using JuDoc
julia> newsite("test", template="pure-sm")
✓ Website folder generated at "test" (now the current directory).
→ Use serve() from JuDoc to see the website in your browser.
julia> serve()
→ Initial full pass...
→ Starting the server...
✓ LiveServer listening on http://localhost:8000/ ...
(use CTRL+C to shut down)
This will generate a folder test
in your current directory and its rendered content can be viewed at the given URL in your browser. Open test/src/index.md
in an editor and modify it at will while keeping an eye in your browser to get a feel for what the package can do.
Head to the docs for more information on the syntax etc.
What JuDoc is and isn’t
JuDoc hopes to sit somewhere between Documenter.jl and Weave.jl. Unlike Weave.jl however, JuDoc will not live-execute code which would slow down the page generation.(*) It does however support a simple system to insert code and code output while ensuring things don’t go stale (see the docs on insertions).
JuDoc is also not meant to be a contender to major “do-it-all” SSGs like Hugo or Jekyll, in particular if you want to have a blog mostly with images and text, then JuDoc is probably not going to be super useful to you (unless the “it’s in Julia” factor is sufficiently convincing). However if you want a website that’s easy to tune and where you can write technical notes using a blend of LaTeX and Markdown then JuDoc could fit the bill.
Finally it’s very much a static site generator; if you would like interactivity, there are already a number of great Julia packages out there for web apps such as Bukdu.jl or Genie.jl.
Comments and suggestions are very welcome!
PS: thanks to @asprionj for early feedback and convincing me to push this first release over the line.
PPS (*) actually now it does allow evaluation of code following requests though of course it’s not as mature as weave.