Commit graph

18 commits

Author SHA1 Message Date
4762618956 make page templates granularly overridable 2024-11-13 15:24:41 +01:00
7b2ded053b move things to more appropriate places 2024-11-13 15:24:41 +01:00
166a48f8cd unify template parameters 2024-11-13 15:24:41 +01:00
8704b45b23 fix indentation in output 2024-11-13 15:24:41 +01:00
179482d043 ensure the section hierarchy is spec-compliant
- automatically assign heading levels
- check that the maximum nesting depth is not exceeded
2024-11-13 15:24:41 +01:00
4160b6e976 separate DOM mapping and generic templating
the templates collection will soon only be there for reusable snippets,
while the HTML representation of document types will be attached to
those types directly.
2024-11-13 15:24:41 +01:00
2eeb7e5bcc implement sectioning semantics
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.
2024-11-13 15:24:41 +01:00
73c3262d74 render content via structured DOM representation 2024-11-13 15:24:41 +01:00
92b2f0ba58 don't use outPath any more
- links are constructed explicitly, relative to the current page's
location
- templates are called explicitly by output type
2024-11-13 15:24:41 +01:00
c5966cd4cb let navigation have its own template 2024-11-13 15:24:41 +01:00
ad1e193067 set a default location for documents
it turns out that setting a value appends to that.
the default only needs to be overridden when the symbolic name of the
document changes. while there's a chance people will inadvertently break
links that way, it's requires less up-front knowledge to work with.
2024-11-13 15:24:41 +01:00
c2fe5da469 allow prefixing output paths of collection items 2024-11-13 15:24:41 +01:00
48bb34ccfe stricter type for articles 2024-11-13 15:24:41 +01:00
c8caf09ebf separate templating from file system outputs 2024-11-13 15:24:41 +01:00
7eb147a5a0 add note 2024-11-13 15:24:41 +01:00
ebec1d8e25 implement navigation 2024-11-13 15:24:41 +01:00
6a22b197ac split out template library 2024-11-13 15:24:41 +01:00
0708801f6a extract presentation module 2024-11-13 15:24:41 +01:00