This introduces a very sophisticated algorithm to determine the ordering
of versions on the rendered docs' start page.
(Spoiler alert: It maps "master" and "current" to the largest possible
float values and converts a version like "1.2.3" to "1002003".)
Uses basically the same code as the lint docs page as I didn't want to
reinvent anything: A simple python script (inline in deploy script)
writes an array of versions to a JSON file, which gets turned into a
list of links using a bit of angular.js code.
Fixes#1917
The trick to writing horrible hacks such as this is to recognize angular
as a technology stack that may be endearing to some as one can do easy
stuff quickly. But fundamentally, it is built on top of crazy shit.
Like: Yes, I just wrote a directive that for some reason automatically
has access to the scope of the repeated item, and fires an event each
time the last `np-repeat` item was seen (delayed by one render loop
cycle, of course). And – obviously – when defining the directive it is
in camelCase but when using it in the template it has to by in
dash-case.
Great times.
- Section IDs, with handy anchor links
- Multiple filters for levels
- Table rendering, block quote size
- Nicer loading (hide un-rendered content)
- Code highlighting (only for Rust, of course!)
- Fix parsing of descriptions that have a newline after the section
title (lead to duplicating the title, e.g., "Examples", in the
content)