Documenter.jl: Bootstrap for styling

Created on 18 Jan 2018  路  3Comments  路  Source: JuliaDocs/Documenter.jl

See also #615, it proves useful to have some basic Bootstrap styling when adding new features to the HTML part of Documenter.jl.

I've created a new repo (https://github.com/haampie/JuliaDocsAssets) with just some HTML and CSS, preliminary example here: https://haampie.github.io/JuliaDocsAssets/

There's some tooling involved, currently via node/npm packages (brunch and sass-brunch). Maybe it's therefore best to keep the assets in a separate repo? If someone wants to theme things, then it's possible to clone that repo, change the bootstrap variables, generate the CSS, and add the minified CSS to their own repo.

Features & todo:

  • [x] Linkable paragraphs (useful for sharing and in search; immediately jump to the right paragraph) with pure CSS highlight animation (e.g. https://haampie.github.io/JuliaDocsAssets/#p6)
  • [x] Modern CSS (flexbox for the layout & position: sticky for sidebars)
  • [x] SVG logo rather than PNG.
  • [x] Math via KaTeX
  • [x] Code highlighting
  • [ ] Mobile version
  • [ ] Search field
Enhancement Feature

Most helpful comment

Hey, I will get back at it soon!

All 3 comments

Thanks for doing this! A couple quick thoughts that came to mind:

  • :+1: to having the tools in a separate repository. We would just PR the relevant CSS/JS files into Documenter when there are updates to the style, right? And it will be great if the users can use that repo to build their own themes as well.

  • I feel that it might be best to replicate the existing style more or less exactly on the first iteration. This is not to say that the style couldn't / shouldn't be improved, but it might be a good idea to separate the more subjective/bikeshed-prone part into a follow-up PR.

  • KaTeX is indeed nicer than MathJax in many ways, but isn't it missing some features/commands?

Any updates on this @haampie. I really like the example so far. It would be cool to get this in as an experimental mode perhaps.

Hey, I will get back at it soon!

Was this page helpful?
0 / 5 - 0 ratings