Commit Graph
24 Commits
Author SHA1 Message Date
omicron 5660ef2974 Add Symlink(Output) class 2026-08-14 23:55:48 +02:00
omicron 1a5f3bfc67 Stop rendering canonical links when origin is missing from config 2026-08-14 17:00:07 +02:00
omicron 58eebac637 Add Site reference to Output, clean up template url handling
The following changes have been made all with template cleanup in mind:
- Make Output.url relative to the origin root
- Keep weakref to Site in all Output objects.
- Add several helpers to get urls from Site: home_url(), tag_url(tag),
  section_url(section) and tags_url().
- Add helpers to Index to get pagination urls: pagination_url(n)
- Clean up templates by making use of these new facilities
2026-08-14 16:45:16 +02:00
omicron 20dd6d9910 Split uri into url and destination, remove trailing slashes from links 2026-08-13 22:59:13 +02:00
omicron 5ca9945856 Add support for extra static file assets in templates 2026-08-13 00:59:39 +02:00
omicron 2a03332bb0 Create Tags(Output) class and move tag rendering there from Site 2026-08-12 21:59:44 +02:00
omicron f1451a17b4 Create Index(Output) class and migrate index generation from Site
Like previous Content refactor, this allows validating file collisions
in the discover/write build pipeline.
2026-08-12 21:57:57 +02:00
omicron 61bc762256 Add Memory output, change Site to use Output files in the build loop 2026-08-12 12:15:57 +02:00
omicron bfa965f399 Refactor and split up Content code, introduce overarching Output class
In order to handle static files in the content generation pipeline while
still being able to easily validate that no output overwrites any other
output without adding special cases we introduce a level above Content
that contains all Output.

The idea is that all output files derive from Output so that they can be
checked against the by_uri map. All files will then follow the discover
-> write loop.
2026-08-12 11:23:45 +02:00
omicron 881e4f1598 Add breadcrumb navigation 2026-08-07 04:05:49 +02:00
omicron bda4ce5ef2 Add all tags page rendering 2026-08-07 03:41:22 +02:00
omicron 6a4bacc5e6 link tags to their tag index 2026-08-07 02:28:44 +02:00
omicron f21e746858 Add tag index rendering 2026-08-07 02:08:54 +02:00
omicron 4bdf1b4f4e Add canonical tags to the plain template 2026-08-06 23:14:42 +02:00
omicron eeff006347 Fix article tags to be a set instead of a list 2026-08-06 04:49:21 +02:00
omicron 7e447e52d6 Add beartype for runtime type checking during development 2026-08-06 04:48:57 +02:00
omicron bfa4f8c2fa Add rendering of indices for the entire site and each section 2026-08-06 00:25:07 +02:00
omicron 1c919954e1 Add black to dev dependencies and set some defaults 2026-08-05 16:04:42 +02:00
omicron 7688a6ab18 implement a summary property on Content
Allow the user to set a summary and make Article extract its own summary
when the Article.render is called and the summary is still missing.
Extracted summaries only work when the first item of a markdown file is
a paragraph.
2026-08-05 04:37:16 +02:00
omicron 7bf5fb5d92 refactor highlighting to use module level singletons
remove the repeated instantiation of TextLexer and HtmlFormatter in
favor of a singleton
2026-08-05 00:59:01 +02:00
omicron 406ef9fd8d Set up mypy defaults and make sure codebase passes --strict 2026-08-05 00:50:34 +02:00
omicron b8a0a94ba9 populate the by_tag, by_uri and by_section maps 2026-08-04 13:20:57 +02:00
omicron cb48dc035a Implement basic article rendering 2026-08-04 04:00:25 +02:00
omicron e7c41cd68e Initial commit
Initial structure with little functionality
2026-07-27 00:11:50 +02:00