Skip to content

Replace the legacy toolchain with a native MkDocs lifecycle - #40

Merged
Alice39s merged 58 commits into
mainfrom
dev
Aug 11, 2026
Merged

Replace the legacy toolchain with a native MkDocs lifecycle#40
Alice39s merged 58 commits into
mainfrom
dev

Conversation

@Alice39s

Copy link
Copy Markdown
Contributor

Summary

  • replace the legacy Python 3.7/pip scripts with a Python 3.14, uv-managed package and a typed Typer CLI
  • replace the cache/ -> generated/ -> site/ staging pipeline with one native MkDocs plugin lifecycle reading directly from docs/
  • make development rebuilds incremental through MkDocs dirty reload, cached document scanning, and changed-image processing
  • generate navigation, directory indexes, contribution notices, redirects, llms.txt, Markdown copies, and optimized images without source-tree staging
  • centralize assets, add WebP-first rendering and minified production HTML, and remove generator fingerprinting
  • add per-page Markdown/copy actions and AI provider integrations, restore account documentation, and improve responsive article actions
  • add cross-platform launchers, an 82-test suite, Ruff/mdformat checks, and Ubuntu/macOS/Windows CI

Lifecycle

Command Behavior
uv run nmteam dev Runs MkDocs native dirty reload directly against docs/; only changed Markdown and images are reprocessed
uv run nmteam build Performs one strict production build directly into site/
uv run nmteam preview Quietly previews the production output and serves Markdown as text/plain; charset=utf-8
uv run nmteam check Runs Ruff, formatting verification, all tests, and a strict production build

The old generated mkdocs.yml, cache/, and generated/ layers no longer exist. mkdocs.yml is now the single tracked configuration source, with dynamic state supplied by nmteam-support plugin hooks.

Benchmarks

Measured on the same macOS host with isolated worktrees, identical repository content, warm dependencies, and interleaved old/new runs. Build numbers use seven runs; development numbers use three real Markdown edits; preview numbers use six alternating-order runs of 200 requests.

Scenario Before After Result
Production build, median 9.41 s 4.83 s 48.7% less time / 1.95x faster
Development startup, median 9.352 s 4.856 s 48.1% less time / 1.93x faster
Development incremental rebuild, median 10.078 s 0.776 s 92.3% less time / 12.98x faster
Development output 157 lines / 26,779 B 2 lines / 254 B 98.7% fewer lines / 99.1% fewer bytes
Preview output 203 lines / 13,953 B 2 lines / 254 B about 99% fewer lines
Preview throughput, 200 requests 1.417 s 1.419 s effectively unchanged
Intermediate output 9,576 KiB / 440 files none 100% eliminated

Four-way parallel image processing raises median peak build RSS from about 153.8 MiB to 235.4 MiB (+53.1%) in exchange for the build-time improvement. Two and eight worker configurations were also measured; four workers provided the preferred speed/memory balance.

Validation

  • uv run nmteam check
  • Ruff and formatting checks pass
  • 82 tests pass on Python 3.14.4
  • strict production build passes
  • generated site retains 376 files and the same 15,612 KiB final footprint
  • generated llms.txt matches the previous output exactly
  • Ubuntu, macOS, and Windows GitHub Actions pass
  • Cloudflare Pages deployment verified before opening this pull request

Merge policy

This pull request intentionally remains unmerged pending explicit approval.

Alice39s added 30 commits August 9, 2026 15:45
@agoudbg
agoudbg self-requested a review August 10, 2026 11:35
@Alice39s Alice39s self-assigned this Aug 10, 2026
@Alice39s Alice39s added enhancement New feature or request refactor Code restructuring without changing behavior ui Interface and styling work ai AI integration and LLM tooling tooling Build, CI and developer tooling labels Aug 10, 2026
Comment thread docs/nmbot-telegram/message-template.md Outdated
Comment thread docs/nmbot-telegram/message-template.md Outdated
Comment thread docs/nmbot-telegram/message-template.md Outdated
Comment thread assets/js/ai-tools.js Outdated
Comment thread assets/styles/ai-tools.css
Comment thread docs/nmbot-telegram/faq/cannot-log-in-to-panel.md Outdated
Comment thread docs/nmbot-telegram/faq/why-my-message-deleted.md Outdated
Comment thread docs/nmbot-telegram/update-log/2024-07.md
Comment thread docs/nmbot-telegram/update-log/previous-log.md Outdated
Comment thread docs/nmbot-telegram/update-log/previous-log.md Outdated

@Alice39s Alice39s left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review verdict: changes are required before merge.

I independently replayed all 11 existing review threads and expanded the same transformation classes across the exact main@b37e5a0dev@84e2105 diff. The seven attached findings are new and intentionally avoid duplicating the existing footnote, bold-list, mobile-menu, and editorial-star threads.

Evidence:

  • uv run nmteam check: 82 tests passed and the strict production build succeeded.
  • Source-to-rendered-DOM replay found 49 incompatible hard-break rewrites across 23 pages and a list item promoted to <h2>.
  • The built-site scan found three broken same-page links; one was already reported, while two more occur on the panel-launch page.
  • Every local page/static target exists, all 103 emitted raster files decode, and no additional missing-asset regression was found.

The green checks currently prove buildability, but they do not catch these rendered-content regressions or silent source corruption. Please add built-output semantic coverage while fixing the findings below.

Comment thread src/nmteam_support/scanner.py Outdated
Comment thread docs/nmbot-telegram/legal/privacy-policy.md
Comment thread docs/nmbot-telegram/message-template.md Outdated
Comment thread docs/nmbot-telegram/message-template.md Outdated
Comment thread docs/nmbot-telegram/update-log/2025-04.md Outdated
Comment thread docs/nmbot-telegram/panel/how-to-launch-panel.md Outdated
Comment thread assets/js/ai-tools.js Outdated
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploying nmteam-support with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1c43f50
Status: ✅  Deploy successful!
Preview URL: https://d8b69e20.nmbot-telegram-doc.pages.dev
Branch Preview URL: https://dev.nmbot-telegram-doc.pages.dev

View logs

@Alice39s
Alice39s requested a review from agoudbg August 11, 2026 11:37
@Alice39s
Alice39s merged commit 58a765a into main Aug 11, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai AI integration and LLM tooling enhancement New feature or request refactor Code restructuring without changing behavior tooling Build, CI and developer tooling ui Interface and styling work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants