https://github.com/access-nri/mkdocs_include_stubs_plugin
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.9%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: ACCESS-NRI
- License: other
- Language: Python
- Default Branch: main
- Size: 151 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
- Releases: 0
Metadata Files
README.md
MkDocs include-configuration-stubs plugin
About
Mkdocs plugin to include configuration stubs within the build of a website for multiple branches within an ACCESS-NRI config repo. A configuration stub consists of a file in either of the supported file formats.
This plugin adds stub files to the website structure using the on_files mkdocs hook.
Make sure you include this plugin in the mkdocs.yml file before any other plugin that uses included files (for example the macros plugin), if you want the
files included by this plugin to be processed by those other plugins.
Supported file formats
- MarkDown (`.md`)
- HTML (`.html`)
Name of the stub pages in the website navigation
The name of the configuration stub pages in the website navigation will be inferred following the logic below:
- If the stub contains a title (# heading or <h1> block), that title is used.
- If no title is found, the stub file name is used instead.
Requirements
In addition to the requirements specified in the pyproject.toml file, this plugin requires and uses the following executables:
- git
Options
repoThe GitHub repository URL used to retrieve branches and tags for the configuration stubs to be included in the MkDocs site. It can be specified in one of the following formats:- GitHub URL (
https://github.com/OWNER/REPO) - GitHub SSH (
git@github.com:OWNER/REPO.git) OWNER/REPOIf not specified, the output ofgit remote get-url originfor the local directory will be used. Only GitHub repositories are supported.
- GitHub URL (
main_websiteConfiguration parameters for the main website. Sub-parameters:patternGit Glob pattern for Git refs to be included when searching for configuration stubs. To match multiple patterns, separate them with a space (e.g., "first-pattern second-pattern"). Default value isrelease-*.ref_typeType of Git ref to be used when searching for configuration stubs. Possible values arebranch,tag,all. Default value istag.branchGit branch where the main website documentation resides. Default value is the repository's default branch.
preview_websiteConfiguration parameters for the PR preview and local preview websites. Note: Themain_websiteconfigurations are also included when building preview websites. To exclude the main website from the preview websites, setno_maintotrue. Sub-parameters:patternGit Glob pattern for Git refs to be included when searching for configuration stubs. To match multiple patterns, separate them with a space (e.g., "first-pattern second-pattern"). Default value isdev-*.ref_typeType of Git ref to be used when searching for configuration stubs. Possible values arebranch,tag,all. Default value isbranch.no_mainIf set totrue, don't includemain_websiteconfigurations in the preview websites. Default value isfalse.
stubs_dirPath to the directory containing the configuration stubs, relative to the root of the repository. For each configuration, thestubs_dirmust contain exactly one file in one of the supported file formats. It may also include other files or directories, as long as only one file matches a supported format. When filtering the Git refs to determine which configurations to include, the following are excluded:- Refs that do not contain the
stubs_dirpath - Refs whose
stubs_dircontains multiple files of the same supported file format - Refs whose
stubs_dircontains files from multiple supported file format Default value isdocumentation/stub.
- Refs that do not contain the
stubs_parent_urlParent url path, relative to the root url, for the configuration stubs. Use an empty string ("") to specify the root url. Default value isconfigurations.Example: If the root url is
www.examplesite.organdstubs_parent_urlis set toconfigurations/stubs, then a potential configuration stub namedstub1will be added to the URL:www.examplesite.org/configurations/stubs/stub1stubs_nav_pathStructure that defines where the configuration stubs reside within the site navigation. Each navigation section should be connected to its subsection with a "greater than" (>) symbol. Use an empty string ("") to place the stubs directly at the top level of the navigation. By default, the value is derived fromstubs_parent_urlby capitalizing each path segment, replacing underscores with spaces and forward slashes (/) with "greather than" (>) symbols.Example 1: If
stubs_nav_pathis set toConfigurations > Stubs, the configuration stubs will be placed inside theStubssubsection, under the top-levelConfigurationsSection of the site navigation.Example 2: If no
stubs_nav_pathis specified andstubs_parent_urlis set tocustom/navigation/configuration_stubs, thestubs_nav_pathbecomesCustom > Navigation > Configuration stubs, placing the configuration stubs inside theConfiguration stubssubsection, within theNavigationsection, under the top-levelCustomSection of the site navigation.
MkDocs wrapper
This plugin also installs a mkdocs command line executable, which wraps around the default mkdocs command.
For more information, run:
mkdocs --help
Lincense
Apache Software License 2.0
Owner
- Name: ACCESS-NRI
- Login: ACCESS-NRI
- Kind: organization
- Email: access.nri@anu.edu.au
- Website: https://www.access-nri.org.au/
- Repositories: 17
- Profile: https://github.com/ACCESS-NRI
Australian Earth System Simulator - National Research Infrastructure
GitHub Events
Total
- Delete event: 1
- Push event: 3
- Create event: 1
Last Year
- Delete event: 1
- Push event: 3
- Create event: 1
Dependencies
- actions/checkout v4.2.2 composite
- conda-incubator/setup-miniconda v3 composite
- GitPython >=3.1
- mkdocs >=1.0
- versioneer *