this was quite a beast to tame, but it now allows putting sections anywhere
in the tree without having to redundantly specify heading levels, which
will be computed automatically from the nesting depth.
the whole thing will also blow up if the maximum section nesting depth
is exceeded, just as the spec requires - albeit with an absolutely
impenetrable error message. this could in principle be improved with
lots of additional machinery, but this is by far not low-hanging fruit.
just don't nest your sections too much.
this is roughly sufficient to recreate the website as it currently is
- elements:
- document
- html
- head
- title
- base
- link (variants that must be unique nested under `head` directly)
- canonical
- meta (same as for link):
- charset
- viewport
- author (can be multiple, but still unique in aggregate for a document)
- description
- global attributes:
- class
- hidden
- id
- lang
- style
- title
- element-specific attributes:
- href
- target
there's still a lot to do for a reasonably complete implementation, most
importantly everything concerning
- navigation
- top-level flow content (`div`, `article`, headings, `p`, ...)
- stylesheets
there's also some infrastructure to be arranged for easy but somewhat
safe switching between literal HTML and structured representations.