md2site-cli 0.2.0__tar.gz → 0.3.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.
Files changed (312) hide show
  1. md2site_cli-0.3.0/.github/workflows/stress.yml +141 -0
  2. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/.gitignore +3 -1
  3. md2site_cli-0.3.0/CHANGELOG.md +101 -0
  4. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/PKG-INFO +59 -69
  5. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/README.md +52 -68
  6. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/THIRD_PARTY_LICENSES.md +34 -0
  7. md2site_cli-0.3.0/docs/AUDIT-0.3.md +184 -0
  8. md2site_cli-0.3.0/docs/TODO.md +47 -0
  9. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/agents.md +9 -13
  10. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/architecture.md +14 -11
  11. md2site_cli-0.3.0/docs/assets/gemini_generated_video_501f8495.mp4 +0 -0
  12. md2site_cli-0.3.0/docs/cli.md +34 -0
  13. md2site_cli-0.3.0/docs/configuration.md +100 -0
  14. md2site_cli-0.3.0/docs/decisions.md +43 -0
  15. md2site_cli-0.3.0/docs/diagnostics.md +152 -0
  16. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/index.md +2 -0
  17. md2site_cli-0.3.0/docs/link-resolution.md +58 -0
  18. md2site_cli-0.3.0/docs/markdown-extensions.md +139 -0
  19. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/00_V03_CONTEXT.md +27 -0
  20. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/19_v03_clean_links.md +46 -0
  21. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/20_v03_stress_harness_and_adversarial.md +52 -0
  22. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/21_v03_stress_fuzz_server_realworld.md +61 -0
  23. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/22_v03_scalability_and_perf.md +51 -0
  24. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/23_v03_inline_markdown_extensions.md +49 -0
  25. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/24_v03_admonitions_containers_tabs.md +40 -0
  26. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/25_v03_math.md +43 -0
  27. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/26_v03_site_metadata_and_files.md +48 -0
  28. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/27_v03_agent_features.md +41 -0
  29. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/28_v03_reader_polish_and_graph.md +42 -0
  30. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/29_v03_release_and_audit.md +36 -0
  31. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/PRD_v0.3_delta.md +135 -0
  32. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/README.md +60 -0
  33. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/findings/PREPACK_FINDINGS.md +67 -0
  34. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/findings/probe_gen.py +29 -0
  35. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/findings/probe_run_case.py +14 -0
  36. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/README.md +28 -0
  37. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/mkdocs_syntax/docs/admonitions.md +27 -0
  38. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/mkdocs_syntax/docs/assets/card.png +0 -0
  39. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/mkdocs_syntax/docs/code_group.md +13 -0
  40. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/mkdocs_syntax/docs/code_meta.md +21 -0
  41. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/mkdocs_syntax/docs/containers.md +30 -0
  42. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/mkdocs_syntax/docs/custom_ids.md +9 -0
  43. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/mkdocs_syntax/docs/deflist.md +8 -0
  44. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/mkdocs_syntax/docs/index.md +3 -0
  45. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/mkdocs_syntax/docs/inline.md +11 -0
  46. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/mkdocs_syntax/docs/math.md +19 -0
  47. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/mkdocs_syntax/docs/metadata.md +9 -0
  48. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/mkdocs_syntax/docs/metadata_fallback.md +5 -0
  49. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/mkdocs_syntax/docs/tabs.md +18 -0
  50. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/mkdocs_syntax/docs/toc_marker.md +13 -0
  51. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/mkdocs_syntax/docs/unterminated.md +2 -0
  52. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/mkdocs_syntax/expected.json +398 -0
  53. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/run_manifest.py +163 -0
  54. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/vitepress_links/docs/LICENSE +1 -0
  55. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/vitepress_links/docs/about/faq.md +5 -0
  56. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/vitepress_links/docs/about/team.md +3 -0
  57. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/vitepress_links/docs/ambiguous/foo/index.md +1 -0
  58. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/vitepress_links/docs/ambiguous/foo.md +1 -0
  59. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/vitepress_links/docs/ambiguous/links.md +3 -0
  60. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/vitepress_links/docs/api/index.md +5 -0
  61. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/vitepress_links/docs/api/v1.2.md +3 -0
  62. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/vitepress_links/docs/broken.md +7 -0
  63. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/vitepress_links/docs/guide/essentials/application.md +7 -0
  64. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/vitepress_links/docs/guide/index.md +6 -0
  65. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/vitepress_links/docs/guide/quick-start.md +9 -0
  66. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/vitepress_links/docs/guide/scaling-up/tooling.md +5 -0
  67. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/vitepress_links/docs/index.md +15 -0
  68. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/vitepress_links/docs/tutorial/step-1.md +4 -0
  69. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/vitepress_links/docs/tutorial/step-2.md +3 -0
  70. md2site_cli-0.3.0/docs/prompts/md2site-v0.3-prompt-pack/fixtures/vitepress_links/expected.json +270 -0
  71. md2site_cli-0.3.0/docs/publishing.md +72 -0
  72. md2site_cli-0.3.0/docs/reading-features.md +43 -0
  73. md2site_cli-0.3.0/docs/schema/check-output.schema.json +57 -0
  74. md2site_cli-0.3.0/docs/stress-testing.md +61 -0
  75. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/theming.md +11 -0
  76. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/pyproject.toml +17 -1
  77. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/__init__.py +1 -1
  78. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/assets.py +68 -26
  79. md2site_cli-0.3.0/src/md2site/build.py +406 -0
  80. md2site_cli-0.3.0/src/md2site/cli.py +684 -0
  81. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/config.py +249 -4
  82. md2site_cli-0.3.0/src/md2site/diagnostics.py +242 -0
  83. md2site_cli-0.3.0/src/md2site/diagnostics_catalog.py +339 -0
  84. md2site_cli-0.3.0/src/md2site/emoji_data.py +209 -0
  85. md2site_cli-0.3.0/src/md2site/explain.py +58 -0
  86. md2site_cli-0.3.0/src/md2site/ext_blocks.py +737 -0
  87. md2site_cli-0.3.0/src/md2site/ext_inline.py +736 -0
  88. md2site_cli-0.3.0/src/md2site/ext_math.py +667 -0
  89. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/frontmatter.py +111 -16
  90. md2site_cli-0.3.0/src/md2site/gitdates.py +111 -0
  91. md2site_cli-0.3.0/src/md2site/graph.py +247 -0
  92. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/hook.py +17 -1
  93. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/links.py +1063 -155
  94. md2site_cli-0.3.0/src/md2site/llms.py +455 -0
  95. md2site_cli-0.3.0/src/md2site/markdown.py +847 -0
  96. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/model.py +12 -4
  97. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/nav.py +53 -8
  98. md2site_cli-0.3.0/src/md2site/patches.py +577 -0
  99. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/paths.py +90 -22
  100. md2site_cli-0.3.0/src/md2site/render.py +1171 -0
  101. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/scanner.py +33 -20
  102. md2site_cli-0.3.0/src/md2site/search.py +207 -0
  103. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/server.py +1 -0
  104. md2site_cli-0.3.0/src/md2site/site_files.py +500 -0
  105. md2site_cli-0.3.0/src/md2site/skill/SKILL.md +51 -0
  106. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/slug.py +3 -2
  107. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/static/css/md2site.css +461 -5
  108. md2site_cli-0.3.0/src/md2site/static/js/app.js +588 -0
  109. md2site_cli-0.3.0/src/md2site/static/js/math-init.js +68 -0
  110. md2site_cli-0.3.0/src/md2site/static/js/nav-tree.js +248 -0
  111. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/static/js/search.js +137 -2
  112. md2site_cli-0.3.0/src/md2site/static/vendor/katex.min.js +1 -0
  113. md2site_cli-0.3.0/src/md2site/tags.py +184 -0
  114. md2site_cli-0.3.0/src/md2site/templates/404.html +9 -0
  115. md2site_cli-0.3.0/src/md2site/templates/404_offline.html +37 -0
  116. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/templates/base.html +42 -1
  117. md2site_cli-0.3.0/src/md2site/templates/page.html +57 -0
  118. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/templates/partials/nav.html +4 -0
  119. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/titles.py +3 -0
  120. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/watcher.py +75 -43
  121. md2site_cli-0.3.0/src/md2site/wikilinks.py +466 -0
  122. md2site_cli-0.3.0/tests/conftest.py +38 -0
  123. md2site_cli-0.3.0/tests/fixtures/math_corpus.md +111 -0
  124. md2site_cli-0.3.0/tests/fixtures/mkdocs_syntax/docs/admonitions.md +27 -0
  125. md2site_cli-0.3.0/tests/fixtures/mkdocs_syntax/docs/assets/card.png +0 -0
  126. md2site_cli-0.3.0/tests/fixtures/mkdocs_syntax/docs/code_group.md +13 -0
  127. md2site_cli-0.3.0/tests/fixtures/mkdocs_syntax/docs/code_meta.md +21 -0
  128. md2site_cli-0.3.0/tests/fixtures/mkdocs_syntax/docs/containers.md +30 -0
  129. md2site_cli-0.3.0/tests/fixtures/mkdocs_syntax/docs/custom_ids.md +9 -0
  130. md2site_cli-0.3.0/tests/fixtures/mkdocs_syntax/docs/deflist.md +8 -0
  131. md2site_cli-0.3.0/tests/fixtures/mkdocs_syntax/docs/index.md +3 -0
  132. md2site_cli-0.3.0/tests/fixtures/mkdocs_syntax/docs/inline.md +11 -0
  133. md2site_cli-0.3.0/tests/fixtures/mkdocs_syntax/docs/math.md +19 -0
  134. md2site_cli-0.3.0/tests/fixtures/mkdocs_syntax/docs/metadata.md +9 -0
  135. md2site_cli-0.3.0/tests/fixtures/mkdocs_syntax/docs/metadata_fallback.md +5 -0
  136. md2site_cli-0.3.0/tests/fixtures/mkdocs_syntax/docs/tabs.md +18 -0
  137. md2site_cli-0.3.0/tests/fixtures/mkdocs_syntax/docs/toc_marker.md +13 -0
  138. md2site_cli-0.3.0/tests/fixtures/mkdocs_syntax/docs/unterminated.md +2 -0
  139. md2site_cli-0.3.0/tests/fixtures/mkdocs_syntax/expected.json +398 -0
  140. md2site_cli-0.3.0/tests/fixtures/vitepress_links/docs/LICENSE +1 -0
  141. md2site_cli-0.3.0/tests/fixtures/vitepress_links/docs/about/faq.md +5 -0
  142. md2site_cli-0.3.0/tests/fixtures/vitepress_links/docs/about/team.md +3 -0
  143. md2site_cli-0.3.0/tests/fixtures/vitepress_links/docs/ambiguous/foo/index.md +1 -0
  144. md2site_cli-0.3.0/tests/fixtures/vitepress_links/docs/ambiguous/foo.md +1 -0
  145. md2site_cli-0.3.0/tests/fixtures/vitepress_links/docs/ambiguous/links.md +3 -0
  146. md2site_cli-0.3.0/tests/fixtures/vitepress_links/docs/api/index.md +5 -0
  147. md2site_cli-0.3.0/tests/fixtures/vitepress_links/docs/api/v1.2.md +3 -0
  148. md2site_cli-0.3.0/tests/fixtures/vitepress_links/docs/broken.md +7 -0
  149. md2site_cli-0.3.0/tests/fixtures/vitepress_links/docs/guide/essentials/application.md +7 -0
  150. md2site_cli-0.3.0/tests/fixtures/vitepress_links/docs/guide/index.md +6 -0
  151. md2site_cli-0.3.0/tests/fixtures/vitepress_links/docs/guide/quick-start.md +9 -0
  152. md2site_cli-0.3.0/tests/fixtures/vitepress_links/docs/guide/scaling-up/tooling.md +5 -0
  153. md2site_cli-0.3.0/tests/fixtures/vitepress_links/docs/index.md +15 -0
  154. md2site_cli-0.3.0/tests/fixtures/vitepress_links/docs/tutorial/step-1.md +4 -0
  155. md2site_cli-0.3.0/tests/fixtures/vitepress_links/docs/tutorial/step-2.md +3 -0
  156. md2site_cli-0.3.0/tests/fixtures/vitepress_links/expected.json +270 -0
  157. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/golden/01_guide_02_wikilinks.html +1 -1
  158. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/golden/01_guide_index.html +5 -5
  159. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/golden/index.html +1 -1
  160. md2site_cli-0.3.0/tests/implemented_features.txt +20 -0
  161. md2site_cli-0.3.0/tests/stress/README.md +51 -0
  162. md2site_cli-0.3.0/tests/stress/__init__.py +1 -0
  163. md2site_cli-0.3.0/tests/stress/adversarial.py +292 -0
  164. md2site_cli-0.3.0/tests/stress/baseline.json +418 -0
  165. md2site_cli-0.3.0/tests/stress/browser_README.md +21 -0
  166. md2site_cli-0.3.0/tests/stress/budgets.toml +230 -0
  167. md2site_cli-0.3.0/tests/stress/conftest.py +159 -0
  168. md2site_cli-0.3.0/tests/stress/corpora.toml +53 -0
  169. md2site_cli-0.3.0/tests/stress/corpus.py +237 -0
  170. md2site_cli-0.3.0/tests/stress/harness.py +370 -0
  171. md2site_cli-0.3.0/tests/stress/regressions/README.md +1 -0
  172. md2site_cli-0.3.0/tests/stress/report.py +123 -0
  173. md2site_cli-0.3.0/tests/stress/strategies.py +204 -0
  174. md2site_cli-0.3.0/tests/stress/test_adversarial_inputs.py +138 -0
  175. md2site_cli-0.3.0/tests/stress/test_browser_smoke.py +205 -0
  176. md2site_cli-0.3.0/tests/stress/test_chaos_concurrency.py +204 -0
  177. md2site_cli-0.3.0/tests/stress/test_fs_edges.py +98 -0
  178. md2site_cli-0.3.0/tests/stress/test_fuzz_properties.py +395 -0
  179. md2site_cli-0.3.0/tests/stress/test_realworld.py +378 -0
  180. md2site_cli-0.3.0/tests/stress/test_redos.py +262 -0
  181. md2site_cli-0.3.0/tests/stress/test_scaling.py +260 -0
  182. md2site_cli-0.3.0/tests/stress/test_server_stress.py +321 -0
  183. md2site_cli-0.3.0/tests/stress/test_watch_stress.py +333 -0
  184. md2site_cli-0.3.0/tests/stress/test_z_baseline.py +52 -0
  185. md2site_cli-0.3.0/tests/test_clean_links.py +879 -0
  186. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_cli_build_init_check.py +40 -0
  187. md2site_cli-0.3.0/tests/test_diagnostics_catalog.py +112 -0
  188. md2site_cli-0.3.0/tests/test_ext_blocks.py +275 -0
  189. md2site_cli-0.3.0/tests/test_ext_inline.py +501 -0
  190. md2site_cli-0.3.0/tests/test_ext_math.py +225 -0
  191. md2site_cli-0.3.0/tests/test_fixture_manifests.py +280 -0
  192. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_frontmatter.py +34 -0
  193. md2site_cli-0.3.0/tests/test_graph.py +197 -0
  194. md2site_cli-0.3.0/tests/test_llms.py +157 -0
  195. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_markdown.py +10 -6
  196. md2site_cli-0.3.0/tests/test_markdown_tasklist_and_brackets.py +80 -0
  197. md2site_cli-0.3.0/tests/test_patches_and_fix.py +305 -0
  198. md2site_cli-0.3.0/tests/test_reader_features.py +373 -0
  199. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_readme_and_docs.py +29 -0
  200. md2site_cli-0.3.0/tests/test_search_sharding.py +282 -0
  201. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_site_crawl.py +11 -6
  202. md2site_cli-0.3.0/tests/test_site_metadata.py +578 -0
  203. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_skill_and_hook.py +8 -2
  204. md2site_cli-0.3.0/tests/test_suggestion_quality.py +105 -0
  205. md2site_cli-0.3.0/tests/test_theme_contrast.py +166 -0
  206. md2site_cli-0.3.0/tests/test_wikilink_cache.py +89 -0
  207. md2site_cli-0.3.0/tests/test_windowed_nav.py +205 -0
  208. md2site_cli-0.2.0/CHANGELOG.md +0 -43
  209. md2site_cli-0.2.0/docs/TODO.md +0 -29
  210. md2site_cli-0.2.0/docs/cli.md +0 -31
  211. md2site_cli-0.2.0/docs/configuration.md +0 -54
  212. md2site_cli-0.2.0/docs/decisions.md +0 -24
  213. md2site_cli-0.2.0/docs/link-resolution.md +0 -52
  214. md2site_cli-0.2.0/src/md2site/build.py +0 -152
  215. md2site_cli-0.2.0/src/md2site/cli.py +0 -354
  216. md2site_cli-0.2.0/src/md2site/diagnostics.py +0 -167
  217. md2site_cli-0.2.0/src/md2site/markdown.py +0 -408
  218. md2site_cli-0.2.0/src/md2site/render.py +0 -306
  219. md2site_cli-0.2.0/src/md2site/search.py +0 -96
  220. md2site_cli-0.2.0/src/md2site/skill/SKILL.md +0 -50
  221. md2site_cli-0.2.0/src/md2site/static/js/app.js +0 -301
  222. md2site_cli-0.2.0/src/md2site/templates/page.html +0 -13
  223. md2site_cli-0.2.0/src/md2site/wikilinks.py +0 -314
  224. md2site_cli-0.2.0/tests/conftest.py +0 -21
  225. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/.gitattributes +0 -0
  226. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/.github/workflows/ci.yml +0 -0
  227. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/.github/workflows/pages.yml +0 -0
  228. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/.github/workflows/release.yml +0 -0
  229. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/AGENTS.md +0 -0
  230. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/CLAUDE.md +0 -0
  231. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/LICENSE +0 -0
  232. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/AUDIT.md +0 -0
  233. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/PRD.md +0 -0
  234. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/assets/md2site-overview.jpg +0 -0
  235. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/custom.css +0 -0
  236. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/md2site.config.json +0 -0
  237. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/00_MASTER_CONTEXT.md +0 -0
  238. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/01_scaffold_and_cli_skeleton.md +0 -0
  239. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/02_config_scanner_titles_nav.md +0 -0
  240. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/03_markdown_engine.md +0 -0
  241. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/04_link_rewriter_and_diagnostics.md +0 -0
  242. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/05_templates_theme_ui.md +0 -0
  243. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/06_search_mermaid_assets.md +0 -0
  244. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/07_build_init_check_watch.md +0 -0
  245. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/08_agent_skill_and_hooks.md +0 -0
  246. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/09_tests_fixtures_perf.md +0 -0
  247. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/10_readme_docs_image.md +0 -0
  248. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/11_ci_release_ship.md +0 -0
  249. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/12_final_audit.md +0 -0
  250. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/13_v02_query_params_in_doc_links.md +0 -0
  251. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/14_v02_explicit_nav_override.md +0 -0
  252. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/15_v02_large_file_perf_and_search_bounds.md +0 -0
  253. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/16_v02_exact_inline_diagnostic_lines.md +0 -0
  254. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/17_v02_external_out_relative_repo_links.md +0 -0
  255. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/18_v02_release_and_audit.md +0 -0
  256. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/PRD_v1.2.md +0 -0
  257. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/README.md +0 -0
  258. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/prompts/assets/md2site-overview.jpg +0 -0
  259. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/quickstart.md +0 -0
  260. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/docs/search-and-mermaid.md +0 -0
  261. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/__main__.py +0 -0
  262. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/init_cmd.py +0 -0
  263. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/static/js/mermaid-init.js +0 -0
  264. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/static/js/theme-init.js +0 -0
  265. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/static/vendor/mermaid.min.js +0 -0
  266. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/templates/landing.html +0 -0
  267. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/templates/partials/breadcrumbs.html +0 -0
  268. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/templates/partials/prevnext.html +0 -0
  269. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/src/md2site/templates/partials/toc.html +0 -0
  270. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/README.md +0 -0
  271. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_broken/docs/assets/logo.png +0 -0
  272. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_broken/docs/bad_fm.md +0 -0
  273. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_broken/docs/guide/README.md +0 -0
  274. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_broken/docs/guide/index.md +0 -0
  275. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_broken/docs/guide/setup.md +0 -0
  276. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_broken/docs/guide/shared.md +0 -0
  277. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_broken/docs/index.md +0 -0
  278. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_broken/docs/md2site.config.json +0 -0
  279. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_broken/docs/shared.md +0 -0
  280. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_broken/src/app.py +0 -0
  281. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_full/assets/logo.png +0 -0
  282. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_full/docs/01_guide/01_setup.md +0 -0
  283. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_full/docs/01_guide/02_wikilinks.md +0 -0
  284. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_full/docs/01_guide/data.json +0 -0
  285. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_full/docs/01_guide/diagram.png +0 -0
  286. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_full/docs/01_guide/index.md +0 -0
  287. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_full/docs/02_legacy/README.md +0 -0
  288. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_full/docs/02_legacy/caf/303/251 guide.md" +0 -0
  289. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_full/docs/02_legacy/secret.md +0 -0
  290. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_full/docs/02_legacy/wip.md +0 -0
  291. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_full/docs/custom.css +0 -0
  292. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_full/docs/index.md +0 -0
  293. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_full/docs/md2site.config.json +0 -0
  294. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_full/pyproject.toml +0 -0
  295. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/fixtures/site_full/src/server.py +0 -0
  296. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/golden/01_guide_01_setup.html +0 -0
  297. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/golden/02_legacy_cafe_guide.html +0 -0
  298. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/golden/02_legacy_index.html +0 -0
  299. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_cli_smoke.py +0 -0
  300. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_config.py +0 -0
  301. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_cross_platform.py +0 -0
  302. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_golden_and_determinism.py +0 -0
  303. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_links_and_diagnostics.py +0 -0
  304. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_paths.py +0 -0
  305. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_perf.py +0 -0
  306. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_release_metadata.py +0 -0
  307. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_render.py +0 -0
  308. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_scanner_nav.py +0 -0
  309. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_search_mermaid_assets.py +0 -0
  310. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_server_and_watcher.py +0 -0
  311. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_slug.py +0 -0
  312. {md2site_cli-0.2.0 → md2site_cli-0.3.0}/tests/test_titles.py +0 -0
@@ -0,0 +1,141 @@
1
+ name: Stress
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "17 3 * * *"
6
+ workflow_dispatch:
7
+ inputs:
8
+ profile:
9
+ description: Stress profile (quick or full)
10
+ required: true
11
+ default: quick
12
+ type: choice
13
+ options:
14
+ - quick
15
+ - full
16
+ pull_request:
17
+ types: [labeled, synchronize, opened, reopened]
18
+
19
+ permissions:
20
+ contents: read
21
+
22
+ env:
23
+ STRESS_TIME_FACTOR: "2.0"
24
+
25
+ jobs:
26
+ stress-linux:
27
+ name: Linux (${{ github.event.inputs.profile || (github.event_name == 'schedule' && 'full' || 'quick') }})
28
+ runs-on: ubuntu-latest
29
+ timeout-minutes: 45
30
+ if: >-
31
+ github.event_name != 'pull_request' ||
32
+ contains(github.event.pull_request.labels.*.name, 'stress')
33
+ steps:
34
+ - uses: actions/checkout@v7
35
+
36
+ - uses: actions/setup-python@v7
37
+ with:
38
+ python-version: "3.12"
39
+
40
+ - name: Install package with dev and stress extras
41
+ run: python -m pip install --upgrade pip && pip install -e ".[dev,stress]"
42
+
43
+ - name: Determine stress profile
44
+ id: cfg
45
+ shell: bash
46
+ run: |
47
+ if [ "${{ github.event_name }}" = "schedule" ]; then
48
+ echo "profile=full" >> "$GITHUB_OUTPUT"
49
+ elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
50
+ echo "profile=${{ github.event.inputs.profile }}" >> "$GITHUB_OUTPUT"
51
+ else
52
+ echo "profile=quick" >> "$GITHUB_OUTPUT"
53
+ fi
54
+
55
+ - name: Cache real-world stress corpora
56
+ uses: actions/cache@v4
57
+ with:
58
+ path: ~/.cache/md2site-stress
59
+ key: stress-corpora-v1-${{ hashFiles('tests/stress/corpora.toml') }}
60
+
61
+ - name: Run stress suite (${{ steps.cfg.outputs.profile }})
62
+ env:
63
+ MD2SITE_HYPOTHESIS_PROFILE: ${{ steps.cfg.outputs.profile == 'full' && 'nightly' || 'ci' }}
64
+ run: |
65
+ pytest -m "stress and not browser" --stress-profile "${{ steps.cfg.outputs.profile }}" -v
66
+
67
+ - name: Run real-world corpora ratchets
68
+ if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
69
+ run: pytest -m realworld -v
70
+
71
+ - name: Generate Markdown stress summary
72
+ if: always()
73
+ run: python tests/stress/report.py tests/stress/stress-report.json --out stress-report.md
74
+
75
+ - name: Upload stress artifacts
76
+ if: always()
77
+ uses: actions/upload-artifact@v7
78
+ with:
79
+ name: stress-report-linux
80
+ path: |
81
+ tests/stress/stress-report.json
82
+ stress-report.md
83
+ tests/stress/regressions/
84
+ if-no-files-found: ignore
85
+
86
+ stress-cross-platform:
87
+ name: ${{ matrix.os }} (fs + server quick)
88
+ runs-on: ${{ matrix.os }}
89
+ timeout-minutes: 25
90
+ if: >-
91
+ github.event_name != 'pull_request' ||
92
+ contains(github.event.pull_request.labels.*.name, 'stress')
93
+ strategy:
94
+ fail-fast: false
95
+ matrix:
96
+ os: [macos-latest, windows-latest]
97
+ steps:
98
+ - uses: actions/checkout@v7
99
+
100
+ - uses: actions/setup-python@v7
101
+ with:
102
+ python-version: "3.12"
103
+
104
+ - name: Install package with dev and stress extras
105
+ run: python -m pip install --upgrade pip && pip install -e ".[dev,stress]"
106
+
107
+ - name: Run filesystem-edge and server quick stress tests
108
+ run: |
109
+ pytest -m stress tests/stress/test_fs_edges.py tests/stress/test_server_stress.py --stress-profile quick -v
110
+
111
+ - name: Upload stress report
112
+ if: always()
113
+ uses: actions/upload-artifact@v7
114
+ with:
115
+ name: stress-report-${{ matrix.os }}
116
+ path: tests/stress/stress-report.json
117
+ if-no-files-found: ignore
118
+
119
+ browser-smoke:
120
+ name: Linux Chromium browser smoke
121
+ runs-on: ubuntu-latest
122
+ timeout-minutes: 15
123
+ if: >-
124
+ github.event_name != 'pull_request' ||
125
+ contains(github.event.pull_request.labels.*.name, 'stress')
126
+ steps:
127
+ - uses: actions/checkout@v7
128
+
129
+ - uses: actions/setup-python@v7
130
+ with:
131
+ python-version: "3.12"
132
+
133
+ - name: Install package with dev, stress, and browser extras
134
+ run: python -m pip install --upgrade pip && pip install -e ".[dev,stress,browser]"
135
+
136
+ - name: Install Chromium browser binary
137
+ run: python -m playwright install --with-deps chromium
138
+
139
+ - name: Run headless file:// browser smoke tests
140
+ run: pytest -m browser -v
141
+
@@ -21,8 +21,10 @@ env/
21
21
  .coverage
22
22
  htmlcov/
23
23
 
24
- # Generated docs output
24
+ # Generated docs output & stress reports
25
25
  _site/
26
+ tests/stress/stress-report.json
27
+ stress-report.md
26
28
 
27
29
  # Editors / OS
28
30
  .vscode/
@@ -0,0 +1,101 @@
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/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.3.0] - 2026-12-06
11
+
12
+ ### Added
13
+
14
+ - Clean, extensionless, `.html`/`.htm`, dotted-name (e.g. `/api/v1.2`), and trailing-slash directory link resolution controlled by `"link_style": "auto"` (default) vs `"strict"` (v0.2 behavior) in `md2site.config.json`.
15
+ - Diagnostic `MD2S012` warning (emitted once per source page + target) when an extensionless link resolves ambiguously because both `P.md` and `P/index.md` exist (`P.md` takes precedence).
16
+ - Classification of protocol-relative (`//cdn/x`) URLs as external links and `javascript:` / `data:` URIs as ignored non-local schemes, plus top-of-page `#` anchors without false `MD2S005` warnings.
17
+ - Verbatim regression corpora (`vitepress_links`, `mkdocs_syntax`), `tests/implemented_features.txt` feature gate, and pytest manifest runner (`tests/test_fixture_manifests.py`).
18
+ - Opt-in subprocess stress & adversarial test suite (`tests/stress/`, `pip install -e ".[dev,stress]"`) covering data-driven TOML budgets (`budgets.toml`), scaling benchmarks (250–8,000 pages + log-log slope checks), hostile Markdown catalog, AST-audited ReDoS linearity checks, SIGKILL/concurrency/mutation chaos tests, filesystem edge cases, baseline regression guard, and `docs/stress-testing.md`.
19
+ - Property-based Hypothesis fuzz suite (`tests/stress/test_fuzz_properties.py`, 10 parser/linker/search/determinism invariants across `ci` and `nightly` profiles) plus `tests/stress/regressions/`.
20
+ - Hostile HTTP dev-server & live-reload SSE stress suite (`tests/stress/test_server_stress.py`) and 500-page `watch` storm stress suite (`tests/stress/test_watch_stress.py`).
21
+ - Pinned real-world OSS documentation regression ratchet (`tests/stress/corpora.toml`, `tests/stress/test_realworld.py`) with site crawler and rendered-article syntax-leak oracle (`vuejs/docs` reduced from `754` total warnings / `577` `MD2S001` to `7` warnings / `0` `MD2S001`; `mkdocs-material` builds with `0` errors and `0` syntax leaks).
22
+ - Optional Playwright `file://` headless browser smoke suite (`pip install -e ".[browser]"`, `tests/stress/test_browser_smoke.py`), Markdown summary renderer (`tests/stress/report.py`), and `.github/workflows/stress.yml`.
23
+ - Windowed sidebar navigation (`nav_mode`: `"auto"`/`"full"`/`"windowed"`, `nav_window_threshold`, `nav_sibling_limit`) generating bounded sibling trees, synthetic directory `index.html` fallback pages, and lazy `assets/nav-tree.js` + `assets/nav-data.js` hydration over `file://`.
24
+ - Sharded search index emission above `search.shard_threshold_bytes` (`400000` default) splitting metadata (`assets/search-index-meta.js`) from ~200 KB body shards (`assets/search-body-N.js`) loaded asynchronously on modal open.
25
+ - Bounded front matter scanning (`max_front_matter_bytes`: `262144` default) and grouped/capped terminal diagnostics (`max_diagnostics_shown`: `200` per code default with `(+N more on this page)` repeat collapsing while keeping `--json` complete).
26
+ - Inline Markdown authoring extensions: bare-URL/email autolinks (`linkify`), `==mark==`, `~sub~`, `^sup^` (`inline_extras`), ~175 built-in emoji shortcodes (`emoji` in `emoji_data.py`), definition lists (`<dl><dt><dd>`), custom heading IDs `{#custom-id}` with upfront reservation and `MD2S013` duplicate-ID diagnostics, standalone `[TOC]` / fallback `[[toc]]` inline contents (`toc_marker`, `toc_depth`), and rich code-fence metadata (`title`, `{lines}`, `hl_lines`, `showLineNumbers`, `linenums`) with non-copied line numbers (`docs/markdown-extensions.md`).
27
+ - Rendered GFM strikethrough (`~~…~~`) as `<del>` for CommonMark/GFM manifest parity.
28
+ - Block authoring extensions in `ext_blocks.py`: MkDocs admonitions (`!!!`, `???`, `???+`, `inline`/`end` modifiers, empty titles), VitePress containers (`::: type`, `details`, `v-pre`/`raw`, `code-group`), unified `.callout` styling with `data-callout` hooks, `MD2S015` warnings on unterminated containers and nesting limit overflow, and accessible content tabs (`=== "Label"`) with `ArrowLeft`/`ArrowRight`/`Home`/`End` navigation, cross-group sync, `localStorage["md2site-tabs"]` persistence, no-JS stacked fallback, and print expansion.
29
+ - TeX math authoring in `ext_math.py`: Pandoc-style `$…$`, `$$…$$`, `\(...\)`, `\[…\]`, and ```` ```math ```` fenced blocks with table-cell `|` pipe protection, `math.max_length` (`4000` default) emitting `MD2S014` and falling back to literal text, `math.macros` forwarding, and conditional offline rendering via vendored KaTeX `0.19.1` (`output: "mathml"`, batched loading, monospace no-JS fallback, emitted only when needed).
30
+ - Site & page metadata in `site_files.py`: configurable `site_url`, BCP-47 `lang` (with per-page front-matter override and automatic RTL `dir="rtl"`), `favicon` (emoji/ZWJ inline SVG data URI, copied local file with MIME type, or external URL), `description` (front matter → first paragraph after H1 truncated at 160 chars → site fallback), `social_image` / page `image`, `canonical`, `noindex`, Open Graph & Twitter Card tags, `generator` meta, and Markdown `<img>` `width`/`height` header inspection plus `loading="lazy" decoding="async"` on 2nd+ images.
31
+ - Publishing & root site files: `404.html` (full-chrome `site_url`-rooted when deployed, minimal self-contained offline fallback when `site_url` is unset), XML `sitemap.xml` (respecting `date`/`updated` and excluding drafts/`noindex`/`404.html`), auto-generated `robots.txt` (deferring to user-provided `docs/robots.txt`), `.nojekyll` toggle (`nojekyll: true` default), root passthrough copying (`CNAME`, `favicon.ico`, `_headers`, `_redirects`, `humans.txt`, `ads.txt`, `.well-known/**`), and `docs/publishing.md`.
32
+ - Single-source-of-truth diagnostics catalog in `diagnostics_catalog.py` (`MD2S001`–`MD2S015`), generated `docs/diagnostics.md` + synced `README.md` / `SKILL.md` tables, `md2site explain [CODE|--list] [--json]`, and `docs/schema/check-output.schema.json` (JSON Schema draft 2020-12 preserving `"version": 1`).
33
+ - High-confidence patch suggestions (`md2site check --suggest-patch`) and atomic BOM/CRLF-preserving auto-fix (`md2site fix [--write] [--force] [--json]`) in `patches.py` (capped at `500` patches per run, skipping code fences and ambiguous/low-confidence candidates, and guarding dirty git trees unless `--force`), plus `md2site explain` & patch hints in `md2site hook`.
34
+ - Agent-readable `llms.txt`, optional `llms-full.txt` (`llms.full: "auto"` under `llms.max_full_bytes: 2000000`), and front-matter-stripped `<page>.md` copies with `.md` link rewriting in `llms.py`, plus refreshed `skill/SKILL.md` and `docs/agents.md`.
35
+ - Internal page link graph builder (`graph.py`) and `md2site graph [PATH] [--orphans] [--dead-ends] [--top N] [--json] [--dot]` reporting nodes, edges, non-home orphans, dead ends, and top-linked pages.
36
+ - Reader polish & metadata features (`docs/reading-features.md`): bounded article **Backlinks** panel (`backlinks: true`, 20 inline + `<details>`), `edit_url` / `remote_repo_url`-derived Edit links (with `edit: false` opt-out), single-pass streaming `git_dates` (`git log`, feeding article `<time>` and `sitemap.xml` `<lastmod>`), static `tags/index.html` + `tags/<slug>.html` generation with `MD2S008` slug-collision warnings and footer `.tag-chip` links, native `<dialog>` image lightbox (`lightbox: true`, `.no-lightbox` opt-out), `/` search shortcut + tag chips in results, and heading `#` copy-URL announcements.
37
+
38
+ ### Fixed
39
+
40
+ - Detect Unicode NFC/NFD filename normalization collisions (e.g., `café.md` vs `cafe\u0301.md`) in `assign_out_rels()` and emit `MD2S008` instead of risking silent overwrites on macOS/APFS.
41
+ - Forward directory `created`, `deleted`, and `moved` filesystem events in `_WatchdogHandler` (`src/md2site/watcher.py`) so folder renames and removals trigger watcher rebuilds cleanly.
42
+ - Cache `SiteIndex`, `RenderSession`, and `page_by_src` inside `WatchSession` and resolve probe tokens cleanly so single-page incremental rebuilds at 1,000 pages complete in <= 150 ms.
43
+ - Adjusted light-mode callout (`#15803d` tip, `#b45309` warning, `#b91c1c` caution/`--broken-color`) and dark-mode `.skip-link` foreground tokens in `md2site.css` so all default palette pairs clear WCAG 2.1 AA (`>= 4.5:1`), verified in `tests/test_theme_contrast.py`.
44
+ - Reject query strings, fragments, and embedded `user:pass@` credentials in `site_url` validation (`src/md2site/config.py`), and refuse `md2site fix --write` cleanly with exit `2` on read-only target files (`src/md2site/patches.py`).
45
+
46
+ ### Performance
47
+
48
+ - Precomputed O(1) string-keyed lookup tables (`CleanLinkTables`) built once per site index (`by_out_path`, `by_clean_file`, `dir_index_map`, and scan file/directory sets), eliminating per-link `pathlib.Path.relative_to()` and filesystem probes for intra-docs links.
49
+ - Eliminated O(N^2) bottlenecks across 8,000-page scaling and adversarial stress cases (`4,000` pages dropped from `~67 s` / `~465 KB` HTML per page to `7.89 s` / `19.2 KB` per page; `8,000` pages builds in `15.81 s` with `137.1 MB` peak RSS): trigram suggestion shortlister (`links10k_tree3k`), memoized wikilink/embed resolution (`wikilink_ambig`), O(N) level-indexed tasklists and unclosed bracket/wikilink memoization (`tasklist10k`, `brackets200k`, `wikiopen50k`, `embedopen30k`), single-read/scan page body reuse & bounded front matter (`fm_unclosed5mb`), `@dataclass(slots=True)` + streaming `--json` diagnostics (`diag_flood_100k`), string-cached URL prefix resolution (`paths.py`), shared Jinja `RenderSession` template context, and lazy CLI subcommand imports.
50
+
51
+ ### Migration Notes
52
+
53
+ - Default `link_style` changed from strict `.md`-only matching to `"auto"` (extensionless, clean directory, and `.html`/`.htm` links resolve automatically). Set `"link_style": "strict"` in `md2site.config.json` to preserve v0.2 behavior.
54
+ - Ambiguous extensionless links where both `foo.md` and `foo/index.md` exist now emit warning `MD2S012` (resolving to `foo.md`).
55
+ - Sites above `150` pages automatically switch to windowed navigation (`nav_mode: "auto"`), keeping per-page HTML size bounded and writing lazy sidebar data to `assets/nav-data.js`. Set `"nav_mode": "full"` to render the complete sidebar tree inline.
56
+ - Search indexes exceeding `400,000` bytes automatically shard into `assets/search-index-meta.js` + `assets/search-body-N.js`; custom static file scripts no longer need changes because `assets/search.js` handles both modes transparently.
57
+ - Inline/block authoring syntax (`$...$` TeX math, `!!!` admonitions, `:::` containers, `===` tabs, `==mark==`, `~sub~`, `^sup^`, `:emoji:` shortcodes, bare autolinks, `llms.txt`, `tags/`, `backlinks`, `lightbox`, `.nojekyll`) is enabled by default. Any group can be disabled in `md2site.config.json` (`docs/configuration.md`). `git_dates` defaults to `false` to avoid shelling out to `git` during fast local builds unless explicitly enabled.
58
+
59
+ ### Known Limitations
60
+
61
+ - Single-directory flat sites with `10,000+` sibling pages remain ~437 KB on the root `index.html` under windowed nav (tracked in `docs/TODO.md` as a P2 follow-up).
62
+ - Upstream generated plugin config anchors (such as PyMdown `plugins/*.md#config.*`) and nested YAML front-matter lists/comments in third-party corpora still emit `MD2S005` / `MD2S009` warnings.
63
+ - Headless Playwright browser smoke tests (`tests/stress/test_browser_smoke.py`) require optional `[browser]` Playwright + Chromium installation and were not run in CI containers without browser binaries.
64
+
65
+
66
+ ## [0.2.0] - 2026-12-05
67
+
68
+ ### Added
69
+
70
+ - Optional explicit `"nav"` ordering and hierarchy override in `md2site.config.json` (leaf paths, `"dir/"` auto-expansion sections, custom labels, grouped sections, and `MD2S001` diagnostics for missing nav targets; unlisted pages stay built and searchable).
71
+ - Exact 1-based inline source line numbers for diagnostics (`MD2S001`–`MD2S007`, `MD2S010`, `MD2S011`) across multi-line paragraphs, lists, GFM tables, GitHub callouts, and YAML front-matter offsets.
72
+ - Code highlighting size bound (`max_highlight_bytes`, default `262144` / 256 KiB, `0` disables) with clean `<pre><code>` fallback on oversized fences.
73
+ - Optional deterministic search index byte budget (`search.max_index_bytes`, default `0` unlimited) that trims page body snippets fairly before headings/entries.
74
+ - Diagnostic `MD2S011` and graceful fallback when `output_dir` / `--out` cannot reach `repo_root` across drives/filesystems (preferring `remote_repo_url` when set, otherwise `file:///` URI with once-per-build `MD2S011`).
75
+
76
+ ### Fixed
77
+
78
+ - Preserved `?query` parameters (while keeping percent-encoded literal `?` filenames like `why%3F.md`) across local `.md` links, doc assets, images, and `repo_file` links (`relative`, `remote`, `auto`).
79
+ - Optimized block-level map shifting, linkless inline-token traversal, and large fence rendering (~33x speedup on 1 MB JSON fences; ~39% faster on 5 MB prose pages).
80
+ - Atomic output file writes (`write_if_changed` via sibling temp file + `os.replace`) so interrupted or concurrent builds never leave half-written HTML/CSS/JS files.
81
+
82
+ ### Known Limitations
83
+
84
+ - The client-side `assets/search-index.js` index scales linearly unless bounded with `search.max_index_bytes`.
85
+ - `source_link_mode: "relative"` on cross-machine deployments assumes `_site/` stays inside the repository checkout (use `--mode remote` when hosting externally).
86
+ - No third-party plugin system (intentional non-goal).
87
+
88
+ ## [0.1.0] - 2026-12-05
89
+
90
+ ### Added
91
+
92
+ - Zero-config Markdown-to-HTML static site compiler (`md2site build`, `md2site watch`, `md2site check`, `md2site init`, `md2site hook`).
93
+ - Works cleanly from `file://` as well as HTTP hosts (`relative` URLs everywhere, no `fetch()`, no ES modules, no `<base>`, explicit `index.html` targets, system fonts only).
94
+ - Two-pass build pipeline (`scan -> parse -> index -> resolve -> render -> emit`) with SHA-256 hash-skipping incremental writes and deterministic output.
95
+ - Full-fidelity GFM rendering via `markdown-it-py`: tables, task lists, footnotes, GitHub alerts (`[!NOTE]`, `[!TIP]`, `[!IMPORTANT]`, `[!WARNING]`, `[!CAUTION]`), heading anchors, build-time Pygments syntax highlighting with copy buttons, and front matter (`---` / `+++`).
96
+ - Intelligent link and reference resolution: relative and root-relative `.md` links, directory `index.md`/`README.md` resolution, `[[Wikilinks]]` and `![[embeds]]` with nearest-match tie-breaking, heading `#anchor` validation, case-mismatch detection (`MD2S006`), repo source-file linking (`relative`, `editor`, `remote`, `auto`), and opt-in inline-code path autolinking.
97
+ - Structured compiler diagnostics (`MD2S001`–`MD2S010`) with machine-readable `md2site check --json` and `--strict` gate.
98
+ - Responsive reader UI with flicker-free light/dark toggle, configurable CSS tokens, reading-time metadata, collapsible mobile navigation drawer, right-hand TOC spy, prev/next links, and print stylesheet.
99
+ - Offline client-side search (`Ctrl`/`Cmd+K`) powered by `assets/search-index.js` loaded lazily on demand, with vendored offline Mermaid (`mermaid@12.3.0`) included only on pages containing diagrams.
100
+ - Agent integration: `md2site init --with-skill` (`SKILL.md`), `md2site hook` post-edit stdin validator, `md2site check --json`, and live-reloading `md2site watch` server with SSE.
101
+ - Dogfooded project documentation under `docs/` and automated CI/release/Pages workflows.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: md2site-cli
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Compile a folder of Markdown into a static, offline-capable HTML docs site.
5
5
  Project-URL: Homepage, https://github.com/Jayfraggs/md2site
6
6
  Project-URL: Repository, https://github.com/Jayfraggs/md2site
@@ -27,11 +27,17 @@ Requires-Dist: markdown-it-py>=3
27
27
  Requires-Dist: mdit-py-plugins>=0.4
28
28
  Requires-Dist: pygments>=2.17
29
29
  Requires-Dist: watchdog>=4
30
+ Provides-Extra: browser
31
+ Requires-Dist: playwright>=1.45; extra == 'browser'
30
32
  Provides-Extra: dev
31
33
  Requires-Dist: build; extra == 'dev'
32
34
  Requires-Dist: pytest-cov; extra == 'dev'
33
35
  Requires-Dist: pytest>=8; extra == 'dev'
34
36
  Requires-Dist: ruff; extra == 'dev'
37
+ Provides-Extra: stress
38
+ Requires-Dist: hypothesis>=6.100; extra == 'stress'
39
+ Requires-Dist: psutil>=5.9; extra == 'stress'
40
+ Requires-Dist: pytest-timeout>=2.3; extra == 'stress'
35
41
  Description-Content-Type: text/markdown
36
42
 
37
43
  # md2site
@@ -42,6 +48,10 @@ Turn a folder of Markdown into a static, offline-capable HTML docs site — with
42
48
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
43
49
  ![Python 3.11 | 3.12 | 3.13](https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13-blue)
44
50
 
51
+ ## Demo
52
+
53
+ https://github.com/user-attachments/assets/49c98ba6-f62b-4001-bfdb-0a869fded44e
54
+
45
55
  ## How it works
46
56
 
47
57
  <p align="center">
@@ -72,24 +82,25 @@ Read the sketch left to right:
72
82
 
73
83
  ## Features
74
84
 
75
- - **Navigation:** Recursive sorted scan, front matter `order`/`hidden`/`draft` support, numeric-prefix stripping, acronym-aware title humanization, collapsible `<details>/<summary>` sidebar (works without JS), breadcrumbs, and document-order Previous/Next links.
76
- - **Links & references:** Relative/root-relative `.md` links, directory `index.md`/`README.md` resolution, `[[Wikilinks]]` and `![[embeds]]` with nearest-match tie-breaking, heading `#anchor` validation, case-mismatch detection (`MD2S006`), repo source-file modes (`relative`, `editor`, `remote`, `auto`), and opt-in inline-code path autolinking.
77
- - **Reading experience:** Flicker-free light/dark toggle (`localStorage` + `prefers-color-scheme`), configurable CSS tokens, build-time Pygments syntax highlighting with one-click Copy buttons, GitHub alerts (`> [!NOTE]`–`[!CAUTION]`), task lists, footnotes, scrollable tables, responsive mobile drawer, and print stylesheet.
78
- - **Search & diagrams:** Offline `assets/search-index.js` loaded lazily on `Ctrl/Cmd+K` with Unicode prefix matching and `<mark>` highlights; vendored `mermaid@12.3.0` loaded only on pages containing ` ```mermaid ` fences and re-rendered on theme switch.
79
- - **Agent integration:** Bundled `SKILL.md` (`md2site init --with-skill`), `md2site hook` post-edit stdin validator, `md2site check --json`, and `md2site watch` with Server-Sent Events live reload.
85
+ - **Navigation & scale:** Recursive sorted scan, front matter `order`/`hidden`/`draft` support, explicit `nav` overrides, auto-windowed sidebar navigation (`nav_mode`) above 150 pages (`assets/nav-tree.js` + `nav-data.js`), breadcrumbs, Prev/Next links, `tags/index.html`, and backlinks panels.
86
+ - **Links & graph:** Clean extensionless/`.html`/dotted/trailing-slash links (`link_style: "auto"`), `[[Wikilinks]]` and `![[embeds]]`, `#anchor` validation, case-mismatch detection (`MD2S006`), repo source-file modes (`relative`, `editor`, `remote`, `auto`), internal link graph (`md2site graph`), and `sitemap.xml` / `git_dates`.
87
+ - **Markdown & diagrams:** Build-time Pygments highlighting (`title`, `{lines}`, line numbers, Copy button), GitHub alerts, MkDocs `!!!`/`???` admonitions, VitePress `:::` containers, `=== "Tab"` content tabs, `==mark==`, `~sub~`, `^sup^`, `:emoji:`, definition lists, `{#custom-id}`, `[TOC]`, vendored `mermaid@12.3.0`, and vendored `katex@0.19.1` MathML (`$...$` / `$$...$$` / ```` ```math ````).
88
+ - **Reading & search UX:** Flicker-free light/dark toggle, WCAG AA–audited CSS tokens, offline `assets/search-index.js` (auto-sharded above 400 KB) opened via `Ctrl/Cmd+K` or `/`, heading `#` URL copy, native `<dialog>` image lightbox, responsive mobile drawer, and print stylesheet.
89
+ - **SEO & publishing:** `site_url` canonical/Open Graph/Twitter metadata, per-page `<html lang>` + automatic RTL `dir="rtl"`, emoji/file favicons, `404.html`, `sitemap.xml`, `robots.txt`, `.nojekyll`, and root passthroughs (`CNAME`, `.well-known/**`).
90
+ - **Agent integration:** Single-source `MD2S001`–`MD2S015` catalog (`md2site explain`), `check --json --suggest-patch`, atomic `md2site fix --write`, `llms.txt` / `llms-full.txt` / stripped `<page>.md` emissions, bundled `SKILL.md`, `md2site hook`, and `md2site watch` live reload.
80
91
 
81
92
  ## Install
82
93
 
83
- Note: the PyPI distribution name is `md2site-cli` (the `md2site` name on PyPI belongs to an unrelated project), while the CLI command and Python package remain `md2site`. (`md2site-cli` will be published to PyPI once trusted publishing is enabled; until then, install directly from Git.)
94
+ Note: the PyPI distribution name is `md2site-cli` (the `md2site` name on PyPI belongs to an unrelated project), while the CLI command and Python package remain `md2site`.
84
95
 
85
96
  ```bash
86
- pipx install git+https://github.com/Jayfraggs/md2site.git
97
+ pipx install md2site-cli
87
98
  ```
88
99
 
89
100
  Or run without installing:
90
101
 
91
102
  ```bash
92
- uvx --from git+https://github.com/Jayfraggs/md2site md2site build
103
+ uvx --from md2site-cli md2site build
93
104
  ```
94
105
 
95
106
  ## Quick start
@@ -130,7 +141,10 @@ md2site watch docs --open
130
141
  |---|---|---|
131
142
  | `init` | `[PATH] [--force] [--with-skill]` | Create `md2site.config.json`, `custom.css`, `_site/`, `.gitignore` entry, and optional `SKILL.md` |
132
143
  | `build` | `[PATH] [--config FILE] [--mode relative\|editor\|remote\|auto] [--out DIR] [--strict] [--json] [--quiet] [--drafts]` | Build the static HTML documentation site |
133
- | `check` | `[PATH] [--config FILE] [--strict] [--json]` | Resolve and validate links without writing files |
144
+ | `check` | `[PATH] [--config FILE] [--strict] [--json] [--suggest-patch]` | Resolve and validate links without writing files (with optional unified diffs) |
145
+ | `fix` | `[PATH] [--config FILE] [--write] [--force] [--json]` | Dry-run or apply high-confidence link fixes inside `docs_dir` |
146
+ | `explain` | `[CODE] [--list] [--json]` | Print cause, example, and fix for any `MD2Sxxx` diagnostic code |
147
+ | `graph` | `[PATH] [--config FILE] [--orphans] [--dead-ends] [--top N] [--json] [--dot]` | Inspect page link graph counts, orphans, dead ends, JSON, or Graphviz DOT |
134
148
  | `watch` | `[PATH] [--config FILE] [--host 127.0.0.1] [--port 8000] [--open]` | Serve `_site/` locally with SSE live reload and incremental rebuilds |
135
149
  | `hook` | *(reads JSON on stdin)* | Post-edit agent hook; prints diagnostics to stderr and exits `2` on issues |
136
150
 
@@ -143,65 +157,36 @@ Run `md2site --version` or `md2site <command> --help` for full details.
143
157
  | Key | Default | Purpose |
144
158
  |---|---|---|
145
159
  | `site_title` | `"Project Documentation"` | Site title shown in header, browser title, and landing page |
160
+ | `site_url` | `""` | Base URL enabling canonical, OG/Twitter tags, `sitemap.xml`, `robots.txt`, and full-chrome `404.html` |
146
161
  | `docs_dir` | `"."` | Source Markdown root relative to the config file |
147
162
  | `output_dir` | `"_site"` | Generated HTML output directory |
148
163
  | `repo_root` | `"auto"` | Ancestor `.git` root (or config dir) used to resolve source links |
149
164
  | `exclude` | `[]` | POSIX glob patterns excluded from scanning |
165
+ | `link_style` | `"auto"` | `"auto"` resolves clean extensionless/`.html`/dotted links; `"strict"` uses v0.2 explicit `.md` rules |
166
+ | `nav_mode` | `"auto"` | `"auto"` switches to bounded windowed nav above `nav_window_threshold` (`150` pages) |
150
167
  | `source_link_mode` | `"relative"` | One of `relative`, `editor`, `remote`, or `auto` |
151
168
  | `wikilinks` | `true` | Enable `[[Wikilinks]]` and `![[embeds]]` |
169
+ | `math` | `{"enabled": true, ...}` | Render TeX math via vendored KaTeX MathML (only on pages containing math) |
170
+ | `llms` | `{"enabled": true, ...}` | Emit `llms.txt`, optional `llms-full.txt`, and stripped `<page>.md` copies |
171
+ | `backlinks` / `tags` / `lightbox` | `true` | Inbound backlinks panel, `tags/<slug>.html` pages, and `<dialog>` image zoom |
172
+ | `edit_url` / `git_dates` | `""` / `false` | "Edit this page" link template and single-pass `git log` updated timestamps |
152
173
  | `max_highlight_bytes` | `262144` | Max fence bytes for Pygments highlighting (`0` = unlimited) |
153
174
  | `nav` | `null` | Optional explicit sidebar ordering override (`null` = auto tree) |
154
- | `search.enabled` | `true` | Emit offline `assets/search-index.js` and enable `Ctrl/Cmd+K` modal |
155
- | `search.max_index_bytes` | `0` | Optional byte budget for `assets/search-index.js` (`0` = unlimited) |
156
-
157
- <details>
158
- <summary>Full default md2site.config.json</summary>
159
-
160
- ```json
161
- {
162
- "site_title": "Project Documentation",
163
- "docs_dir": ".",
164
- "output_dir": "_site",
165
- "repo_root": "auto",
166
- "exclude": [],
167
- "source_link_mode": "relative",
168
- "remote_repo_url": "",
169
- "remote_branch": "main",
170
- "editor_scheme": "vscode",
171
- "autolink_code_paths": false,
172
- "wikilinks": true,
173
- "allow_html": true,
174
- "mermaid": true,
175
- "max_highlight_bytes": 262144,
176
- "nav": null,
177
- "search": { "enabled": true, "body_chars": 6000, "max_index_bytes": 0 },
178
- "theme": {
179
- "default_mode": "system",
180
- "accent_color": "#7c3aed",
181
- "accent_color_dark": "#a78bfa",
182
- "code_theme_light": "default",
183
- "code_theme_dark": "github-dark",
184
- "light": { "bg_primary": "#ffffff", "bg_sidebar": "#f8fafc", "text_primary": "#0f172a" },
185
- "dark": { "bg_primary": "#0b0f19", "bg_sidebar": "#111827", "text_primary": "#f1f5f9" },
186
- "font_sans": "system-ui, -apple-system, sans-serif",
187
- "font_mono": "'JetBrains Mono', 'Fira Code', monospace"
188
- }
189
- }
190
- ```
175
+ | `search` | `{"enabled": true, ...}` | Offline search modal (`Ctrl/Cmd+K` or `/`) with automatic sharding above `400000` bytes |
191
176
 
192
- </details>
177
+ See [docs/configuration.md](docs/configuration.md) for the complete default JSON schema and every option.
193
178
 
194
179
  ## How links are resolved
195
180
 
196
181
  | Source syntax | Target | Output |
197
182
  |---|---|---|
198
- | `[x](./a.md#h)` | `.md` in docs | Relative `.html#h`; anchor validated |
183
+ | `[x](./a.md#h)`, `[x](./a)`, `[x](a.html#h)`, `[x](/api/v1.2)` | Page in docs (`link_style: "auto"`) | Relative `.html#h`; anchor validated |
199
184
  | `[x](dir/)` | Directory with `index.md` / `README.md` | `dir/index.html` |
200
185
  | `[[Note]]`, `[[Note#H]]`, `[[Note\|Label]]`, `[[folder/Note]]` | Page | Relative HTML link (path → stem → title → alias) |
201
186
  | `![[img.png]]`, `![](./img.png)` | Asset in docs | Copied to mirrored path, relative URL |
202
187
  | `[x](../src/server.py#L42)` | File outside docs, inside `repo_root` | Rewritten per `source_link_mode` |
203
188
  | `![](../assets/logo.png)` | Image outside docs | Copied to `_site/_external/<repo-relative path>` |
204
- | `http(s)://`, `mailto:`, `tel:` | External | Untouched; `http(s)://` gets `class="external"` and `rel="noopener"` |
189
+ | `http(s)://`, `//cdn/x`, `mailto:`, `tel:`, `javascript:`, `data:` | External / ignored scheme | Untouched; `http(s)://` and `//` get `class="external"` and `rel="noopener"` |
205
190
  | `#anchor` | Same page | Validated against heading IDs |
206
191
  | `/abs/path` | Root-relative | Treated as relative to `docs_dir` |
207
192
 
@@ -214,19 +199,23 @@ Run `md2site --version` or `md2site <command> --help` for full details.
214
199
 
215
200
  ### Diagnostics codes
216
201
 
217
- | Code | Meaning |
218
- |---|---|
219
- | `MD2S001` | Broken Markdown link (target `.md` not found) or missing explicit `nav` target |
220
- | `MD2S002` | Broken file/asset link |
221
- | `MD2S003` | Ambiguous wikilink (resolved to nearest) |
222
- | `MD2S004` | Unresolved wikilink |
223
- | `MD2S005` | Broken `#anchor` heading fragment |
224
- | `MD2S006` | Case mismatch (works on case-insensitive FS, breaks on Linux) |
225
- | `MD2S007` | Target escapes `repo_root` |
226
- | `MD2S008` | Output path or asset collision |
227
- | `MD2S009` | Bad front matter or invalid UTF-8 bytes |
228
- | `MD2S010` | `remote`/`auto` mode without `remote_repo_url` |
229
- | `MD2S011` | Cross-filesystem `relative` repo-file fallback when `--out` cannot reach `repo_root` |
202
+ | Code | Meaning | Fixable | Since |
203
+ |---|---|---|---|
204
+ | `MD2S001` | broken Markdown link (target .md not found) | yes | 0.1.0 |
205
+ | `MD2S002` | broken file/asset link | yes | 0.1.0 |
206
+ | `MD2S003` | ambiguous wikilink (resolved to nearest) | no | 0.1.0 |
207
+ | `MD2S004` | unresolved wikilink | no | 0.1.0 |
208
+ | `MD2S005` | broken anchor | yes | 0.1.0 |
209
+ | `MD2S006` | case mismatch (works here, breaks on case-sensitive FS) | yes | 0.1.0 |
210
+ | `MD2S007` | target escapes repo_root | no | 0.1.0 |
211
+ | `MD2S008` | output path / slug collision | no | 0.1.0 |
212
+ | `MD2S009` | bad front matter | no | 0.1.0 |
213
+ | `MD2S010` | remote/auto mode without remote_repo_url | no | 0.1.0 |
214
+ | `MD2S011` | relative source_link_mode fell back across filesystems | no | 0.2.0 |
215
+ | `MD2S012` | ambiguous clean link (both file and directory index exist) | no | 0.3.0 |
216
+ | `MD2S013` | duplicate explicit heading id ({#id} used twice on one page) | no | 0.3.0 |
217
+ | `MD2S014` | math expression exceeds math.max_length (left as literal text) | no | 0.3.0 |
218
+ | `MD2S015` | unterminated container/admonition/tab block (auto-closed at end of document) | no | 0.3.0 |
230
219
 
231
220
  ## Works offline, from `file://`
232
221
 
@@ -239,14 +228,15 @@ Browsers enforce strict restrictions when opening HTML files straight from disk:
239
228
 
240
229
  ## For AI agents
241
230
 
242
- - Install the skill with `md2site init docs --with-skill` (copies [SKILL.md](src/md2site/skill/SKILL.md) to `.claude/skills/md2site/SKILL.md`).
243
- - Or add a post-edit hook (`md2site hook`) and `AGENTS.md` snippet — see [docs/agents.md](docs/agents.md).
244
- - Typical agent loop: edit Markdown → `md2site check --json` → fix diagnostics via `suggestion` → `md2site build`.
231
+ - Install the skill with `md2site init docs --with-skill` (copies [SKILL.md](src/md2site/skill/SKILL.md) to `.claude/skills/md2site/SKILL.md`) or wire `md2site hook` as a `PostToolUse` hook — see [docs/agents.md](docs/agents.md).
232
+ - Typical repair loop: edit Markdown → `md2site check --json --suggest-patch` → `md2site fix --write` (or look up codes with `md2site explain MD2S012`) → `md2site build`.
233
+ - Every build emits `llms.txt` (`llmstxt.org`), optional `llms-full.txt`, and front-matter-stripped `<page>.md` copies.
245
234
 
246
- ## Performance
235
+ ## Performance & Stress Testing
247
236
 
248
- - Cold build of **100 pages** (~2 KB each with Python code blocks, cross-links, and GFM tables): **~468 ms** (0.47 s) on a Linux x86_64 VM (Python 3.12).
249
- - Incremental `watch` re-renders only the edited page and `search-index.js` when headings, metadata, and outgoing link targets are unchanged; unchanged outputs are skipped by content comparison.
237
+ - Scaling is linear (`O(n log n)` / sub-linear per-page HTML via windowed nav): 1,000 pages build in **~2.3 s** and 4,000 pages build in **~8.5 s** with ~19 KB avg HTML per page (down from 67 s / 465 KB in `0.2.0`).
238
+ - Incremental `watch` re-renders only the edited page cleanly in < 150 ms; unchanged outputs are skipped by content comparison.
239
+ - Install stress & fuzz tooling with `pip install -e ".[dev,stress]"` and run `pytest -m "stress and not browser" --stress-profile quick` or `pytest -m realworld -v` — see [docs/stress-testing.md](docs/stress-testing.md).
250
240
 
251
241
  ## Non-goals
252
242