documentation: restructure into sections mirroring the toolbox - #82
documentation: restructure into sections mirroring the toolbox#82philipcardiff wants to merge 7 commits into
Conversation
Phase 1 of the /documentation/ restructure. The flat list of eight pages becomes a tree of sections whose shape follows the repository, and roughly 1400 lines of documentation that were already committed upstream but reachable from no page on the site are now published. New sections, each a directory of symlinks into imported/solids4foam: - solid-models/ : the existing catalogue, plus the per-model pages for linGeomTotalDispSolid, nonLinGeomTotalLagTotalDispSolid and nonLinGeomUpdatedLagSolid; - applications/ : solids4Foam, utilities, decomposeParMonolithic, scripts; - under-the-hood/ : library internals, stabilisation models, contributing. fluid-models, fluid-solid-interfaces and function-objects also become directories. The theme lists files before directories and renders directory links unnumbered, so mixing the two would have put the solid mechanics sections below the fluid ones regardless of their sort values. Old URLs are preserved with jekyll-redirect-from stubs at each previous path; redirect pages are filtered out of the sidebar in site_pages.liquid. overview.md is trimmed to the ethos, an architecture map linking into the new sections, and the toolbox structure; the solids4Foam solver walkthrough moves upstream to documentation/applications/solids4Foam.md. Requires the matching upstream change, which adds the sort: front matter the sidebar ordering depends on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
more-tutorials/fluid-mechanics is the only tutorial section without a README.md, so jekyll-readme-index has no index page for it and the sidebar prints the raw directory URL in place of a title. Also picks up the upstream fixes for the three links that resolved in a Git checkout but not on the website. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The ten images left in documentation/images are referenced by no page; the five that were still in use moved into the section directories that consume them when the documentation tree was restructured. Also corrects "mechanucs" in the solid mechanics tutorials landing page. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Reminder before merging: this PR's submodule pointer is Merging as-is would point |
|
Correction to the checklist above: |
Every documentation and tutorial page is a symlink into imported/solids4foam. Without the submodule those symlinks dangle, so `find -type f` skips them and any link pointing at one is reported dead. The workflow has therefore been checking only the site's own pages, which is why three broken links in the imported content went unnoticed until now. Also makes the internal linkcheck pass on this branch: the rewritten overview.md links to the new sections by relative path, and those targets are symlinks. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…t in CI The pages that publish solids4foam's in-repository READMEs are symlinks into the submodule, hand-written one at a time. There are 261 of them and phases 2-5 add roughly 67 more, so mistakes are cheap to make and quiet: a mistyped link produces a 404 rather than a build failure, and an image that no page references any more simply lingers. Add bin/docs-manifest.txt, one line per published page, and bin/sync-docs.sh, which generates from it both the page symlinks and, for each page, an images/ directory linking every image that page references. The script refuses to overwrite anything that is not a symlink, and fails if a manifest entry or a referenced image is missing from the submodule. `bin/sync-docs.sh --check` reports differences without touching anything. A new workflow runs it, together with a check for dangling symlinks, on pull requests and on master. Both checks were confirmed to fail on a deliberately mistyped symlink. Regenerating the tree drops 17 image symlinks that no page references: eight hotSphere figures linked twice over, and one fillingElasticContainer figure. It also drops viscoTube-radialDisplacement.png, which is referenced only by a malformed link upstream; solids4foam#326 fixes that, and the next submodule bump plus a re-run of the script restores it. Verified: the script reproduces the existing tree exactly apart from those removals, the site builds under --safe with 414 pages, and the internal linkcheck reports no dead links. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
site_pages.liquid used sort_natural on the "sort" front-matter value, which compares it as a string, so 10 sorts before 2. This is already visible on the live site: the linear elasticity tutorials list as 1, 10, 14, 2, 3, 4, 5, 7 rather than in numerical order. Use the numeric sort filter instead. It refuses to compare mixed types, so this depends on every published page having a numeric "sort" value; the four "sort: xx" placeholders that blocked it are fixed in the submodule commit this branch points at. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds the manifest entries and the generated symlinks for the solid models documented upstream in this branch's submodule commit: the three uns models, the two vertex-centred models, the two coupled models, the three thermal models, poroLinGeomSolid and kirchhoffPlateSolid. The solid models section now lists all fifteen models, numbered 1 to 15, grouped as cell-centred segregated, vertex-centred, coupled, multiphysics and plate. Verified: 130 pages built under --safe (118 before), sync-docs.sh --check clean, no dangling symlinks, markdownlint clean, and zero dead internal links. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Phase 2 folded into this branch ( New hard ordering constraint. So this PR must not merge until the submodule pointer here includes that fix. That is already checklist steps 1-3, but the consequence of getting it wrong is now a hard failure rather than a cosmetic one. Verified with the submodule temporarily checked out at the tip of #324: 130 pages built under |
Phase 1 of the
/documentation/restructure. The flat list of eight pagesbecomes a tree of sections whose shape follows the toolbox, and roughly 1400
lines of documentation that were already committed upstream but reachable from
no page here are published.
Important
The submodule pointer here is
7410d74, the tip of thedocs-phase1branchof solids4foam/solids4foam#324. That commit is not on
development, somerging now would point
masterat a commit that may never exist there andthe published site would break.
Note that
update-submodule.ymlin the toolbox repo pushes a submodule bumpstraight to
masterhere on every push todevelopment. So once #324merges,
mastergets the correct pointer on its own, and this branch willconflict with it on
imported/solids4foam.Merge checklist, in this order:
development. It adds thesort:front matter this PR's ordering depends on. MergeDocumentation: normalise markdown tables to a consistent compact style solids4foam#326 too: it fixes the malformed
viscoTubeimage link referenced below.development commit" push to land on
masterhere.masterinto this branch, resolvingimported/solids4foamin favour of
master:bash git checkout docs-phase1 git fetch origin && git merge origin/master git checkout --theirs imported/solids4foam # take master's pointer git submodule update --init git commit && git pushgit submodule statusno longer shows7410d74, and thatfind documentation tutorials -type l ! -exec test -e {} \; -printprints nothing.
bin/sync-docs.shand commit anything it changes. Thenew submodule pointer restores the
viscoTubeimage that themanifest currently cannot link.
gh pr ready 82) and merge.Structure
Content is imported exactly as before: git symlinks into
imported/solids4foam, with each page's images symlinked beside it.fluid-models,fluid-solid-interfacesandfunction-objectsbecomedirectories too. The theme lists a directory's files before its
subdirectories and renders subdirectory links unnumbered, so mixing plain
pages with sections would have put the solid mechanics sections below the
fluid ones whatever their
sortvalues.URLs
Every previous URL still works.
jekyll-redirect-fromis added to the pluginlist and a site-owned stub left at each old path, so
/documentation/solid-models.html,utilities.html,scripts.html,fluid-models.html,fluid-solid-interfaces.htmlandfunction-objects.htmlredirect rather than 404. Redirect pages are filteredout of the sidebar in
site_pages.liquid.Also
overview.mdtrimmed to the ethos, an architecture map linking into the newsections, and the toolbox structure. The
solids4Foamsolver walkthroughmoves upstream, to
/documentation/applications/solids4Foam.html. The fourstale
solids4foam.github.iolinks are gone.tutorials/more-tutorials/fluid-mechanics/README.mdadded — it was the onetutorial section without an index page, so the sidebar printed its raw URL.
documentation/images; the five stillin use moved into the section directories that consume them.
Verification
jekyll build --safeagainst the companion branch: all 22 documentationpages render, and
--safedoes follow the symlinks.internal links (there were three before).
documentation/ortutorials/.markdownlint-cli2 --config .markdownlint.jsonoverdocumentation/**:clean.
prettier --checkon every file touched: clean.🤖 Generated with Claude Code
Update: symlink tooling (Phase 0 remainder)
Commit
f12feecadds the manifest-driven tooling the plan's Phase 0 calledfor. It lives here rather than in a separate PR off
masterbecausebin/docs-manifest.txtdescribes the section tree this PR creates, so itcannot stand alone.
bin/docs-manifest.txt— one line per published page, mapping the sitepath to the path within the submodule. 71 entries.
bin/sync-docs.sh— generates the page symlinks and each page'simages/directory from the manifest. Refuses to overwrite non-symlinks andfails on a missing target.
--checkreports drift without writing..github/workflows/docs-symlinks.yml— runs--checkplus adangling-symlink check. Both were confirmed to fail on a deliberately
mistyped symlink.
Regenerating drops 18 image symlinks no page references: eight
hotSpherefigures linked twice over, one
fillingElasticContainerfigure, andviscoTube-radialDisplacement.png, whose only reference upstream is malformed(fixed by solids4foam/solids4foam#326 — hence checklist step 5).
Verified: the script reproduces the existing tree exactly apart from those
removals; the site builds under
--safewith 414 pages; the internallinkcheck reports no dead links;
shellcheckis clean.Why this PR reports no CI checks
Not a workflow bug. The PR is CONFLICTING on
imported/solids4foam, soGitHub cannot create the merge ref and therefore never generates
pull_requestworkflow runs. Checklist step 3 resolves the conflict, and thechecks will appear on their own. Until then both workflows have to be run by
manual dispatch.
Still outstanding
submodules: trueonactions/checkoutinmarkdownlint.yml— the lastPhase 0 item — is deliberately not in this PR. Turning it on surfaces 100
MD060 errors in the submodule's markdown, which solids4foam/solids4foam#326
fixes. It can go in once that has merged and the submodule pointer here has
caught up.