|
1 | 1 | --- |
2 | 2 | name: psmodule-zensical-migration |
3 | | -description: Migrate a PSModule repository from MkDocs to Zensical using the Process-PSModule documentation design as the default while preserving content, navigation, assets, and repository-specific behavior. |
| 3 | +description: Assess a PSModule repository's documentation migration to Zensical without introducing a site layout the Process-PSModule pipeline cannot publish. |
4 | 4 | --- |
5 | 5 |
|
6 | | -# Migrate PSModule documentation from MkDocs to Zensical |
| 6 | +# Assess a PSModule Zensical migration |
7 | 7 |
|
8 | | -Use this skill when a PSModule repository has a legacy MkDocs configuration, |
9 | | -usually `.github/mkdocs.yml`, or needs its documentation site aligned with the |
10 | | -Process-PSModule Zensical design. Keep the migration limited to documentation |
11 | | -integration. Do not rewrite module code or tests unless a documentation build |
12 | | -requires a directly related fix. |
| 8 | +Use this skill when a PSModule repository has a legacy MkDocs configuration or |
| 9 | +needs its documentation site aligned with Zensical. Keep the assessment limited |
| 10 | +to documentation integration. Do not rewrite module code or tests unless a |
| 11 | +documentation build requires a directly related fix. |
13 | 12 |
|
14 | | -## Source-of-truth design |
| 13 | +## Current Process-PSModule boundary |
15 | 14 |
|
16 | | -Use the current |
17 | | -[`Process-PSModule` `docs/zensical.toml`](https://github.com/PSModule/Process-PSModule/blob/main/docs/zensical.toml) |
18 | | -as the default style and configuration baseline. Reuse its behavior rather than |
19 | | -inventing a second theme: |
| 15 | +The module site pipeline stages generated function documentation, `README.md`, |
| 16 | +the module icon, and `.github/zensical.toml` into `outputs/site`. It does not |
| 17 | +stage consumer-authored `docs/content/`, `docs/overrides/`, or their assets. |
| 18 | +Consequently, a consumer configuration that sets `docs_dir = "content"` or |
| 19 | +`custom_dir = "overrides"` cannot be published through the current framework. |
20 | 20 |
|
21 | | -- `docs_dir = "content"` with content under `docs/content/`. |
22 | | -- `docs/overrides/` as the custom theme directory. |
23 | | -- `docs/overrides/assets/stylesheets/navigation.css` for navigation styling. |
24 | | -- `docs/overrides/assets/` and any repository-owned `docs/assets/` directory |
25 | | - when present as the asset source of truth. |
26 | | -- Mona Sans text and Source Code Pro code fonts. |
27 | | -- Material-style GitHub/link icons, light/dark/system palette toggles, |
28 | | - black/slate/light-blue colors, and the established navigation features. |
29 | | -- Instant navigation, prefetch/preview/progress, tabs, tracking, top navigation, |
30 | | - search, code copy, tooltips, table of contents, and footer behavior. |
31 | | -- TOC, attribute lists, abbreviations, admonitions, definition lists, |
32 | | - footnotes, tables, HTML-in-Markdown, details, superfences, task lists, and |
33 | | - snippets extensions. |
34 | | -- Mermaid fenced blocks and the shared abbreviations snippet. |
35 | | -- Existing social links, consent configuration, site metadata, edit URI, and |
36 | | - custom tablesort JavaScript where those features apply. |
| 21 | +Do not move a module consumer from `.github/zensical.toml` to |
| 22 | +`docs/zensical.toml`, or prescribe the Process-PSModule repository's |
| 23 | +`docs/content/` design, until the framework stages those paths. |
37 | 24 |
|
38 | | -Customize only repository identity and content-specific values such as |
39 | | -`site_name`, `site_url`, `repo_name`, `repo_url`, `edit_uri`, copyright, social |
40 | | -links, and `nav`. Do not remove a default feature merely because the old |
41 | | -MkDocs site did not use it. |
| 25 | +## Assess before changing |
42 | 26 |
|
43 | | -## Inspect before changing |
| 27 | +1. Read local guidance, the current documentation build command, and the |
| 28 | + Process-PSModule caller workflow. |
| 29 | +2. Inventory `.github/mkdocs.yml`, `mkdocs.yml`, `.github/zensical.toml`, and |
| 30 | + any existing documentation sources, templates, media, and assets. |
| 31 | +3. Identify whether documentation is published by Process-PSModule or by a |
| 32 | + separate repository-owned workflow. |
| 33 | +4. Preserve module source, generated help, custom assets, navigation, and |
| 34 | + repository-owned workflows unless the requested migration requires them. |
44 | 35 |
|
45 | | -Inventory the existing repository and record: |
| 36 | +## Supported consumer configuration |
46 | 37 |
|
47 | | -1. Local guidance, branch state, and documentation build commands. |
48 | | -2. `.github/mkdocs.yml`, any `mkdocs.yml`, and any existing Zensical config. |
49 | | -3. The Markdown content root, includes/snippets, templates, media, and assets. |
50 | | -4. `theme`, `theme.custom_dir`, `extra_css`, `extra_javascript`, `plugins`, |
51 | | - `markdown_extensions`, `nav`, `extra`, and `watch` settings. |
52 | | -5. Links, anchors, generated API/help pages, redirects, and CI publishing steps. |
53 | | -6. Existing custom CSS, JavaScript, templates, logos, favicons, and fonts. |
| 38 | +For a Process-PSModule consumer, retain the template's |
| 39 | +`.github/zensical.toml` configuration and the generated site layout. Do not |
| 40 | +add a second active site configuration. |
54 | 41 |
|
55 | | -Do not assume every consumer has a `docs/` tree. If documentation is absent, |
56 | | -create it only when the requested scope includes documentation migration. If |
57 | | -the repository already uses Zensical, compare it with the Process-PSModule |
58 | | -baseline and make only the required alignment changes. |
59 | | - |
60 | | -## Target layout |
61 | | - |
62 | | -For the Process-PSModule documentation contract, use: |
63 | | - |
64 | | -```text |
65 | | -docs/ |
66 | | -├── content/ |
67 | | -├── overrides/ |
68 | | -│ └── assets/ |
69 | | -│ ├── javascripts/ |
70 | | -│ └── stylesheets/ |
71 | | -└── zensical.toml |
72 | | -``` |
73 | | - |
74 | | -Keep existing content under `docs/content/`, custom templates under |
75 | | -`docs/overrides/`, and theme assets under `docs/overrides/assets/`. A separate |
76 | | -`docs/assets/` directory is optional for static content assets. Do not create a |
77 | | -parallel MkDocs theme or leave two active site configurations. |
78 | | - |
79 | | -The current `PSModule/Template-PSModule` repository historically stores a |
80 | | -starter `.github/zensical.toml` and may not contain a `docs/` tree. When the |
81 | | -consumer upgrade explicitly requires the Process-PSModule `docs/` contract, |
82 | | -move the template settings and custom assets into `docs/` and remove the |
83 | | -obsolete active configuration only after the site builds. When that contract |
84 | | -is not in scope, preserve a working template layout and report the difference |
85 | | -instead of moving files speculatively. |
86 | | - |
87 | | -## MkDocs-to-Zensical mapping |
88 | | - |
89 | | -Translate behavior, not just filenames: |
90 | | - |
91 | | -| MkDocs | Zensical | |
92 | | -| --- | --- | |
93 | | -| `site_name`, `site_url` | `[project]` metadata | |
94 | | -| `docs_dir` | `[project].docs_dir` | |
95 | | -| `repo_name`, `repo_url`, `edit_uri` | `[project]` metadata | |
96 | | -| `nav` | `nav = [...]` TOML entries | |
97 | | -| `theme.name` | `[project.theme]` settings | |
98 | | -| `theme.custom_dir` | `[project.theme].custom_dir` | |
99 | | -| `theme.logo`, `theme.favicon` | `[project.theme]` paths | |
100 | | -| `theme.features` | `[project.theme].features` | |
101 | | -| `theme.palette` | `[[project.theme.palette]]` tables | |
102 | | -| `extra_css`, `extra_javascript` | `[project]` arrays | |
103 | | -| `markdown_extensions` | `[project.markdown_extensions.*]` tables | |
104 | | -| `plugins: search` | `[project.plugins.search]` | |
105 | | -| `extra.social` | `[[project.extra.social]]` | |
106 | | -| `watch` | `[project].watch` | |
107 | | - |
108 | | -Preserve Markdown semantics while checking extensions that affect formatting: |
109 | | -admonitions, fenced code, tables, task lists, definition lists, attributes, |
110 | | -snippets, Mermaid, and anchor/permalink behavior. Fix only documented |
111 | | -Zensical incompatibilities; do not silently change headings or links to hide |
112 | | -build failures. |
113 | | - |
114 | | -## Content and link migration |
115 | | - |
116 | | -- Preserve page paths and navigation labels where possible. |
117 | | -- Keep explicit `nav` entries for important landing pages and references. |
118 | | -- Resolve relative links from the new `docs/content/` root. |
119 | | -- Recheck fragment anchors because heading and permalink behavior can differ. |
120 | | -- Move includes/snippets to the configured Zensical location and update every |
121 | | - reference. |
122 | | -- Keep generated API/help inputs in their framework-owned locations. |
123 | | -- Preserve images and downloads; update paths rather than deleting assets. |
124 | | -- Keep custom templates only when they are still required by the migrated site. |
| 42 | +When a requested migration needs authored Markdown content or a custom theme, |
| 43 | +record that the framework must first stage those assets into `outputs/site`. |
| 44 | +Do not claim the migration is complete until the producer supports the target |
| 45 | +layout and a consumer build publishes it successfully. |
125 | 46 |
|
126 | 47 | ## Validation |
127 | 48 |
|
128 | | -Run repository-native checks and the smallest targeted site checks first: |
129 | | - |
130 | | -1. Parse the new `docs/zensical.toml` and verify all configured paths exist. |
131 | | -2. Confirm no active `mkdocs.yml` or MkDocs workflow remains. |
132 | | -3. Check every navigation target, image, download, include, and fragment link. |
133 | | -4. Run the existing documentation lint and link checks. |
134 | | -5. Build the site: |
135 | | - |
136 | | - ```powershell |
137 | | - Push-Location docs |
138 | | - zensical build --clean |
139 | | - Pop-Location |
140 | | - ``` |
141 | | - |
142 | | -6. Review the generated site for navigation, search, palette toggles, fonts, |
143 | | - logo/favicon, custom navigation behavior, code blocks, Mermaid, and social |
144 | | - links. |
145 | | -7. Run the repository's existing Process-PSModule workflow validation when the |
146 | | - documentation is part of that pipeline. |
| 49 | +1. Confirm the caller references the intended Process-PSModule version and |
| 50 | + retains `.github/zensical.toml`. |
| 51 | +2. Run the consumer's existing documentation and Process-PSModule validation |
| 52 | + commands when available. |
| 53 | +3. Review the generated site to confirm generated function documentation, |
| 54 | + `README.md`, and module assets remain present. |
147 | 55 |
|
148 | | -Do not claim success if the site builds while links, assets, navigation, or |
149 | | -publishing behavior are broken. Report intentionally deferred pages, |
150 | | -unsupported extensions, and unrelated pre-existing failures. |
| 56 | +Report any unsupported authored-content or custom-theme requirement as a |
| 57 | +framework gap rather than working around it with a second active |
| 58 | +configuration. |
151 | 59 |
|
152 | 60 | ## References |
153 | 61 |
|
154 | | -- [Process-PSModule Zensical configuration](https://github.com/PSModule/Process-PSModule/blob/main/docs/zensical.toml) |
155 | | -- [Process-PSModule documentation overrides](https://github.com/PSModule/Process-PSModule/tree/main/docs/overrides) |
156 | | -- [Process-PSModule override assets](https://github.com/PSModule/Process-PSModule/tree/main/docs/overrides/assets) |
157 | 62 | - [PSModule repository standard](https://github.com/PSModule/Process-PSModule/blob/main/docs/content/reference/repository-standard.md) |
158 | | -- [PSModule documentation model](https://github.com/PSModule/Process-PSModule/blob/main/docs/content/guides/structuring-your-module.md) |
| 63 | +- [PSModule workflow inputs](https://github.com/PSModule/Process-PSModule/blob/main/docs/content/reference/workflow-inputs.md) |
159 | 64 | - [Zensical setup basics](https://zensical.org/docs/setup/basics/) |
0 commit comments