Commit graph

14 commits

Author SHA1 Message Date
Valentin Gagarin dba0ad4550 fix module for <link> and <base> 2024-11-06 03:54:11 +01:00
Valentin Gagarin 08fb421413 fix attrs printing 2024-11-06 03:16:58 +01:00
Valentin Gagarin 42e20c02d0 render content via structured DOM representation 2024-11-05 12:52:43 +01:00
Valentin Gagarin f4d40fdadf 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-05 12:45:56 +01:00
Valentin Gagarin c6f44d5f8e 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-10-16 18:23:55 +02:00
Valentin Gagarin c25cd72ee9 let navigation have its own template 2024-10-16 18:20:48 +02:00
Valentin Gagarin bdc7fb0c34 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-10-16 17:41:44 +02:00
Valentin Gagarin 7800a70df5 allow prefixing output paths of collection items 2024-10-16 17:28:38 +02:00
Valentin Gagarin c1dd3bdfab stricter type for articles 2024-10-15 19:40:36 +02:00
Valentin Gagarin 3ea6d362c2 separate templating from file system outputs 2024-10-15 18:52:36 +02:00
Valentin Gagarin e962f92db8 add note 2024-10-14 17:26:17 +02:00
Valentin Gagarin 2e2bf6307b implement navigation 2024-10-14 17:26:17 +02:00
Valentin Gagarin 656fd790a2 split out template library 2024-10-14 13:18:20 +02:00
Valentin Gagarin 6fc4ad6293 extract presentation module 2024-10-13 11:40:41 +02:00