zensical-updates 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zensical_updates-0.1.0/.gitignore +42 -0
- zensical_updates-0.1.0/CHANGELOG.md +30 -0
- zensical_updates-0.1.0/LICENSE.md +121 -0
- zensical_updates-0.1.0/PKG-INFO +118 -0
- zensical_updates-0.1.0/README.md +91 -0
- zensical_updates-0.1.0/SECURITY.md +61 -0
- zensical_updates-0.1.0/docs/api.md +6 -0
- zensical_updates-0.1.0/docs/changelog.md +1 -0
- zensical_updates-0.1.0/docs/cli.md +10 -0
- zensical_updates-0.1.0/docs/index.md +27 -0
- zensical_updates-0.1.0/docs/usage.md +72 -0
- zensical_updates-0.1.0/pyproject.toml +174 -0
- zensical_updates-0.1.0/src/zensical_updates/__init__.py +26 -0
- zensical_updates-0.1.0/src/zensical_updates/__main__.py +5 -0
- zensical_updates-0.1.0/src/zensical_updates/build.py +109 -0
- zensical_updates-0.1.0/src/zensical_updates/cli.py +73 -0
- zensical_updates-0.1.0/src/zensical_updates/config.py +50 -0
- zensical_updates-0.1.0/src/zensical_updates/frontmatter.py +37 -0
- zensical_updates-0.1.0/src/zensical_updates/model.py +138 -0
- zensical_updates-0.1.0/src/zensical_updates/py.typed +0 -0
- zensical_updates-0.1.0/src/zensical_updates/render.py +85 -0
- zensical_updates-0.1.0/src/zensical_updates/urls.py +38 -0
- zensical_updates-0.1.0/tests/__init__.py +0 -0
- zensical_updates-0.1.0/tests/conftest.py +3 -0
- zensical_updates-0.1.0/tests/test_api.py +18 -0
- zensical_updates-0.1.0/tests/test_build.py +72 -0
- zensical_updates-0.1.0/tests/test_cli.py +55 -0
- zensical_updates-0.1.0/tests/test_config.py +24 -0
- zensical_updates-0.1.0/tests/test_frontmatter.py +39 -0
- zensical_updates-0.1.0/tests/test_integration.py +76 -0
- zensical_updates-0.1.0/tests/test_model.py +158 -0
- zensical_updates-0.1.0/tests/test_render.py +97 -0
- zensical_updates-0.1.0/tests/test_urls.py +32 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.pyc
|
|
4
|
+
*.pyo
|
|
5
|
+
*.egg-info/
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
*.egg
|
|
9
|
+
|
|
10
|
+
# uv
|
|
11
|
+
.venv/
|
|
12
|
+
|
|
13
|
+
# Testing & coverage
|
|
14
|
+
.pytest_cache/
|
|
15
|
+
.coverage
|
|
16
|
+
.coverage.*
|
|
17
|
+
coverage.xml
|
|
18
|
+
test-results.xml
|
|
19
|
+
htmlcov/
|
|
20
|
+
pytest.log
|
|
21
|
+
*.sarif
|
|
22
|
+
|
|
23
|
+
# All CI / build reports go here
|
|
24
|
+
.reports/
|
|
25
|
+
|
|
26
|
+
# Docs site build output (zensical)
|
|
27
|
+
/site/
|
|
28
|
+
|
|
29
|
+
# Environment
|
|
30
|
+
.env
|
|
31
|
+
.env.local
|
|
32
|
+
|
|
33
|
+
# OS
|
|
34
|
+
.DS_Store
|
|
35
|
+
Thumbs.db
|
|
36
|
+
|
|
37
|
+
# Editors
|
|
38
|
+
*.swp
|
|
39
|
+
*.swo
|
|
40
|
+
*~
|
|
41
|
+
.idea/
|
|
42
|
+
.vscode/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.0] - 2026-06-17
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Initial project scaffold.
|
|
15
|
+
- Post discovery and the content model: YAML front-matter parsing (block-list
|
|
16
|
+
aware), post loading (slug from file stem, date coercion, taxonomies,
|
|
17
|
+
excerpt), newest-first discovery, and grouping by category, tag, and year.
|
|
18
|
+
- Markdown emitters for the index listing, archive landing and per-year pages,
|
|
19
|
+
and tag/category pages and their indexes. Output is zensical-safe: every link
|
|
20
|
+
is a site-absolute directory URL and there are no bare reference brackets.
|
|
21
|
+
- A `build`/`clean` CLI and a `zensical.toml` config loader (the
|
|
22
|
+
`[project.extra.zensical_updates]` table). `build` discovers source posts,
|
|
23
|
+
copies them into `docs/<base>/`, and writes the generated pages; `clean`
|
|
24
|
+
removes that output. An invalid post (e.g. missing date) fails the build.
|
|
25
|
+
- An end-to-end integration test: generate a fixture site, run
|
|
26
|
+
`zensical build --clean --strict`, and assert every generated post,
|
|
27
|
+
taxonomy, and archive link resolves to a rendered page. This guards the two
|
|
28
|
+
silent failures (wrong post URLs and front-matter link reads).
|
|
29
|
+
- Documentation: README and a usage guide covering how to write posts,
|
|
30
|
+
configure the generator, and run the build.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# CC0 1.0 Universal
|
|
2
|
+
|
|
3
|
+
Creative Commons Legal Code
|
|
4
|
+
|
|
5
|
+
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
|
6
|
+
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
|
7
|
+
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
|
8
|
+
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
|
9
|
+
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
|
10
|
+
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
|
11
|
+
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
|
12
|
+
HEREUNDER.
|
|
13
|
+
|
|
14
|
+
## Statement of Purpose
|
|
15
|
+
|
|
16
|
+
The laws of most jurisdictions throughout the world automatically confer
|
|
17
|
+
exclusive Copyright and Related Rights (defined below) upon the creator
|
|
18
|
+
and subsequent owner(s) (each and all, an "owner") of an original work of
|
|
19
|
+
authorship and/or a database (each, a "Work").
|
|
20
|
+
|
|
21
|
+
Certain owners wish to permanently relinquish those rights to a Work for
|
|
22
|
+
the purpose of contributing to a commons of creative, cultural and
|
|
23
|
+
scientific works ("Commons") that the public can reliably and without fear
|
|
24
|
+
of later claims of infringement build upon, modify, incorporate in other
|
|
25
|
+
works, reuse and redistribute as freely as possible in any form whatsoever
|
|
26
|
+
and for any purposes, including without limitation commercial purposes.
|
|
27
|
+
These owners may contribute to the Commons to promote the ideal of a free
|
|
28
|
+
culture and the further production of creative, cultural and scientific
|
|
29
|
+
works, or to gain reputation or greater distribution for their Work in
|
|
30
|
+
part through the use and efforts of others.
|
|
31
|
+
|
|
32
|
+
For these and/or other purposes and motivations, and without any
|
|
33
|
+
expectation of additional consideration or compensation, the person
|
|
34
|
+
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
|
35
|
+
is an owner of Copyright and Related Rights in the Work, voluntarily
|
|
36
|
+
elects to apply CC0 to the Work and publicly distribute the Work under its
|
|
37
|
+
terms, with knowledge of his or her Copyright and Related Rights in the
|
|
38
|
+
Work and the meaning and intended legal effect of CC0 on those rights.
|
|
39
|
+
|
|
40
|
+
1. Copyright and Related Rights. A Work made available under CC0 may be
|
|
41
|
+
protected by copyright and related or neighboring rights ("Copyright and
|
|
42
|
+
Related Rights"). Copyright and Related Rights include, but are not
|
|
43
|
+
limited to, the following:
|
|
44
|
+
|
|
45
|
+
i. the right to reproduce, adapt, distribute, perform, display,
|
|
46
|
+
communicate, and translate a Work;
|
|
47
|
+
ii. moral rights retained by the original author(s) and/or performer(s);
|
|
48
|
+
iii. publicity and privacy rights pertaining to a person's image or
|
|
49
|
+
likeness depicted in a Work;
|
|
50
|
+
iv. rights protecting against unfair competition in regards to a Work,
|
|
51
|
+
subject to the limitations in paragraph 4(a), below;
|
|
52
|
+
v. rights protecting the extraction, dissemination, use and reuse of data
|
|
53
|
+
in a Work;
|
|
54
|
+
vi. database rights (such as those arising under Directive 96/9/EC of the
|
|
55
|
+
European Parliament and of the Council of 11 March 1996 on the legal
|
|
56
|
+
protection of databases, and under any national implementation
|
|
57
|
+
thereof, including any amended or successor version of such
|
|
58
|
+
directive); and
|
|
59
|
+
vii. other similar, equivalent or corresponding rights throughout the
|
|
60
|
+
world based on applicable law or treaty, and any national
|
|
61
|
+
implementations thereof.
|
|
62
|
+
|
|
63
|
+
2. Waiver. To the greatest extent permitted by, but not in contravention
|
|
64
|
+
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
|
65
|
+
irrevocably and unconditionally waives, abandons, and surrenders all of
|
|
66
|
+
Affirmer's Copyright and Related Rights and associated claims and causes
|
|
67
|
+
of action, whether now known or unknown (including existing as well as
|
|
68
|
+
future claims and causes of action), in the Work (i) in all territories
|
|
69
|
+
worldwide, (ii) for the maximum duration provided by applicable law or
|
|
70
|
+
treaty (including future time extensions), (iii) in any current or future
|
|
71
|
+
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
|
72
|
+
including without limitation commercial, advertising or promotional
|
|
73
|
+
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
|
74
|
+
member of the public at large and to the detriment of Affirmer's heirs and
|
|
75
|
+
successors, fully intending that such Waiver shall not be subject to
|
|
76
|
+
revocation, rescission, cancellation, termination, or any other legal or
|
|
77
|
+
equitable action to disrupt the quiet enjoyment of the Work by the public
|
|
78
|
+
as contemplated by Affirmer's express Statement of Purpose.
|
|
79
|
+
|
|
80
|
+
3. Public License Fallback. Should any part of the Waiver for any reason
|
|
81
|
+
be judged legally invalid or ineffective under applicable law, then the
|
|
82
|
+
Waiver shall be preserved to the maximum extent permitted taking into
|
|
83
|
+
account Affirmer's express Statement of Purpose. In addition, to the
|
|
84
|
+
extent the Waiver is so judged Affirmer hereby grants to each affected
|
|
85
|
+
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
|
86
|
+
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
|
87
|
+
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
|
88
|
+
maximum duration provided by applicable law or treaty (including future
|
|
89
|
+
time extensions), (iii) in any current or future medium and for any number
|
|
90
|
+
of copies, and (iv) for any purpose whatsoever, including without
|
|
91
|
+
limitation commercial, advertising or promotional purposes (the
|
|
92
|
+
"License"). The License shall be deemed effective as of the date CC0 was
|
|
93
|
+
applied by Affirmer to the Work. Should any part of the License for any
|
|
94
|
+
reason be judged legally invalid or ineffective under applicable law, such
|
|
95
|
+
partial invalidity or ineffectiveness shall not invalidate the remainder
|
|
96
|
+
of the License, and in such case Affirmer hereby affirms that he or she
|
|
97
|
+
will not (i) exercise any of his or her remaining Copyright and Related
|
|
98
|
+
Rights in the Work or (ii) assert any associated claims and causes of
|
|
99
|
+
action with respect to the Work, in either case contrary to Affirmer's
|
|
100
|
+
express Statement of Purpose.
|
|
101
|
+
|
|
102
|
+
4. Limitations and Disclaimers.
|
|
103
|
+
|
|
104
|
+
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
|
105
|
+
surrendered, licensed or otherwise affected by this document.
|
|
106
|
+
b. Affirmer offers the Work as-is and makes no representations or
|
|
107
|
+
warranties of any kind concerning the Work, express, implied,
|
|
108
|
+
statutory or otherwise, including without limitation warranties of
|
|
109
|
+
title, merchantability, fitness for a particular purpose, non
|
|
110
|
+
infringement, or the absence of latent or other defects, accuracy, or
|
|
111
|
+
the present or absence of errors, whether or not discoverable, all to
|
|
112
|
+
the greatest extent permissible under applicable law.
|
|
113
|
+
c. Affirmer disclaims responsibility for clearing rights of other persons
|
|
114
|
+
that may apply to the Work or any use thereof, including without
|
|
115
|
+
limitation any person's Copyright and Related Rights in the Work.
|
|
116
|
+
Further, Affirmer disclaims responsibility for obtaining any necessary
|
|
117
|
+
consents, permissions or other rights required for any use of the
|
|
118
|
+
Work.
|
|
119
|
+
d. Affirmer understands and acknowledges that Creative Commons is not a
|
|
120
|
+
party to this document and has no duty or obligation with respect to
|
|
121
|
+
this CC0 or use of the Work.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: zensical-updates
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Generate a dated Updates (blog) section for zensical sites as plain Markdown
|
|
5
|
+
Project-URL: Homepage, https://github.com/IvanAnishchuk/zensical-updates
|
|
6
|
+
Project-URL: Repository, https://github.com/IvanAnishchuk/zensical-updates
|
|
7
|
+
Project-URL: Documentation, https://IvanAnishchuk.github.io/zensical-updates/
|
|
8
|
+
Project-URL: Issues, https://github.com/IvanAnishchuk/zensical-updates/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/IvanAnishchuk/zensical-updates/blob/main/CHANGELOG.md
|
|
10
|
+
Project-URL: Security, https://github.com/IvanAnishchuk/zensical-updates/blob/main/SECURITY.md
|
|
11
|
+
Author-email: Ivan Anishchuk <ivan@ivananishchuk.net>
|
|
12
|
+
License-Expression: CC0-1.0
|
|
13
|
+
License-File: LICENSE.md
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Classifier: Typing :: Typed
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Requires-Dist: pyyaml>=6.0.3
|
|
24
|
+
Requires-Dist: rich>=13.0
|
|
25
|
+
Requires-Dist: typer>=0.15
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# zensical-updates
|
|
29
|
+
|
|
30
|
+
Generate a dated "Updates" (blog) section for [zensical](https://zensical.org)
|
|
31
|
+
sites as plain Markdown. zensical ships no blog plugin, so this CLI runs as a
|
|
32
|
+
pre-build step. It reads your post files and writes an index listing, per-year
|
|
33
|
+
archives, and tag and category pages that zensical then builds.
|
|
34
|
+
|
|
35
|
+
## How it works
|
|
36
|
+
|
|
37
|
+
Writers keep posts in a source directory (default `updates/`), one Markdown file
|
|
38
|
+
per post. Each post carries a `date` and optional `categories`/`tags` in
|
|
39
|
+
block-list front matter:
|
|
40
|
+
|
|
41
|
+
```markdown
|
|
42
|
+
---
|
|
43
|
+
date: 2026-06-11
|
|
44
|
+
categories:
|
|
45
|
+
- weekly-update
|
|
46
|
+
tags:
|
|
47
|
+
- epf
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
# Hello world
|
|
51
|
+
|
|
52
|
+
The first paragraph becomes the listing excerpt.
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`zensical-updates build` copies each post to `docs/<base>/<slug>.md` and writes
|
|
56
|
+
the generated section around it (the index, `archive/`, `tags/`, `categories/`).
|
|
57
|
+
A post at `docs/updates/hello.md` renders at `/updates/hello/`, and every
|
|
58
|
+
generated link points there. Run it before zensical:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
zensical-updates build # writes docs/updates/
|
|
62
|
+
zensical build --clean --strict
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The generated `docs/<base>/` tree is build output. Gitignore it. The source tree
|
|
66
|
+
stays under version control, and the generator never edits it.
|
|
67
|
+
|
|
68
|
+
## Install
|
|
69
|
+
|
|
70
|
+
Not on PyPI yet. Pin from git:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
uv add "zensical-updates @ git+https://github.com/IvanAnishchuk/zensical-updates"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Configure
|
|
77
|
+
|
|
78
|
+
Settings live in `zensical.toml` under `[project.extra.zensical_updates]`, a
|
|
79
|
+
namespace zensical ignores:
|
|
80
|
+
|
|
81
|
+
```toml
|
|
82
|
+
[project.extra.zensical_updates]
|
|
83
|
+
base = "updates" # section dir under docs/ and the URL base
|
|
84
|
+
source = "updates" # where your post files live, outside docs/
|
|
85
|
+
emit_tags = true
|
|
86
|
+
emit_categories = true
|
|
87
|
+
emit_archive = true
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Every key is optional. The defaults above apply when the table is absent.
|
|
91
|
+
|
|
92
|
+
## CLI
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
zensical-updates build # generate the section into docs/<base>/
|
|
96
|
+
zensical-updates clean # remove the generated output
|
|
97
|
+
zensical-updates --help
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Development
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
git clone https://github.com/IvanAnishchuk/zensical-updates.git
|
|
104
|
+
cd zensical-updates
|
|
105
|
+
uv sync
|
|
106
|
+
|
|
107
|
+
uv run pytest # tests + coverage (includes the zensical build)
|
|
108
|
+
uv run ruff check src/ tests/
|
|
109
|
+
uv run ruff format --check src/ tests/
|
|
110
|
+
uv run mypy
|
|
111
|
+
uv run pre-commit run --all-files
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## License
|
|
115
|
+
|
|
116
|
+
CC0-1.0. This is an original implementation inspired by the concept of
|
|
117
|
+
`knu2xs/zensical-blog`, written from this project's own analysis of how zensical
|
|
118
|
+
behaves.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# zensical-updates
|
|
2
|
+
|
|
3
|
+
Generate a dated "Updates" (blog) section for [zensical](https://zensical.org)
|
|
4
|
+
sites as plain Markdown. zensical ships no blog plugin, so this CLI runs as a
|
|
5
|
+
pre-build step. It reads your post files and writes an index listing, per-year
|
|
6
|
+
archives, and tag and category pages that zensical then builds.
|
|
7
|
+
|
|
8
|
+
## How it works
|
|
9
|
+
|
|
10
|
+
Writers keep posts in a source directory (default `updates/`), one Markdown file
|
|
11
|
+
per post. Each post carries a `date` and optional `categories`/`tags` in
|
|
12
|
+
block-list front matter:
|
|
13
|
+
|
|
14
|
+
```markdown
|
|
15
|
+
---
|
|
16
|
+
date: 2026-06-11
|
|
17
|
+
categories:
|
|
18
|
+
- weekly-update
|
|
19
|
+
tags:
|
|
20
|
+
- epf
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Hello world
|
|
24
|
+
|
|
25
|
+
The first paragraph becomes the listing excerpt.
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`zensical-updates build` copies each post to `docs/<base>/<slug>.md` and writes
|
|
29
|
+
the generated section around it (the index, `archive/`, `tags/`, `categories/`).
|
|
30
|
+
A post at `docs/updates/hello.md` renders at `/updates/hello/`, and every
|
|
31
|
+
generated link points there. Run it before zensical:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
zensical-updates build # writes docs/updates/
|
|
35
|
+
zensical build --clean --strict
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The generated `docs/<base>/` tree is build output. Gitignore it. The source tree
|
|
39
|
+
stays under version control, and the generator never edits it.
|
|
40
|
+
|
|
41
|
+
## Install
|
|
42
|
+
|
|
43
|
+
Not on PyPI yet. Pin from git:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
uv add "zensical-updates @ git+https://github.com/IvanAnishchuk/zensical-updates"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Configure
|
|
50
|
+
|
|
51
|
+
Settings live in `zensical.toml` under `[project.extra.zensical_updates]`, a
|
|
52
|
+
namespace zensical ignores:
|
|
53
|
+
|
|
54
|
+
```toml
|
|
55
|
+
[project.extra.zensical_updates]
|
|
56
|
+
base = "updates" # section dir under docs/ and the URL base
|
|
57
|
+
source = "updates" # where your post files live, outside docs/
|
|
58
|
+
emit_tags = true
|
|
59
|
+
emit_categories = true
|
|
60
|
+
emit_archive = true
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Every key is optional. The defaults above apply when the table is absent.
|
|
64
|
+
|
|
65
|
+
## CLI
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
zensical-updates build # generate the section into docs/<base>/
|
|
69
|
+
zensical-updates clean # remove the generated output
|
|
70
|
+
zensical-updates --help
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Development
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
git clone https://github.com/IvanAnishchuk/zensical-updates.git
|
|
77
|
+
cd zensical-updates
|
|
78
|
+
uv sync
|
|
79
|
+
|
|
80
|
+
uv run pytest # tests + coverage (includes the zensical build)
|
|
81
|
+
uv run ruff check src/ tests/
|
|
82
|
+
uv run ruff format --check src/ tests/
|
|
83
|
+
uv run mypy
|
|
84
|
+
uv run pre-commit run --all-files
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## License
|
|
88
|
+
|
|
89
|
+
CC0-1.0. This is an original implementation inspired by the concept of
|
|
90
|
+
`knu2xs/zensical-blog`, written from this project's own analysis of how zensical
|
|
91
|
+
behaves.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
Only the latest release receives security fixes.
|
|
6
|
+
|
|
7
|
+
| Version | Supported |
|
|
8
|
+
|---------|-----------|
|
|
9
|
+
| latest | yes |
|
|
10
|
+
| older | no |
|
|
11
|
+
|
|
12
|
+
## Reporting a Vulnerability
|
|
13
|
+
|
|
14
|
+
**Please do not file public GitHub issues for security vulnerabilities.**
|
|
15
|
+
|
|
16
|
+
Report privately via one of the following channels:
|
|
17
|
+
|
|
18
|
+
1. **GitHub Private Vulnerability Reporting**
|
|
19
|
+
Use the "Report a vulnerability" button on the
|
|
20
|
+
[Security tab](https://github.com/IvanAnishchuk/zensical-updates/security/advisories/new).
|
|
21
|
+
|
|
22
|
+
2. **Email**
|
|
23
|
+
Send to `ivan@ivananishchuk.net`.
|
|
24
|
+
|
|
25
|
+
Please include:
|
|
26
|
+
|
|
27
|
+
- A description of the issue and its impact
|
|
28
|
+
- Steps to reproduce (proof-of-concept if possible)
|
|
29
|
+
- Affected versions
|
|
30
|
+
- Your name and affiliation (optional, for credit)
|
|
31
|
+
|
|
32
|
+
## Response SLA
|
|
33
|
+
|
|
34
|
+
- **Triage**: within 7 days of report
|
|
35
|
+
- **Fix + advisory**: within 90 days for high/critical issues
|
|
36
|
+
|
|
37
|
+
## Verifying Releases
|
|
38
|
+
|
|
39
|
+
All releases are:
|
|
40
|
+
|
|
41
|
+
- Built by GitHub Actions from a tagged commit
|
|
42
|
+
- Published to PyPI via **trusted publishing (OIDC)**
|
|
43
|
+
- **Signed with sigstore** (keyless signing)
|
|
44
|
+
- Accompanied by a **CycloneDX SBOM**
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
# Verify sigstore signature (replace vX.Y.Z with the release tag)
|
|
48
|
+
uv tool run sigstore verify identity \
|
|
49
|
+
--cert-identity 'https://github.com/IvanAnishchuk/zensical-updates/.github/workflows/release.yml@refs/tags/vX.Y.Z' \
|
|
50
|
+
--cert-oidc-issuer 'https://token.actions.githubusercontent.com' \
|
|
51
|
+
--bundle zensical-updates-*.whl.sigstore.json \
|
|
52
|
+
zensical-updates-*.whl
|
|
53
|
+
|
|
54
|
+
# Verify GitHub attestation
|
|
55
|
+
gh attestation verify zensical-updates-*.whl --owner IvanAnishchuk
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Safe Harbor
|
|
59
|
+
|
|
60
|
+
We support responsible security research. Good-faith efforts to discover
|
|
61
|
+
and report vulnerabilities will not be met with legal action.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
--8<-- "CHANGELOG.md"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CLI Reference
|
|
2
|
+
|
|
3
|
+
`zensical-updates` ships a small maintenance CLI for inspecting
|
|
4
|
+
the installed library. The importable API is the product; this is a convenience
|
|
5
|
+
for introspection and maintenance tasks.
|
|
6
|
+
|
|
7
|
+
::: mkdocs-typer2
|
|
8
|
+
:module: zensical_updates.cli
|
|
9
|
+
:command: app
|
|
10
|
+
:name: zensical-updates
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# zensical-updates
|
|
2
|
+
|
|
3
|
+
Generate a dated "Updates" (blog) section for zensical sites as plain Markdown.
|
|
4
|
+
zensical has no blog plugin, so this CLI runs as a pre-build step that writes an
|
|
5
|
+
index listing, per-year archives, and tag and category pages.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
Not on PyPI yet. Pin from git:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
uv add "zensical-updates @ git+https://github.com/IvanAnishchuk/zensical-updates"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quickstart
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
zensical-updates build # writes docs/<base>/
|
|
19
|
+
zensical build --clean --strict
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Documentation
|
|
23
|
+
|
|
24
|
+
- [Usage](usage.md) — write posts, configure, and run the build.
|
|
25
|
+
- [CLI](cli.md) — the `build`/`clean` commands.
|
|
26
|
+
- [API Reference](api.md) — generated from docstrings.
|
|
27
|
+
- [Changelog](changelog.md) — version history.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Usage
|
|
2
|
+
|
|
3
|
+
## Write posts
|
|
4
|
+
|
|
5
|
+
Put one Markdown file per post in your source directory (default `updates/`, set
|
|
6
|
+
by the `source` config key). The file stem becomes the slug and the URL segment,
|
|
7
|
+
so name files for the URL you want: `updates/hello-world.md` renders at
|
|
8
|
+
`/updates/hello-world/`.
|
|
9
|
+
|
|
10
|
+
Each post needs a `date` in front matter. Use block-style lists for `categories`
|
|
11
|
+
and `tags`; a flow list like `[weekly-update]` breaks zensical's strict build,
|
|
12
|
+
which reads it as an unresolved reference link.
|
|
13
|
+
|
|
14
|
+
```markdown
|
|
15
|
+
---
|
|
16
|
+
date: 2026-06-11
|
|
17
|
+
categories:
|
|
18
|
+
- weekly-update
|
|
19
|
+
tags:
|
|
20
|
+
- epf
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Hello world
|
|
24
|
+
|
|
25
|
+
The first paragraph becomes the listing excerpt. Mark a cut point with
|
|
26
|
+
`<!-- more -->` to control where the excerpt ends.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
An optional `updates/index.md` holds the section intro. Its body is placed above
|
|
30
|
+
the generated listing on the landing page.
|
|
31
|
+
|
|
32
|
+
## Configure
|
|
33
|
+
|
|
34
|
+
Settings live in `zensical.toml` under `[project.extra.zensical_updates]`:
|
|
35
|
+
|
|
36
|
+
```toml
|
|
37
|
+
[project.extra.zensical_updates]
|
|
38
|
+
base = "updates" # section dir under docs/ and the URL base
|
|
39
|
+
source = "updates" # where your post files live, outside docs/
|
|
40
|
+
intro = "index.md" # the intro file within source/
|
|
41
|
+
excerpt_marker = "<!-- more -->"
|
|
42
|
+
emit_tags = true
|
|
43
|
+
emit_categories = true
|
|
44
|
+
emit_archive = true
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Build
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
zensical-updates build # generate docs/<base>/
|
|
51
|
+
zensical build --clean --strict # build the site
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The generated `docs/<base>/` tree is build output. Add it to `.gitignore`. Run
|
|
55
|
+
`zensical-updates clean` to remove it. An invalid post (for example one with no
|
|
56
|
+
`date`) fails the build with a message naming the file.
|
|
57
|
+
|
|
58
|
+
## Library
|
|
59
|
+
|
|
60
|
+
The same operations are available as functions:
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
from pathlib import Path
|
|
64
|
+
|
|
65
|
+
from zensical_updates import Config, build_site, clean_site
|
|
66
|
+
|
|
67
|
+
result = build_site(Config(), Path("."))
|
|
68
|
+
print(result.post_urls)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The supported surface is whatever `zensical_updates.__all__` lists. See the
|
|
72
|
+
[API Reference](api.md).
|