Rebuild mdcms as proper CLI tool (v0.3)

- Replace interactive TUI with click-based subcommands:
  register, delete, view, build
- build accepts NAME (registry), --path, or CWD for GitHub Actions use
- Switch to PyYAML for frontmatter and nav.yml parsing
- Add pyproject.toml with click + PyYAML deps and mdcms entry point
- Add v0.3 version marker to app/config.yml and app/index.html
- Registry moves to ~/.config/mdcms/sites.json (XDG-compliant)
- Project root is now the directory containing index.html (no website/ subdir)
- register auto-downloads template from GitHub if no site found

https://claude.ai/code/session_01MqEqGhP1guGx5VuFsLaws2
This commit is contained in:
Claude 2026-05-08 16:05:04 +00:00
parent 35c0b727e7
commit 24670a66dd
No known key found for this signature in database
4 changed files with 413 additions and 1089 deletions

View file

@ -1,4 +1,5 @@
# MD-CMS v0.2 — Site configuration
# mdcms v0.3 | DO NOT REMOVE THIS COMMENT
# MD-CMS v0.3 — Site configuration
#
# Only `sitename` and `navigation` are required. Uncomment and edit the rest
# as needed. See https://kbenestad.codeberg.page/md-cms for the full reference.

View file

@ -1,5 +1,6 @@
<!-- mdcms v0.3 | DO NOT REMOVE THIS COMMENT -->
<!--
MD-CMS v0.2 — Renderer
MD-CMS v0.3 — Renderer
Copyright 2026 Kristian Benestad | kbenestad.codeberg.page

1480
mdcms.py

File diff suppressed because it is too large Load diff

26
pyproject.toml Normal file
View file

@ -0,0 +1,26 @@
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.backends.legacy:build"
[project]
name = "mdcms"
version = "0.3.0"
description = "MD-CMS — Markdown-based CMS companion CLI"
readme = "README.md"
license = { text = "Apache-2.0" }
authors = [{ name = "Kristian Benestad" }]
requires-python = ">=3.9"
dependencies = [
"click>=8.0",
"PyYAML>=6.0",
]
[project.scripts]
mdcms = "mdcms:main"
[project.urls]
Homepage = "https://github.com/kbenestad/mdcms"
Documentation = "https://docs.benestad.net"
[tool.setuptools]
py-modules = ["mdcms"]