Skip to content

Commit dc834bb

Browse files
authored
fix(docs): move pages out of pages/ to restore original guide URLs (#814)
fix(docs): move pages out of pages/ to restore original URLs The mystmd conversion nested every page under `pages/`, which added a `pages/` segment to all guide URLs (e.g. `/development/guides/mypy/` became `/development/pages/guides/mypy/`), breaking existing links into the development guide. Move the page tree back up one level so the URLs match the pre-mystmd paths and old links work again: - `git mv docs/pages/{guides,tutorials,principles,patterns,index.md}` to `docs/` - strip `pages/` from the toc in myst.yml and from internal cross-reference links - adjust the real `{include}` directives for `_partials/pyproject.md` (one less directory level) - update `docs/pages/` path references in noxfile.py and .pre-commit-config.yaml Assisted-by: ClaudeCode:claude-opus-4.8
1 parent e97a196 commit dc834bb

33 files changed

Lines changed: 86 additions & 85 deletions

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ repos:
8787
name: Disallow improper capitalization
8888
language: pygrep
8989
entry: PyBind|Numpy|Cmake|CCache|Github|PyTest|RST|PyLint
90-
exclude: (.pre-commit-config.yaml|docs/pages/guides/style\.md)$
90+
exclude: (.pre-commit-config.yaml|docs/guides/style\.md)$
9191
- id: disallow-words
9292
name: Disallow certain words
9393
language: pygrep
@@ -101,5 +101,5 @@ repos:
101101
name: Cog the pages
102102
language: python
103103
entry: cog -P -r -I ./helpers
104-
files: "^docs/pages/guides/(packaging_compiled|docs|tasks|gha_basic).md|^copier.yml|^docs/_partials/pyproject.md"
104+
files: "^docs/guides/(packaging_compiled|docs|tasks|gha_basic).md|^copier.yml|^docs/_partials/pyproject.md"
105105
additional_dependencies: [cogapp, cookiecutter, tomlkit]

docs/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ bundle install
1919
bundle exec jekyll serve --livereload
2020
```
2121

22-
The pages are in markdown in `pages/`. Images and data files are in `assets/`.
22+
The pages are in markdown, in the `guides/`, `tutorials/`, `principles/`, and
23+
`patterns/` folders. Images and data files are in `assets/`.
2324

2425
To bump versions, use nox. You can run `nox -s pc_bump` to bump the pre-commit
2526
versions, and `nox -s gha_bump` to bump the GitHub Actions versions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ reasons that a wheel is better than only providing an sdist:
2626
is going to go
2727
:::
2828

29-
[on the next page]: pages/guides/gha-wheels
29+
[on the next page]: guides/gha-wheels
3030

3131
## Job setup
3232

File renamed without changes.
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@ your repository with the guidelines, runnable [right in the guide][] via
3434
WebAssembly! All checks point to a linked badge in the guide.
3535
:::
3636

37-
[tutorials]: pages/tutorials/index
38-
[style]: pages/guides/style
39-
[mypy]: pages/guides/mypy
40-
[docs]: pages/guides/docs
41-
[simple packaging]: pages/guides/packaging-simple
42-
[compiled packaging]: pages/guides/packaging-compiled
43-
[classic packaging]: pages/guides/packaging-classic
44-
[coverage]: pages/guides/coverage
45-
[gha_basic]: pages/guides/gha-basic
46-
[gha_pure]: pages/guides/gha-pure
47-
[gha_wheels]: pages/guides/gha-wheels
48-
[pytest]: pages/guides/pytest
49-
[right in the guide]: pages/guides/repo-review
37+
[tutorials]: tutorials/index
38+
[style]: guides/style
39+
[mypy]: guides/mypy
40+
[docs]: guides/docs
41+
[simple packaging]: guides/packaging-simple
42+
[compiled packaging]: guides/packaging-compiled
43+
[classic packaging]: guides/packaging-classic
44+
[coverage]: guides/coverage
45+
[gha_basic]: guides/gha-basic
46+
[gha_pure]: guides/gha-pure
47+
[gha_wheels]: guides/gha-wheels
48+
[pytest]: guides/pytest
49+
[right in the guide]: guides/repo-review
5050

5151
[cookiecutter]: https://cookiecutter.readthedocs.io
5252
[copier]: https://copier.readthedocs.io
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ everything. Try to turn on as much as possible, and increase it until you can
7070
run with full `strict` checking. See the [style page][] for configuration
7171
suggestions.
7272

73-
[style page]: pages/guides/style
73+
[style page]: guides/style
7474

7575
For a library to support typing, it has to a) add types using any of the three
7676
methods, and b) add a `py.typed` empty file to indicate that it's okay to look
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ outlined as well.
88
There are several popular packaging systems. This guide covers the old
99
configuration style for [Setuptools][]. Unless you really need it, you should be
1010
using the modern style described in [Simple
11-
Packaging](pages/guides/packaging-simple). The modern style is
11+
Packaging](guides/packaging-simple). The modern style is
1212
guided by Python Enhancement Proposals (PEPs), and is more stable than the
1313
setuptools-specific mechanisms that evolve over the years. This page is kept to
1414
help users with legacy code (and hopefully upgrade it).

0 commit comments

Comments
 (0)