Commit graph

11 commits

Author SHA1 Message Date
Valentin Gagarin 2595511a38 implement a slice of the DOM spec as modules
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.
2024-11-13 15:47:12 +01:00
Valentin Gagarin c7a13f04c9 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:47:12 +01:00
Valentin Gagarin e2691f8469 let navigation have its own template 2024-11-13 15:47:12 +01:00
Valentin Gagarin 059ebc2291 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:47:12 +01:00
Valentin Gagarin 7efd5b8317 allow prefixing output paths of collection items 2024-11-13 15:47:12 +01:00
Valentin Gagarin e38960661c stricter type for articles 2024-11-13 15:47:12 +01:00
Valentin Gagarin 829a796f16 separate templating from file system outputs 2024-11-13 15:47:12 +01:00
Valentin Gagarin 822ff6c1b4 add note 2024-11-13 15:47:12 +01:00
Valentin Gagarin ad8b758cee implement navigation 2024-11-13 15:47:12 +01:00
Valentin Gagarin 3a36a6cf29 split out template library 2024-11-13 15:47:12 +01:00
Valentin Gagarin 130222db57 extract presentation module 2024-11-13 15:47:12 +01:00