File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed
Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ See https://oprypin.github.io/mkdocs-literate-nav/
1313 - [ Dependency pinning and testing] ( further-background/dependency-pinning-and-testing.md )
1414- [ Development] ( development.md )
1515- [ API reference] ( api/example_fgen_basic/ )
16- - [ Fortran API] ( fortran-api/ )
16+ - [ Fortran API] ( fortran-api/example_fgen_basic/ )
1717- [ Changelog] ( changelog.md )
Original file line number Diff line number Diff line change 88import subprocess
99from pathlib import Path
1010
11+ import mkdocs_gen_files
12+
1113REPO_ROOT = Path (__file__ ).parents [1 ]
14+ PACKAGE_NAME_ROOT = "example_fgen_basic"
15+ ROOT_DIR = Path ("fortran-api" )
16+ nav = mkdocs_gen_files .Nav ()
1217
1318ford = shutil .which ("ford" )
1419if ford is None :
2126)
2227
2328# Put back the gitkeep file which ford deletes
24- (REPO_ROOT / "docs" / "fortran-api" / ".gitkeep" ).touch ()
29+ (REPO_ROOT / "docs" / ROOT_DIR / ".gitkeep" ).touch ()
30+
31+ # TODO: figure out why this causes the final route to go to the wrong place
32+ nav [PACKAGE_NAME_ROOT ] = "index.html"
33+
34+ # Temporary solution - only add index to navigation.
35+ # Can get more fancy in future.
36+ with mkdocs_gen_files .open (ROOT_DIR / PACKAGE_NAME_ROOT / "NAVIGATION.md" , "w" ) as fh :
37+ fh .writelines (nav .build_literate_nav ())
Original file line number Diff line number Diff line change 11---
22project : Example fgen - basic
33author : TODO align this with pyproject.toml
4- output_dir : docs/fortran-api
4+ output_dir : docs/fortran-api/example_fgen_basic
55src_dir : src
66graph : true
77---
You can’t perform that action at this time.
0 commit comments