Skip to content

documentation: restructure into sections mirroring the toolbox - #82

Draft
philipcardiff wants to merge 7 commits into
masterfrom
docs-phase1
Draft

documentation: restructure into sections mirroring the toolbox#82
philipcardiff wants to merge 7 commits into
masterfrom
docs-phase1

Conversation

@philipcardiff

@philipcardiff philipcardiff commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Phase 1 of the /documentation/ restructure. The flat list of eight pages
becomes 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

⚠️ Do not merge this PR as it stands

The submodule pointer here is 7410d74, the tip of the docs-phase1 branch
of solids4foam/solids4foam#324. That commit is not on development, so
merging now would point master at a commit that may never exist there and
the published site would break.

Note that update-submodule.yml in the toolbox repo pushes a submodule bump
straight to master here on every push to development. So once #324
merges, master gets the correct pointer on its own, and this branch will
conflict with it on imported/solids4foam.

Merge checklist, in this order:

  • 1. Merge Documentation: surface the existing READMEs on the website solids4foam#324 into development. It adds the
    sort: front matter this PR's ordering depends on. Merge
    Documentation: normalise markdown tables to a consistent compact style solids4foam#326 too: it fixes the malformed
    viscoTube image link referenced below.
  • 2. Wait for the "Automated update of submodule to the latest
    development commit" push to land on master here.
  • 3. Merge master into this branch, resolving imported/solids4foam
    in 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 push
  • 4. Confirm git submodule status no longer shows 7410d74, and that
    find documentation tutorials -type l ! -exec test -e {} \; -print
    prints nothing.
  • 5. Re-run bin/sync-docs.sh and commit anything it changes. The
    new submodule pointer restores the viscoTube image that the
    manifest currently cannot link.
  • 6. Mark ready for review (gh pr ready 82) and merge.

Structure

documentation/
├── overview.md
├── solid-models/          README + linGeomTotalDispSolid,
│                          nonLinGeomTotalLagTotalDispSolid,
│                          nonLinGeomUpdatedLagSolid
├── fluid-models/
├── fluid-solid-interfaces/
├── function-objects/
├── applications/          README + solids4Foam, utilities,
│                          decomposeParMonolithic, scripts
└── under-the-hood/        README + stabilisation-models, contributing

Content is imported exactly as before: git symlinks into
imported/solids4foam, with each page's images symlinked beside it.

fluid-models, fluid-solid-interfaces and function-objects become
directories 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 sort values.

URLs

Every previous URL still works. jekyll-redirect-from is added to the plugin
list 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.html and
function-objects.html redirect rather than 404. Redirect pages are filtered
out of the sidebar in site_pages.liquid.

Also

  • overview.md 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.html. The four
    stale solids4foam.github.io links are gone.
  • tutorials/more-tutorials/fluid-mechanics/README.md added — it was the one
    tutorial section without an index page, so the sidebar printed its raw URL.
  • Ten unreferenced images removed from documentation/images; the five still
    in use moved into the section directories that consume them.
  • Typo in the solid mechanics tutorials landing page.

Verification

  • jekyll build --safe against the companion branch: all 22 documentation
    pages render, and --safe does follow the symlinks.
  • Whole-site link check over the built output: 118 pages, zero broken
    internal links (there were three before).
  • No dangling symlinks under documentation/ or tutorials/.
  • markdownlint-cli2 --config .markdownlint.json over documentation/**:
    clean. prettier --check on every file touched: clean.
  • Each redirect stub verified to emit the intended target.

🤖 Generated with Claude Code


Update: symlink tooling (Phase 0 remainder)

Commit f12feec adds the manifest-driven tooling the plan's Phase 0 called
for. It lives here rather than in a separate PR off master because
bin/docs-manifest.txt describes the section tree this PR creates, so it
cannot stand alone.

  • bin/docs-manifest.txt — one line per published page, mapping the site
    path to the path within the submodule. 71 entries.
  • bin/sync-docs.sh — generates the page symlinks and each page's
    images/ directory from the manifest. Refuses to overwrite non-symlinks and
    fails on a missing target. --check reports drift without writing.
  • .github/workflows/docs-symlinks.yml — runs --check plus a
    dangling-symlink check. Both were confirmed to fail on a deliberately
    mistyped symlink.

Regenerating drops 18 image symlinks no page references: eight hotSphere
figures linked twice over, one fillingElasticContainer figure, and
viscoTube-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 --safe with 414 pages; the internal
linkcheck reports no dead links; shellcheck is clean.

Why this PR reports no CI checks

Not a workflow bug. The PR is CONFLICTING on imported/solids4foam, so
GitHub cannot create the merge ref and therefore never generates
pull_request workflow runs. Checklist step 3 resolves the conflict, and the
checks will appear on their own. Until then both workflows have to be run by
manual dispatch.

Still outstanding

submodules: true on actions/checkout in markdownlint.yml — the last
Phase 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.

philipcardiff and others added 3 commits August 1, 2026 10:38
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>
@philipcardiff

Copy link
Copy Markdown
Collaborator Author

Reminder before merging: this PR's submodule pointer is 7410d74, which
only exists on the docs-phase1 branch of solids4foam/solids4foam#324.

Merging as-is would point master at a commit that is not on development.
Merge #324 first, then update the pointer — the checklist in the description
has the exact commands. Marked as a draft until that is done.

@philipcardiff
philipcardiff marked this pull request as draft August 1, 2026 10:19
@philipcardiff

Copy link
Copy Markdown
Collaborator Author

Correction to the checklist above: update-submodule.yml in the toolbox repo pushes a submodule bump directly to master here on every push to development. So step 2 is not a manual pointer update — once #324 merges, master picks up the right commit automatically, and this branch then needs master merged in with imported/solids4foam resolved in its favour. The description has been updated.

philipcardiff and others added 4 commits August 1, 2026 11:47
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>
@philipcardiff

Copy link
Copy Markdown
Collaborator Author

Phase 2 folded into this branch (c1189e2, fdc6793): the manifest entries and symlinks for the twelve remaining solid model pages, plus a sidebar fix.

New hard ordering constraint. c1189e2 changes site_pages.liquid from sort_natural to the numeric sort filter, because the old string comparison puts 10 before 2 — already visible live, where the linear elasticity tutorials list as 1, 10, 14, 2, 3, 4, 5, 7. The numeric filter refuses to compare mixed types, so it breaks the entire build (comparison of Array with Array failed, not a per-page failure) against any submodule commit still containing a sort: xx placeholder. Four tutorial READMEs had them; they are fixed in solids4foam/solids4foam#324.

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 --safe (118 before), solid models sidebar numbered 1-15 in order with no strays or duplicates, sync-docs.sh --check clean, no dangling symlinks, zero dead internal links, and markdownlint-cli2 clean over documentation/**.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant