* Instead of relying on an unversioned url off of sixtyfps.io,
pin the version from upstream's CDN.
* Include cmake highlighting as well since that's not in HLJS' default,
we use it for the tutorial though and it was in the one hosted on
sixtyfps.io
* Include the language definition for .60 inline, so that we can make changes
and adapt to upstream API changes if we select a new version.
Using Olivier's idea to check the meta tag, we can distinguish rustdoc
from "the rest". The html is included in mdbook by directly by
symlinking head.hbs.
And do some passes before inlining
We will need the list of components before inlining in order to generate
them if we disable inlining
So we can do some passes on each component before they are inlining
I tried to put the flickable pass in that list, but it did not work
if the Flickable itself is the root of a component
The preview is now in sixtyfps-docs-preview.html and the highlighting in
sixtyfps-docs-highlight.html. This faciliates reusing the preview from
C++ while using a different HTML file later for syntax highlighting.
Relates to #282
Needed for #281
Load our highlight.js snippet that we also use for the mdbook tutorial.
Once change we need to apply on top is that the rustdoc CSS theme does
not currently provide hljs classes that change with the currently
selected theme, so instead we're mapping the classes to the CSS classes
that are used for Rust syntax highlighting. Those change with the
current theme.
Relates to #282
As we try to copy the different location target properties from the
corrosion target into the package config file, we need to take all the
usual build types into account, not only Debug/Release.
Especially RelWithDebInfo is popular among packagers.
In this case this feels at controversial, but in general I find this
clippy lint pretty helpful: It has caught several copy-paste errors
before.
No behavior change is intended with this patch.
Currently, it is a bit limited in the amount of property that it removes
because it will not remove property that are used by properties being
removed, or will consider setting properties as an usage