Skip to content

Commit b1aa7c0

Browse files
Split febcode reference out of the Features tab into its own top-level tab
Per Steve Maas's request in the FEBio discussion thread, the febcode input-file-format reference was easy to miss buried at the bottom of the Features tab's nav. build.py now writes it as a fourth top-level nav key (a sibling of Theory/Studio/Features) instead of tools/features2md.py nesting it inside the Features manual's own nav tree. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CKmmAMYDcwi64diTqw5MPb
1 parent a01e45f commit b1aa7c0

7 files changed

Lines changed: 40 additions & 15 deletions

File tree

CLAUDE.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
55
## What this repo is
66

77
A MkDocs site that generates all of FEBio's manuals into one site (Material for MkDocs theme, indigo
8-
palette, `pymdownx.arithmatex` + MathJax for equations, footnote-based citations). The site has three
9-
`navigation.tabs`, each a separately generated manual, orchestrated by `build.py`'s `MANUALS` list. Each
10-
entry has a `"kind"` selecting its converter:
8+
palette, `pymdownx.arithmatex` + MathJax for equations, footnote-based citations). The site has four
9+
`navigation.tabs`. Three are separately generated manuals, orchestrated by `build.py`'s `MANUALS` list
10+
each entry has a `"kind"` selecting its converter:
1111

1212
- **Theory** (`kind: "lyx"`, `source/FEBio_Theory_Manual.lyx``docs/theory/`) — all 9 chapters (1–8
1313
plus Appendix A) are converted.
@@ -16,7 +16,14 @@ entry has a `"kind"` selecting its converter:
1616
- **Features** (`kind: "features"`, `source/feature-manual/``docs/features/`) — the FEBio Feature
1717
Manual, absorbed from the standalone `febio-feature-manual` repo. Generated by `tools/features2md.py`
1818
(not `lyx2md.py`) from `febio_features.json` plus per-feature description fragments in `meta/`.
19-
660 feature pages, 7 module pages, plot/log variable tables, and the hand-authored febcode page.
19+
660 feature pages, 7 module pages, and plot/log variable tables.
20+
21+
The fourth tab, **Febcode** (`docs/features/febcode.md`, hand-authored), is *not* in `MANUALS` — it's a
22+
single page that lives under the Features manual's `docs_root` but that `build.py` promotes to its own
23+
top-level nav key right after the `MANUALS` loop, rather than letting it stay nested inside the Features
24+
tab's own nav tree as it used to (see the comments at both call sites in `build.py` /
25+
`tools/features2md.py` if this changes again — split out per
26+
[Steve Maas's request](https://github.com/febiosoftware/FEBio/discussions/130#discussioncomment-18179757)).
2027

2128
`source/` is vendored/checked-in for all three manuals, so the repo builds standalone from a bare clone.
2229

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# FEBio-Documentation
22

33
A MkDocs site collecting FEBio's manuals into one searchable site (Material for MkDocs theme, indigo
4-
palette, `pymdownx.arithmatex` + MathJax for equations, footnote-based citations). The site has three
5-
tabs, each a separately generated manual:
4+
palette, `pymdownx.arithmatex` + MathJax for equations, footnote-based citations). The site has four
5+
tabs:
66

77
- **Theory** — the FEBio Theory Manual. Started as a single-chapter pilot (Chapter 2, Continuum
88
Mechanics); now covers the complete manual — Chapters 1 through 8 plus Appendix A (Tensor Calculus).
@@ -13,6 +13,11 @@ tabs, each a separately generated manual:
1313
- **Features** — the FEBio Feature Manual, absorbed from the standalone
1414
[`febio-feature-manual`](https://github.com/febiosoftware/febio-feature-manual) repository. 660 feature
1515
pages across 32 categories, 7 module pages, and the plot/log output-variable tables.
16+
- **Febcode** — the FEBio input-file-format (`.feb`) reference, a single hand-authored page that used to
17+
be buried at the bottom of the Feature Manual's own nav. Split out into its own top-level tab per
18+
[Steve Maas's request](https://github.com/febiosoftware/FEBio/discussions/130#discussioncomment-18179757),
19+
since it's a distinct kind of reference (input file syntax, not feature-by-feature parameter docs) that
20+
deserved to be easy to find from the site's tab bar.
1621

1722
The two LyX manuals share one generic, stdlib-only converter (`tools/lyx2md.py`). The Feature Manual has
1823
no LyX source — it is generated from FEBio's exported feature database by `tools/features2md.py`. Both
@@ -45,7 +50,7 @@ tools/features2md.py the Feature Manual generator (port of febio-feat
4550
build.py runs the right converter per manual (see its MANUALS list), generates mkdocs.yml
4651
docs/ generated Markdown SOURCE for mkdocs -- this is mkdocs's input, not the
4752
deployed site; see "Deployment" below
48-
index.md site root landing page (not manual-specific; links to all three tabs)
53+
index.md site root landing page (not manual-specific; links to all four tabs)
4954
theory/index.md Theory Manual Preface (hand-authored)
5055
theory/chapter<N>/*.md Theory Manual generated pages
5156
studio/index.md Studio Manual Preface (hand-authored)
@@ -105,13 +110,17 @@ the entry's `"kind"`:
105110
per converted chapter, expanding to that chapter's sections.
106111
- `"features"` (Features) → `tools/features2md.py`. Its sidecar records a freely nested nav tree, which
107112
`build.py`'s `write_nav()` emits recursively; the nav becomes a Preface entry followed by Modules,
108-
Features (subdivided by category), Output, and Febcode.
113+
Features (subdivided by category), and Output.
109114

110115
`"kind"` also gates the figure-fetching step: only `"lyx"` manuals fetch missing figures from upstream,
111116
since the Feature Manual's figures are vendored in `docs/features/features/figs/`.
112117

113118
Navigation uses `navigation.tabs`, so each manual is exactly one top-level nav key rendered as a tab
114-
("Theory", "Studio", "Features").
119+
("Theory", "Studio", "Features"). Febcode (`docs/features/febcode.md`) is the one exception: it's a page
120+
that lives under the Features manual's `docs_root`, but `build.py` writes it as its own top-level nav key
121+
— a fourth tab — right after the `MANUALS` loop, rather than letting `tools/features2md.py` nest it inside
122+
the Features tab as it used to. `tools/features2md.py`'s nav tree deliberately omits it for this reason;
123+
see the comments at both call sites if this needs to change again.
115124

116125
## Deployment
117126

build.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,14 @@ def write_nav(f, items, indent):
228228
for title, path in chap["nav"]:
229229
f.write(f" - {title}: {path}\n")
230230

231+
# Febcode (the FEBio input-file-format reference) is a page of the
232+
# Features manual's own docs_root, but per Steve Maas's request
233+
# (github.com/febiosoftware/FEBio/discussions/130#discussioncomment-18179757)
234+
# it gets its own top-level tab here rather than being nested inside the
235+
# Features tab, since it's a distinct kind of reference (input file
236+
# syntax) from the feature-by-feature parameter docs around it.
237+
f.write(" - Febcode: features/febcode.md\n")
238+
231239
for manual in MANUALS:
232240
if manual["kind"] == "features":
233241
t = manual_stats[manual["key"]]["totals"]

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ versioned static site with [MkDocs](https://www.mkdocs.org/) and the
1010
GUI.
1111
- **[Features](features/index.md)** — the FEBio Feature Manual: a reference for every feature
1212
available in FEBio, with its type string, parameters, and description.
13+
- **[Febcode](features/febcode.md)** — the FEBio input file (`.feb`) format reference.
1314

1415
Use the tabs above to browse any of the manuals.

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,4 +957,4 @@ nav:
957957
- "Output":
958958
- "Plot variables": features/plotvars.md
959959
- "Log variables": features/logvars.md
960-
- "Febcode": features/febcode.md
960+
- Febcode: features/febcode.md

tools/_stats_features.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2850,10 +2850,6 @@
28502850
"features/logvars.md"
28512851
]
28522852
]
2853-
],
2854-
[
2855-
"Febcode",
2856-
"features/febcode.md"
28572853
]
28582854
],
28592855
"totals": {

tools/features2md.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,14 +244,18 @@ def main():
244244
"The following log variables are available in FEBio:",
245245
log_variables, missing_vars)
246246

247+
# Febcode (the FEBio input-file-format reference) is intentionally left
248+
# out of this nav tree -- build.py promotes it to its own top-level tab,
249+
# a sibling of Theory/Studio/Features, rather than nesting it inside the
250+
# Features tab. See build.py's MANUALS loop / the Febcode tab it writes
251+
# right after it.
247252
nav = [
248253
["Modules", module_nav],
249254
["Features", feature_nav],
250255
["Output", [
251256
["Plot variables", f"{args.nav_root}/plotvars.md"],
252257
["Log variables", f"{args.nav_root}/logvars.md"],
253258
]],
254-
["Febcode", f"{args.nav_root}/febcode.md"],
255259
]
256260

257261
stats = {

0 commit comments

Comments
 (0)