API Reference¶
The public API of zensical_updates, generated from the source
docstrings. Only names exported in __all__ are shown.
zensical_updates ¶
Generate a dated Updates (blog) section for zensical sites as plain Markdown.
The public API is re-exported here and listed in __all__ — listing names in
__all__ is what marks them as the supported, explicitly re-exported surface for
type checkers (mypy strict / basedpyright) and the autodoc tooling.
BuildResult
dataclass
¶
What a build produced: the output dir, files written, and page URLs.
page_urls is the site-absolute URL of every generated content page (the
index, each post, and the archive and taxonomy pages), recorded as it is
written so the sitemap lists exactly those. The feed and sitemap files land in
written but not here. post_urls is the post subset.
Source code in src/zensical_updates/build.py
Config
dataclass
¶
Resolved generator settings.
Source code in src/zensical_updates/config.py
url_base
property
¶
The URL base for emitted links: the site sub-path joined to base.
A project Pages site is served under site_url's path (e.g.
/eth-protocol-fellowship/); a link that omits it 404s. A root-served
site has no path, so the base is just base with no extra slash. The
on-disk output dir is built from base alone, so it is unaffected.
FeedError ¶
Bases: RuntimeError
The feed could not be generated (e.g. the zensical render API moved).
Post
dataclass
¶
One update post, parsed from a source Markdown file.
Source code in src/zensical_updates/model.py
PostError ¶
Bases: ValueError
A post file is missing required front matter or carries an invalid value.
build_site ¶
Generate the full section into docs/<base>/ and report what was written.
Source code in src/zensical_updates/build.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
clean_site ¶
load_config ¶
Read the config table from zensical.toml, defaulting any absent key.
Source code in src/zensical_updates/config.py
build_feed ¶
Assemble the RSS 2.0 feed XML from posts, newest first.
render turns a post into absolutized HTML; it is injected so tests can
stub it without driving zensical. posts is already capped and ordered by
the caller.
Source code in src/zensical_updates/feed.py
discover_posts ¶
Find and parse every post in source, newest first.
The intro file (index_name) is the section landing copy, not a post, so
it is skipped. Ordering is date descending, ties broken by slug ascending,
so the output is deterministic.
Source code in src/zensical_updates/model.py
load_post ¶
Parse a single post file into a :class:Post.
Source code in src/zensical_updates/model.py
build_sitemap ¶
Render the sitemap XML for the pages the build recorded in page_urls.
The locations are absolute, so it needs config.site_url; the build calls it
only when that is set.