mdbake 0.2.0__tar.gz → 0.2.1__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.
Files changed (51) hide show
  1. mdbake-0.2.0/README.md → mdbake-0.2.1/PKG-INFO +29 -0
  2. mdbake-0.2.0/PKG-INFO → mdbake-0.2.1/README.md +8 -20
  3. {mdbake-0.2.0 → mdbake-0.2.1}/docs/index.md +2 -0
  4. {mdbake-0.2.0 → mdbake-0.2.1}/pyproject.toml +2 -1
  5. mdbake-0.2.1/src/mdbake/cli.py +139 -0
  6. {mdbake-0.2.0 → mdbake-0.2.1}/tests/test_build.py +32 -0
  7. {mdbake-0.2.0 → mdbake-0.2.1}/tests/test_toc.py +4 -4
  8. {mdbake-0.2.0 → mdbake-0.2.1}/uv.lock +65 -1
  9. mdbake-0.2.0/src/mdbake/cli.py +0 -51
  10. {mdbake-0.2.0 → mdbake-0.2.1}/.github/workflows/ci.yml +0 -0
  11. {mdbake-0.2.0 → mdbake-0.2.1}/.github/workflows/release.yml +0 -0
  12. {mdbake-0.2.0 → mdbake-0.2.1}/.gitignore +0 -0
  13. {mdbake-0.2.0 → mdbake-0.2.1}/docs/guide/configuration.md +0 -0
  14. {mdbake-0.2.0 → mdbake-0.2.1}/docs/guide/middleware.md +0 -0
  15. {mdbake-0.2.0 → mdbake-0.2.1}/main.py +0 -0
  16. {mdbake-0.2.0 → mdbake-0.2.1}/mdbake.yml +0 -0
  17. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/__init__.py +0 -0
  18. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/builder.py +0 -0
  19. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/builtin/__init__.py +0 -0
  20. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/builtin/draft.py +0 -0
  21. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/builtin/frontmatter_defaults.py +0 -0
  22. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/config.py +0 -0
  23. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/files.py +0 -0
  24. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/frontmatter.py +0 -0
  25. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/links.py +0 -0
  26. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/markdown.py +0 -0
  27. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/middleware.py +0 -0
  28. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/nav.py +0 -0
  29. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/page.py +0 -0
  30. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/search.py +0 -0
  31. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/theme/base.html +0 -0
  32. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/theme/nav.html +0 -0
  33. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/theme/search.js +0 -0
  34. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/theme/style.css +0 -0
  35. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/theme/toc.html +0 -0
  36. {mdbake-0.2.0 → mdbake-0.2.1}/src/mdbake/toc.py +0 -0
  37. {mdbake-0.2.0 → mdbake-0.2.1}/tests/conftest.py +0 -0
  38. {mdbake-0.2.0 → mdbake-0.2.1}/tests/fixtures/docs/.hidden.md +0 -0
  39. {mdbake-0.2.0 → mdbake-0.2.1}/tests/fixtures/docs/draft.md +0 -0
  40. {mdbake-0.2.0 → mdbake-0.2.1}/tests/fixtures/docs/guide/advanced/tuning.md +0 -0
  41. {mdbake-0.2.0 → mdbake-0.2.1}/tests/fixtures/docs/guide/index.md +0 -0
  42. {mdbake-0.2.0 → mdbake-0.2.1}/tests/fixtures/docs/guide/install.md +0 -0
  43. {mdbake-0.2.0 → mdbake-0.2.1}/tests/fixtures/docs/guide/usage.md +0 -0
  44. {mdbake-0.2.0 → mdbake-0.2.1}/tests/fixtures/docs/img/logo.svg +0 -0
  45. {mdbake-0.2.0 → mdbake-0.2.1}/tests/fixtures/docs/index.md +0 -0
  46. {mdbake-0.2.0 → mdbake-0.2.1}/tests/test_files.py +0 -0
  47. {mdbake-0.2.0 → mdbake-0.2.1}/tests/test_frontmatter.py +0 -0
  48. {mdbake-0.2.0 → mdbake-0.2.1}/tests/test_links.py +0 -0
  49. {mdbake-0.2.0 → mdbake-0.2.1}/tests/test_middleware.py +0 -0
  50. {mdbake-0.2.0 → mdbake-0.2.1}/tests/test_nav.py +0 -0
  51. {mdbake-0.2.0 → mdbake-0.2.1}/tests/test_search.py +0 -0
@@ -1,3 +1,24 @@
1
+ Metadata-Version: 2.5
2
+ Name: mdbake
3
+ Version: 0.2.1
4
+ Summary: Bake HTML sites from MarkDown
5
+ Author-email: fm-labs <mdbake@fmlabs.dev>
6
+ License-Expression: MIT
7
+ Classifier: Operating System :: OS Independent
8
+ Classifier: Programming Language :: Python :: 3
9
+ Requires-Python: <4.0,>=3.13
10
+ Requires-Dist: click>=8.1
11
+ Requires-Dist: jinja2>=3.1
12
+ Requires-Dist: linkify-it-py>=2.0
13
+ Requires-Dist: livereload>=2.7.1
14
+ Requires-Dist: markdown-it-py>=3.0
15
+ Requires-Dist: mdit-py-plugins>=0.4
16
+ Requires-Dist: pygments>=2.15
17
+ Requires-Dist: pyyaml>=6.0
18
+ Provides-Extra: dev
19
+ Requires-Dist: pytest>=9; extra == 'dev'
20
+ Description-Content-Type: text/markdown
21
+
1
22
  # mdbake
2
23
 
3
24
  A minimal Markdown → HTML documentation site generator.
@@ -28,6 +49,8 @@ mdbake build # uses ./mdbake.yml if present, else docs/
28
49
  mdbake build -f path/to/mdbake.yml # explicit config file
29
50
  mdbake build -d docs -o site # override docs_dir / site_dir
30
51
  mdbake build --clean --strict # wipe site_dir first; fail on warnings
52
+ mdbake watch # build, serve on :8000, rebuild + reload browser on changes
53
+ mdbake serve # serve the already built site_dir on :8000
31
54
  ```
32
55
 
33
56
  | Option | Meaning |
@@ -39,6 +62,12 @@ mdbake build --clean --strict # wipe site_dir first; fail on warnings
39
62
  | `-s, --strict` | Exit with an error if there were any warnings |
40
63
  | `-v, --verbose` / `-q, --quiet` | More / less output |
41
64
 
65
+ `mdbake watch` takes `-f`, `-d`, `-o`, `-v` as above, plus `--host` (default `127.0.0.1`),
66
+ `-p, --port` (default `8000`) and `--open` (open a browser). It watches `docs_dir`, the config
67
+ file and `templates_dir`, rebuilds on changes (errors are logged, the server keeps running) and
68
+ reloads open pages via livereload. `mdbake serve` takes `-f`, `-o`, `--host` and `-p, --port`
69
+ and just serves `site_dir` over HTTP.
70
+
42
71
  ## Configuration
43
72
 
44
73
  `mdbake.yml` (paths are relative to the config file):
@@ -1,23 +1,3 @@
1
- Metadata-Version: 2.5
2
- Name: mdbake
3
- Version: 0.2.0
4
- Summary: Bake HTML sites from MarkDown
5
- Author-email: fm-labs <mdbake@fmlabs.dev>
6
- License-Expression: MIT
7
- Classifier: Operating System :: OS Independent
8
- Classifier: Programming Language :: Python :: 3
9
- Requires-Python: <4.0,>=3.13
10
- Requires-Dist: click>=8.1
11
- Requires-Dist: jinja2>=3.1
12
- Requires-Dist: linkify-it-py>=2.0
13
- Requires-Dist: markdown-it-py>=3.0
14
- Requires-Dist: mdit-py-plugins>=0.4
15
- Requires-Dist: pygments>=2.15
16
- Requires-Dist: pyyaml>=6.0
17
- Provides-Extra: dev
18
- Requires-Dist: pytest>=9; extra == 'dev'
19
- Description-Content-Type: text/markdown
20
-
21
1
  # mdbake
22
2
 
23
3
  A minimal Markdown → HTML documentation site generator.
@@ -48,6 +28,8 @@ mdbake build # uses ./mdbake.yml if present, else docs/
48
28
  mdbake build -f path/to/mdbake.yml # explicit config file
49
29
  mdbake build -d docs -o site # override docs_dir / site_dir
50
30
  mdbake build --clean --strict # wipe site_dir first; fail on warnings
31
+ mdbake watch # build, serve on :8000, rebuild + reload browser on changes
32
+ mdbake serve # serve the already built site_dir on :8000
51
33
  ```
52
34
 
53
35
  | Option | Meaning |
@@ -59,6 +41,12 @@ mdbake build --clean --strict # wipe site_dir first; fail on warnings
59
41
  | `-s, --strict` | Exit with an error if there were any warnings |
60
42
  | `-v, --verbose` / `-q, --quiet` | More / less output |
61
43
 
44
+ `mdbake watch` takes `-f`, `-d`, `-o`, `-v` as above, plus `--host` (default `127.0.0.1`),
45
+ `-p, --port` (default `8000`) and `--open` (open a browser). It watches `docs_dir`, the config
46
+ file and `templates_dir`, rebuilds on changes (errors are logged, the server keeps running) and
47
+ reloads open pages via livereload. `mdbake serve` takes `-f`, `-o`, `--host` and `-p, --port`
48
+ and just serves `site_dir` over HTTP.
49
+
62
50
  ## Configuration
63
51
 
64
52
  `mdbake.yml` (paths are relative to the config file):
@@ -14,6 +14,8 @@ A minimal Markdown → HTML documentation generator.
14
14
  pip install -e .
15
15
  mdbake build # uses ./mdbake.yml if present
16
16
  mdbake build -d docs -o site --strict
17
+ mdbake watch # live preview on http://127.0.0.1:8000
18
+ mdbake serve # serve the built site
17
19
  ```
18
20
 
19
21
  Open `site/index.html` directly from disk: all links are relative.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "mdbake"
7
- version = "0.2.0"
7
+ version = "0.2.1"
8
8
  description = "Bake HTML sites from MarkDown"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -27,6 +27,7 @@ dependencies = [
27
27
  "Jinja2>=3.1",
28
28
  "click>=8.1",
29
29
  "Pygments>=2.15",
30
+ "livereload>=2.7.1",
30
31
  ]
31
32
 
32
33
  [project.optional-dependencies]
@@ -0,0 +1,139 @@
1
+ """Command line interface: ``mdbake build``, ``mdbake serve`` and ``mdbake watch``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import logging
6
+ from pathlib import Path
7
+
8
+ import click
9
+
10
+ from . import __version__
11
+ from .builder import BuildError, build as build_site
12
+ from .config import ConfigError, load_config
13
+ from .middleware import MiddlewareError
14
+
15
+
16
+ @click.group()
17
+ @click.version_option(__version__, prog_name="mdbake")
18
+ def main() -> None:
19
+ """mdbake - a minimal Markdown to HTML documentation generator."""
20
+
21
+
22
+ @main.command()
23
+ @click.option("-f", "--config", "config_file", type=click.Path(dir_okay=False, path_type=Path),
24
+ help="Config file (default: ./mdbake.yml if present).")
25
+ @click.option("-d", "--docs-dir", type=click.Path(file_okay=False, path_type=Path),
26
+ help="Directory with Markdown sources (overrides config).")
27
+ @click.option("-o", "--site-dir", type=click.Path(file_okay=False, path_type=Path),
28
+ help="Output directory (overrides config).")
29
+ @click.option("--clean", is_flag=True, help="Delete site_dir before building.")
30
+ @click.option("-s", "--strict", is_flag=True, help="Exit with an error if there were warnings.")
31
+ @click.option("-v", "--verbose", is_flag=True, help="Verbose output.")
32
+ @click.option("-q", "--quiet", is_flag=True, help="Only show errors.")
33
+ def build(config_file: Path | None, docs_dir: Path | None, site_dir: Path | None,
34
+ clean: bool, strict: bool, verbose: bool, quiet: bool) -> None:
35
+ """Build the documentation site."""
36
+ _setup_logging(verbose, quiet)
37
+ try:
38
+ config = load_config(config_file, docs_dir=docs_dir, site_dir=site_dir)
39
+ site = build_site(config, clean=clean)
40
+ except (ConfigError, BuildError, MiddlewareError) as exc:
41
+ raise click.ClickException(str(exc)) from exc
42
+ if site.warnings:
43
+ msg = f"{len(site.warnings)} warning(s)"
44
+ if strict:
45
+ raise click.ClickException(f"Aborted: {msg} in strict mode")
46
+ logging.getLogger("mdbake").info(msg)
47
+
48
+
49
+
50
+ _config_option = click.option("-f", "--config", "config_file", type=click.Path(dir_okay=False, path_type=Path),
51
+ help="Config file (default: ./mdbake.yml if present).")
52
+ _host_option = click.option("--host", default="127.0.0.1", show_default=True, help="Address to listen on.")
53
+ _port_option = click.option("-p", "--port", default=8000, show_default=True, type=click.IntRange(0, 65535),
54
+ help="Port to listen on.")
55
+
56
+
57
+ def _setup_logging(verbose: bool = False, quiet: bool = False) -> None:
58
+ level = logging.ERROR if quiet else logging.DEBUG if verbose else logging.INFO
59
+ logging.basicConfig(format="%(levelname)-7s %(message)s", level=level)
60
+
61
+
62
+ @main.command("serve")
63
+ @_config_option
64
+ @click.option("-o", "--site-dir", type=click.Path(file_okay=False, path_type=Path),
65
+ help="Directory to serve (overrides config).")
66
+ @_host_option
67
+ @_port_option
68
+ def serve_site(config_file: Path | None, site_dir: Path | None, host: str, port: int) -> None:
69
+ """Serve the built site over HTTP (no rebuilding)."""
70
+ from functools import partial
71
+ from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
72
+
73
+ _setup_logging()
74
+ try:
75
+ config = load_config(config_file, site_dir=site_dir)
76
+ except ConfigError as exc:
77
+ raise click.ClickException(str(exc)) from exc
78
+ root = config.site_dir
79
+ if not root.is_dir():
80
+ raise click.ClickException(f"Site directory not found: {root} (run 'mdbake build' first)")
81
+
82
+ handler = partial(SimpleHTTPRequestHandler, directory=str(root))
83
+ try:
84
+ httpd = ThreadingHTTPServer((host, port), handler)
85
+ except OSError as exc:
86
+ raise click.ClickException(f"Cannot listen on {host}:{port}: {exc}") from exc
87
+ with httpd:
88
+ click.echo(f"Serving {root} at http://{host}:{httpd.server_port}/ (Ctrl+C to stop)")
89
+ try:
90
+ httpd.serve_forever()
91
+ except KeyboardInterrupt:
92
+ pass
93
+
94
+
95
+ @main.command("watch")
96
+ @_config_option
97
+ @click.option("-d", "--docs-dir", type=click.Path(file_okay=False, path_type=Path),
98
+ help="Directory with Markdown sources (overrides config).")
99
+ @click.option("-o", "--site-dir", type=click.Path(file_okay=False, path_type=Path),
100
+ help="Output directory (overrides config).")
101
+ @_host_option
102
+ @_port_option
103
+ @click.option("--open", "open_browser", is_flag=True, help="Open the site in a web browser.")
104
+ @click.option("-v", "--verbose", is_flag=True, help="Verbose output.")
105
+ def watch_docs(config_file: Path | None, docs_dir: Path | None, site_dir: Path | None,
106
+ host: str, port: int, open_browser: bool, verbose: bool) -> None:
107
+ """Build the site, serve it, and rebuild and reload the browser on changes."""
108
+ from livereload import Server
109
+
110
+ _setup_logging(verbose)
111
+ log = logging.getLogger("mdbake")
112
+
113
+ def load():
114
+ return load_config(config_file, docs_dir=docs_dir, site_dir=site_dir)
115
+
116
+ try:
117
+ config = load()
118
+ build_site(config)
119
+ except (ConfigError, BuildError, MiddlewareError) as exc:
120
+ raise click.ClickException(str(exc)) from exc
121
+
122
+ def rebuild() -> None:
123
+ # Re-read the config so edits to mdbake.yml apply; keep serving on errors.
124
+ try:
125
+ build_site(load())
126
+ except (ConfigError, BuildError, MiddlewareError) as exc:
127
+ log.error("Rebuild failed: %s", exc)
128
+
129
+ logging.getLogger("livereload").propagate = False # it has its own handler
130
+ server = Server()
131
+ watched = [config.docs_dir, config.config_file, config.templates_dir]
132
+ for path in watched:
133
+ if path is not None and path.exists():
134
+ server.watch(str(path), rebuild, delay=0.2)
135
+ server.serve(host=host, port=port, root=str(config.site_dir), open_url_delay=0 if open_browser else None,
136
+ debug=False)
137
+
138
+ if __name__ == "__main__": # pragma: no cover
139
+ main()
@@ -113,3 +113,35 @@ def test_clean_refuses_unsafe(tmp_path):
113
113
  assert result.exit_code == 1
114
114
  assert "refusing to clean" in result.output
115
115
  assert (docs / "index.md").exists()
116
+
117
+
118
+ def test_cli_serve_missing_site_dir(tmp_path):
119
+ result = CliRunner().invoke(main, ["serve", "-o", str(tmp_path / "nope")])
120
+ assert result.exit_code != 0
121
+ assert "Site directory not found" in result.output
122
+
123
+
124
+ def test_cli_watch(fixture_docs, tmp_path, monkeypatch):
125
+ import livereload
126
+
127
+ calls = {"watch": []}
128
+
129
+ class FakeServer:
130
+ def watch(self, path, func=None, delay=None):
131
+ calls["watch"].append((path, func))
132
+
133
+ def serve(self, **kwargs):
134
+ calls["serve"] = kwargs
135
+
136
+ monkeypatch.setattr(livereload, "Server", FakeServer)
137
+ monkeypatch.chdir(tmp_path) # no mdbake.yml here
138
+ site_dir = tmp_path / "site"
139
+ result = CliRunner().invoke(main, ["watch", "-d", str(fixture_docs), "-o", str(site_dir), "--port", "9000"])
140
+ assert result.exit_code == 0, result.output
141
+ assert (site_dir / "index.html").is_file()
142
+ assert calls["serve"]["root"] == str(site_dir) and calls["serve"]["port"] == 9000
143
+ (path, rebuild), = calls["watch"]
144
+ assert path == str(fixture_docs)
145
+ (site_dir / "index.html").unlink()
146
+ rebuild()
147
+ assert (site_dir / "index.html").is_file()
@@ -11,8 +11,8 @@ def test_slugify():
11
11
 
12
12
  def test_build_toc_nesting():
13
13
  toc = build_toc([(1, "T", "t"), (2, "A", "a"), (3, "A1", "a1"), (2, "B", "b"), (4, "B1", "b1")])
14
- assert [l.id for l in toc] == ["t"]
15
- assert [l.id for l in toc[0].children] == ["a", "b"]
14
+ assert [e.id for e in toc] == ["t"]
15
+ assert [e.id for e in toc[0].children] == ["a", "b"]
16
16
  assert toc[0].children[0].children[0].id == "a1"
17
17
  assert toc[0].children[1].children[0].id == "b1"
18
18
  assert toc[0].children[0].url == "#a"
@@ -20,8 +20,8 @@ def test_build_toc_nesting():
20
20
 
21
21
  def test_build_toc_max_level_and_no_h1():
22
22
  toc = build_toc([(2, "A", "a"), (3, "A1", "a1"), (4, "deep", "d"), (2, "B", "b")], max_level=3)
23
- assert [l.id for l in toc] == ["a", "b"]
24
- assert [l.id for l in toc[0].children] == ["a1"]
23
+ assert [e.id for e in toc] == ["a", "b"]
24
+ assert [e.id for e in toc[0].children] == ["a1"]
25
25
  assert toc[0].children[0].children == []
26
26
 
27
27
 
@@ -59,6 +59,18 @@ wheels = [
59
59
  { url = "https://files.pythonhosted.org/packages/13/d4/1152d1c7ab42d8b908be64fd200ddc870dc9d4925e951198702084aa1a7d/linkify_it_py-2.2.0-py3-none-any.whl", hash = "sha256:3adc40eb5af300b2605fcfdb968c24e1d780a90f1f2221af7c15e5111e94d443", size = 21971, upload-time = "2026-08-29T07:07:07.164Z" },
60
60
  ]
61
61
 
62
+ [[package]]
63
+ name = "livereload"
64
+ version = "2.7.1"
65
+ source = { registry = "https://pypi.org/simple" }
66
+ dependencies = [
67
+ { name = "tornado" },
68
+ ]
69
+ sdist = { url = "https://files.pythonhosted.org/packages/43/6e/f2748665839812a9bbe5c75d3f983edbf3ab05fa5cd2f7c2f36fffdf65bd/livereload-2.7.1.tar.gz", hash = "sha256:3d9bf7c05673df06e32bea23b494b8d36ca6d10f7d5c3c8a6989608c09c986a9", size = 22255, upload-time = "2024-12-18T13:42:01.461Z" }
70
+ wheels = [
71
+ { url = "https://files.pythonhosted.org/packages/e4/3e/de54dc7f199e85e6ca37e2e5dae2ec3bce2151e9e28f8eb9076d71e83d56/livereload-2.7.1-py3-none-any.whl", hash = "sha256:5201740078c1b9433f4b2ba22cd2729a39b9d0ec0a2cc6b4d3df257df5ad0564", size = 22657, upload-time = "2024-12-18T13:41:56.35Z" },
72
+ ]
73
+
62
74
  [[package]]
63
75
  name = "macholib"
64
76
  version = "1.16.4"
@@ -183,12 +195,13 @@ wheels = [
183
195
 
184
196
  [[package]]
185
197
  name = "mdbake"
186
- version = "0.2.0"
198
+ version = "0.2.1"
187
199
  source = { editable = "." }
188
200
  dependencies = [
189
201
  { name = "click" },
190
202
  { name = "jinja2" },
191
203
  { name = "linkify-it-py" },
204
+ { name = "livereload" },
192
205
  { name = "markdown-it-py" },
193
206
  { name = "mdit-py-plugins" },
194
207
  { name = "pygments" },
@@ -212,6 +225,7 @@ requires-dist = [
212
225
  { name = "click", specifier = ">=8.1" },
213
226
  { name = "jinja2", specifier = ">=3.1" },
214
227
  { name = "linkify-it-py", specifier = ">=2.0" },
228
+ { name = "livereload", specifier = ">=2.7.1" },
215
229
  { name = "markdown-it-py", specifier = ">=3.0" },
216
230
  { name = "mdit-py-plugins", specifier = ">=0.4" },
217
231
  { name = "pygments", specifier = ">=2.15" },
@@ -436,3 +450,53 @@ sdist = { url = "https://files.pythonhosted.org/packages/70/b3/c19426f783614d625
436
450
  wheels = [
437
451
  { url = "https://files.pythonhosted.org/packages/ef/55/6dc6d6bb953bdfc52519a0059592c52b6e3b8ad51cf8256dffceb55b0610/setuptools-84.2.1-py3-none-any.whl", hash = "sha256:ca140b45d5325a9478f880e351484f62fef15f336462e449ca0c03c873d589c2", size = 876263, upload-time = "2026-10-20T19:01:35.678Z" },
438
452
  ]
453
+
454
+ [[package]]
455
+ name = "tornado"
456
+ version = "6.6.1"
457
+ source = { registry = "https://pypi.org/simple" }
458
+ sdist = { url = "https://files.pythonhosted.org/packages/64/2b/8ff2b41620cbba0eeb0862fed21dcaa5a2ad36c6dd9bb465f9ff7a147be2/tornado-6.6.1.tar.gz", hash = "sha256:28e6311402af59c8b02e3fa0f5e7d8eb465b25081381803b127d97e6a4395d5a", size = 623388, upload-time = "2026-11-09T21:09:22.71Z" }
459
+ wheels = [
460
+ { url = "https://files.pythonhosted.org/packages/77/d3/ef3a4d38d1a72c52ad07483ed760dbb93027d28f19c3a2d98148abdd63e1/tornado-6.6.1-cp311-abi3-macosx_10_9_universal2.whl", hash = "sha256:a8d3e6acde5a80d13b13b5e4c7c226ca682f31d0a62b6c33cea038714bc2de1b", size = 533249, upload-time = "2026-11-09T21:08:22.475Z" },
461
+ { url = "https://files.pythonhosted.org/packages/38/4d/c65ea949a3cdc185f1afac8c337074d4f2d029b48293d2db4d2c3dea4849/tornado-6.6.1-cp311-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1b6ff57cc69b339f8feb9e7b567b0e0eacb16bfaf234159496623ef7a67ba640", size = 534470, upload-time = "2026-11-09T21:08:24.27Z" },
462
+ { url = "https://files.pythonhosted.org/packages/03/ff/20911f85dd399b56761496e8138810e8608ea25f0912377f4205d52af853/tornado-6.6.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:da6ce2da215810d56539fa6cac77d9e27f4d8139c6868c53436b2fe933f43c79", size = 535446, upload-time = "2026-11-09T21:08:25.625Z" },
463
+ { url = "https://files.pythonhosted.org/packages/be/70/a4a159dd4f1fef39ff8eadae655b133a85722b39087a89e21ce463af9832/tornado-6.6.1-cp311-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8cd28b2cacbe63d53e28a38546a3492b488417eeb3f7ecf10954476fc2508882", size = 535664, upload-time = "2026-11-09T21:08:27.191Z" },
464
+ { url = "https://files.pythonhosted.org/packages/ed/d5/db70d5d23d3b4eaea0b26b710f28d2ca387bb44e68ccfede60ba3bbc2096/tornado-6.6.1-cp311-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:25b2619274bca77d0eb7b4d96dcf2d1142bb9bf172ad6a7491a1e1f82e6e48fa", size = 534660, upload-time = "2026-11-09T21:08:28.78Z" },
465
+ { url = "https://files.pythonhosted.org/packages/f7/f6/0528ee039266902e707edd9996ee3ce7364dc1baf08bed585d8e6fb3ccd0/tornado-6.6.1-cp311-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:77dd6e0c659fdc45824e0746988ac5c060c2a9fee9b8cbbcdb999b3f29d3cd10", size = 532834, upload-time = "2026-11-09T21:08:30.432Z" },
466
+ { url = "https://files.pythonhosted.org/packages/a6/bb/b733df2d487a78283080663bd6d96955121b58b6d445d9cb832607da9786/tornado-6.6.1-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:b62fded687e55acaf9e36c1230b006066a35b3f6df093ba1fd3b2ff592070e1d", size = 535289, upload-time = "2026-11-09T21:08:31.692Z" },
467
+ { url = "https://files.pythonhosted.org/packages/a7/7c/c81cb83f2bbb5740fcba1eb83d794b6d6fab2063b16a475cc9039266091e/tornado-6.6.1-cp311-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:ecef88054d8a77878f61061ff67dfc5e1c17d1f7334890ab508b310e8e68ee46", size = 535382, upload-time = "2026-11-09T21:08:33.282Z" },
468
+ { url = "https://files.pythonhosted.org/packages/8a/ae/c499da4cc8be1c1f31a5d8df2328f2aae091de2db13302ad5c20ed704ec4/tornado-6.6.1-cp311-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:ca95e762df1ca761f330e3f2a034c15ac144569844b52527a5a9eca9f524c0f1", size = 534534, upload-time = "2026-11-09T21:08:34.57Z" },
469
+ { url = "https://files.pythonhosted.org/packages/61/7c/6b163c9e58ca9df0c941bda9ba2dcabbd87ecb81c5fa546f54eeac689232/tornado-6.6.1-cp311-abi3-musllinux_1_2_s390x.whl", hash = "sha256:8cae3d8f2585be01670da9fd5010c61724c51b61ecd4c06820e95874739daf7c", size = 534728, upload-time = "2026-11-09T21:08:35.828Z" },
470
+ { url = "https://files.pythonhosted.org/packages/18/11/b5107ac6a278387635d73d283e7ab5a5c76fb8ccf402efa57006ea25852f/tornado-6.6.1-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:6596f3e939962f13099ce8d1a96b83226e908ca369b193370a6efa84585a1601", size = 534676, upload-time = "2026-11-09T21:08:37.209Z" },
471
+ { url = "https://files.pythonhosted.org/packages/65/df/0574c4479c565d9233def796afc9179fa840f41f8c240f740609f746da67/tornado-6.6.1-cp311-abi3-win32.whl", hash = "sha256:0f0f596a0dab6826aa21d103c7bc242e3fb7cfc99c5c3d44a35ba8c83abbdca4", size = 535565, upload-time = "2026-11-09T21:08:38.518Z" },
472
+ { url = "https://files.pythonhosted.org/packages/36/57/35439a779582e3b19c98e799b6a41519fb3bdaa3a21b7a94ce4dd7b3b732/tornado-6.6.1-cp311-abi3-win_amd64.whl", hash = "sha256:5cb82ca38596e1350fceaf994f287847f82f7b8436380d36ba0937a03107d0ee", size = 535806, upload-time = "2026-11-09T21:08:39.892Z" },
473
+ { url = "https://files.pythonhosted.org/packages/89/b8/2cb42845af01ea7e70ac23e6f6fe2f26b9b158bce186c6991c057c9abe1d/tornado-6.6.1-cp311-abi3-win_arm64.whl", hash = "sha256:58d2f47e7b54fded3407dbbbe4e59d29ca627f85bf6c0f21f0b151c6c7fc9c53", size = 535825, upload-time = "2026-11-09T21:08:41.339Z" },
474
+ { url = "https://files.pythonhosted.org/packages/10/de/cfeae9e75c144ca22018ee3b858e343c1658d6edd2184f35d810ec1ef789/tornado-6.6.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:ed0bc5a1a9f6346e7bdadc106fa2d4c6e79d71d8b2df4366260ab3baf36a8399", size = 533356, upload-time = "2026-11-09T21:08:42.603Z" },
475
+ { url = "https://files.pythonhosted.org/packages/3d/d8/7812a729c797fb8c15748c9a69faeaaa13630075cf9b76ba9f7fbcfb7f42/tornado-6.6.1-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:54c80f9bed0bf1533ecf5a90dc59651645622d62b0bcffa2692d108a1f794917", size = 537511, upload-time = "2026-11-09T21:08:43.84Z" },
476
+ { url = "https://files.pythonhosted.org/packages/70/47/ebef304487feea6d8efb6a7d2642964ecb1f5cc785f687628e1d7cac4326/tornado-6.6.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eb67ba2cbf598e842f14684eab029a5a4ba7ab587e8c4e40940a77ed0596b31e", size = 538566, upload-time = "2026-11-09T21:08:45.203Z" },
477
+ { url = "https://files.pythonhosted.org/packages/a3/6a/87532e6745c415eb2daa9bc1c9c89c69ce9e8255b1c0bde9938f3299440b/tornado-6.6.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d83bac141bd9360d8e995ec512097be19ead2e9213c3e7088510a036f3192b8d", size = 538793, upload-time = "2026-11-09T21:08:46.478Z" },
478
+ { url = "https://files.pythonhosted.org/packages/e4/c7/26af60f71f7c32f19257bad58711500628f579edf1a2c3d8328ad15aae04/tornado-6.6.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:60aad449dbcebaa8d69bff50c6ba39858fab8d256e779a99bb30ebf6724b9b48", size = 537691, upload-time = "2026-11-09T21:08:47.975Z" },
479
+ { url = "https://files.pythonhosted.org/packages/ba/9d/af233b8bf4311d3466099ab267eb595ec6f1655607d290dc7f706b6dbd6f/tornado-6.6.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b9ce0d6548bd73b1329075b247d3fdc61538922f558ee42059e08f5df53fc197", size = 535877, upload-time = "2026-11-09T21:08:49.76Z" },
480
+ { url = "https://files.pythonhosted.org/packages/95/66/78e7583ce69f66e5177c65988a98373be2ab25c1d22405d274e037acbc58/tornado-6.6.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:ce5a18654f5d56d11400ab5d87103660e14deceab41818a06a42acc8dbbe427d", size = 538295, upload-time = "2026-11-09T21:08:51.221Z" },
481
+ { url = "https://files.pythonhosted.org/packages/a3/3a/ad336d4994547cf268a3bd6d10f6ef691e1e888fc776940c0bfe02e8d85c/tornado-6.6.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:3298fce72c35f836eab4c4db8b960104ff1ea718033a6b5e236f04efe3a1b6e1", size = 538349, upload-time = "2026-11-09T21:08:52.761Z" },
482
+ { url = "https://files.pythonhosted.org/packages/cf/cf/563d24516afd266f6b3c3f1c7ac15ad39b8668966d2bccce917c169ab0c0/tornado-6.6.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:0223e827cedf4e35ebb035e57a0d9974563cd043e3a53f8bb72a859b6f53777e", size = 537469, upload-time = "2026-11-09T21:08:54.279Z" },
483
+ { url = "https://files.pythonhosted.org/packages/c8/ea/1705ff4014c8bad5d7045022647156cfebd6c7014886da47e13512d27c08/tornado-6.6.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:533185c89be3ffb01656c9425da4ff42587a3af784b37d39fe762e8fce3b2dbe", size = 537624, upload-time = "2026-11-09T21:08:55.648Z" },
484
+ { url = "https://files.pythonhosted.org/packages/50/5d/421168e62c8b80e3ef88f80d642e9a7e5b1d0c6e8cd136d99064f663951c/tornado-6.6.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:fbaa022a49a27b65668592cf43b898ff3978cbe4e6926fdfe24dbef59053bd26", size = 537632, upload-time = "2026-11-09T21:08:57.797Z" },
485
+ { url = "https://files.pythonhosted.org/packages/6a/b4/13b2f98a3141c152915fa3e69531a04bdc1cd7dd203f442136f3792a486f/tornado-6.6.1-cp314-cp314t-win32.whl", hash = "sha256:4bc6c60faf86162df25ba2ff5611d27b6ef8226de9d61c07a0fab53c169630a5", size = 535424, upload-time = "2026-11-09T21:08:59.145Z" },
486
+ { url = "https://files.pythonhosted.org/packages/84/83/6d54c37b3e437ab0ff2bddd71249c6ea2a17051104dd2995cb4e181e95a7/tornado-6.6.1-cp314-cp314t-win_amd64.whl", hash = "sha256:71c16b382b22d3234913a3f74a1ea84bede197d11eb03871df17bb123088dfa5", size = 535715, upload-time = "2026-11-09T21:09:00.456Z" },
487
+ { url = "https://files.pythonhosted.org/packages/d4/38/75419d8cd577b7c4f335f4c5e75f127af286545ad49047a73afffdf877fe/tornado-6.6.1-cp314-cp314t-win_arm64.whl", hash = "sha256:510c7261ed986ecd6f74edc1a13412759e7abc2e8be3a6c85e15f6c53e1f3c84", size = 535718, upload-time = "2026-11-09T21:09:01.783Z" },
488
+ { url = "https://files.pythonhosted.org/packages/91/8b/96e460653f3e2ad83d70328414394132d73d5655047c692ce7b69ae2f6c0/tornado-6.6.1-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:01dc73e3697eb94d78c42e03931ab621da97d12fdfb6339e64ff5a934b220fcf", size = 533376, upload-time = "2026-11-09T21:09:03.097Z" },
489
+ { url = "https://files.pythonhosted.org/packages/1a/1e/644bace0700e533235f01ffa68a7b5e3d6cc9eb7380e3929039d04b648b9/tornado-6.6.1-cp315-cp315t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:95bd4751357bef52aa655e236b9667ff054885de4b118e4ce9ba5c06e12ef5d0", size = 537696, upload-time = "2026-11-09T21:09:04.519Z" },
490
+ { url = "https://files.pythonhosted.org/packages/e6/0a/afccc23d1ed71bcb1ce4a5b6e0f61f82c7a0b275f3b377ee7aee6680a565/tornado-6.6.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:29bce3190c2973fcd2171c95eeab8bf06d2f7a7eb107455ce3e4662c704aecdb", size = 538796, upload-time = "2026-11-09T21:09:05.956Z" },
491
+ { url = "https://files.pythonhosted.org/packages/e5/24/69692f8ba851ed2738c2623eab592360d646f0a2e16b6deea16516aa8595/tornado-6.6.1-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b777fbe0bdb2c4dc764aadf5f70e9b23b2e536c339d61c799d3ea1b575a7c285", size = 538951, upload-time = "2026-11-09T21:09:07.298Z" },
492
+ { url = "https://files.pythonhosted.org/packages/00/82/234306b41b33600a470da7e595b8064b85e2f509f64f5c1d39387c0abbb8/tornado-6.6.1-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:15443805d6b7aa11610cc6c5be7e71b4a93369aeb2ca5a13c2def53a3af5ba45", size = 537861, upload-time = "2026-11-09T21:09:08.857Z" },
493
+ { url = "https://files.pythonhosted.org/packages/5b/87/6d13a60c320c0379cbfa4c2520b4ba076780c33e6a01ba3073fff74b71db/tornado-6.6.1-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b77ab23d1520c807d11e703e79b020d3bc3676a0f5ebc8531f46d3fac8aecb2f", size = 536178, upload-time = "2026-11-09T21:09:10.424Z" },
494
+ { url = "https://files.pythonhosted.org/packages/96/c7/e27f2a21e05d7c5aa9886db7368436e6436880b85349072988b4f62422e3/tornado-6.6.1-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:872249311539281c1e8a5d8d6f27f478bf705a9bd931bf374b6b31b05177dfda", size = 538491, upload-time = "2026-11-09T21:09:11.968Z" },
495
+ { url = "https://files.pythonhosted.org/packages/f3/c7/1f981336039c51d81ee6f895e3412178edc409bd709e38767365c55c0daa/tornado-6.6.1-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:08b808e8d3312c268f9fe1ffebfcfaaf342e7fe4ac40d219a7e1b58bac547d6f", size = 538491, upload-time = "2026-11-09T21:09:13.226Z" },
496
+ { url = "https://files.pythonhosted.org/packages/5d/4f/7dafc65726778ac148b68c91920605892e84bf0ffcc02890aaf1a7d0ba8d/tornado-6.6.1-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:8d475f4053c693b5c1483eb4845824129b0b51c65712e736b3c2ea1c8f6080cd", size = 537775, upload-time = "2026-11-09T21:09:14.697Z" },
497
+ { url = "https://files.pythonhosted.org/packages/a1/25/85c852307f9e49896b6dc5119f6a0131f5f6d97c478a687654c2c0c3f0f4/tornado-6.6.1-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:e923e75c9d641cdb8bbac60070a2dccdb684fc555af2bff48b0eaded0f88c2dc", size = 537798, upload-time = "2026-11-09T21:09:15.946Z" },
498
+ { url = "https://files.pythonhosted.org/packages/60/43/a37ec29b0f98c3c639da495e1d547d6c44c69a6727b9864cf149bf346433/tornado-6.6.1-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:a72f70b1aa630fa2106d39a025e2be75c272b7ec8233da94e2f407ea754cc32d", size = 537809, upload-time = "2026-11-09T21:09:17.265Z" },
499
+ { url = "https://files.pythonhosted.org/packages/3b/d4/13973391071552e03acb308d93f6deb4fb535a769a6bbdafdb4cafcb2f91/tornado-6.6.1-cp315-cp315t-win32.whl", hash = "sha256:2fbfd2510b6163b189773155a8246c025cb260ccc7cd12ad18c36c54f5617bb9", size = 535422, upload-time = "2026-11-09T21:09:18.525Z" },
500
+ { url = "https://files.pythonhosted.org/packages/19/94/c952b625904b63fdac5b747f2eeaca64ab5d36cdb8faff57effa57162d87/tornado-6.6.1-cp315-cp315t-win_amd64.whl", hash = "sha256:3c35091add5863feb9cf651851bb1b23592f1f9551b5dfed72837c83ea4e5b85", size = 535713, upload-time = "2026-11-09T21:09:20.061Z" },
501
+ { url = "https://files.pythonhosted.org/packages/f8/62/8d0c0c42f3346f3f2455738d3bc689bbd8efba38abf7b90ab2b8294eae83/tornado-6.6.1-cp315-cp315t-win_arm64.whl", hash = "sha256:065bc741478b168df9baf754956a3010c04d1330bb45a84833d807c29e11b257", size = 535719, upload-time = "2026-11-09T21:09:21.317Z" },
502
+ ]
@@ -1,51 +0,0 @@
1
- """Command line interface: ``mdbake build``."""
2
-
3
- from __future__ import annotations
4
-
5
- import logging
6
- from pathlib import Path
7
-
8
- import click
9
-
10
- from . import __version__
11
- from .builder import BuildError, build as build_site
12
- from .config import ConfigError, load_config
13
- from .middleware import MiddlewareError
14
-
15
-
16
- @click.group()
17
- @click.version_option(__version__, prog_name="mdbake")
18
- def main() -> None:
19
- """mdbake - a minimal Markdown to HTML documentation generator."""
20
-
21
-
22
- @main.command()
23
- @click.option("-f", "--config", "config_file", type=click.Path(dir_okay=False, path_type=Path),
24
- help="Config file (default: ./mdbake.yml if present).")
25
- @click.option("-d", "--docs-dir", type=click.Path(file_okay=False, path_type=Path),
26
- help="Directory with Markdown sources (overrides config).")
27
- @click.option("-o", "--site-dir", type=click.Path(file_okay=False, path_type=Path),
28
- help="Output directory (overrides config).")
29
- @click.option("--clean", is_flag=True, help="Delete site_dir before building.")
30
- @click.option("-s", "--strict", is_flag=True, help="Exit with an error if there were warnings.")
31
- @click.option("-v", "--verbose", is_flag=True, help="Verbose output.")
32
- @click.option("-q", "--quiet", is_flag=True, help="Only show errors.")
33
- def build(config_file: Path | None, docs_dir: Path | None, site_dir: Path | None,
34
- clean: bool, strict: bool, verbose: bool, quiet: bool) -> None:
35
- """Build the documentation site."""
36
- level = logging.ERROR if quiet else logging.DEBUG if verbose else logging.INFO
37
- logging.basicConfig(format="%(levelname)-7s %(message)s", level=level)
38
- try:
39
- config = load_config(config_file, docs_dir=docs_dir, site_dir=site_dir)
40
- site = build_site(config, clean=clean)
41
- except (ConfigError, BuildError, MiddlewareError) as exc:
42
- raise click.ClickException(str(exc)) from exc
43
- if site.warnings:
44
- msg = f"{len(site.warnings)} warning(s)"
45
- if strict:
46
- raise click.ClickException(f"Aborted: {msg} in strict mode")
47
- logging.getLogger("mdbake").info(msg)
48
-
49
-
50
- if __name__ == "__main__": # pragma: no cover
51
- main()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes