Here are more information that you will probably need to work on the book itself.
The script copy_plugins_readme.py can copy the plugins' README, found in the repository that contains their source code (alumet-dev/alumet), to the user book repository (this one).
Usage:
./copy_plugins_readmes.py ALUMET_REPO_PATH [PLUGIN_NAME]To copy all the readmes (assuming that alumet and user-book have been cloned in the same parent directory):
./copy_plugins_readmes.py ../alumetTo copy one readme, for instance for plugin rapl:
./copy_plugins_readmes.py ../alumet raplThe script will:
- Find the
README.mdof each plugin. - Find the corresponding
.mdfile in the sources of the user book. - Overwrite the user book doc with the content of the readme or, if there is no existing documentation in the user book, create a new
.mdfile in theplugins/directory.
You should review the changes and make some adjustements, such as adding screenshots, explaining new concepts, moving the new .md files to the right section, etc.
In the case of a new plugin, don't forget to update SUMMARY.md.
See the mdBook documentation.
- Regenerate the
themefolder with default mdbook files. This allows the theme to be updated to the current version of mdbook.
mdbook init --theme- Cancel (with git) the modifications of
book.toml - Remove all theme files except
index.hbs
find ./theme -type f ! -name 'index.hbs' -delete
rmdir ./theme/fonts ./theme/css- Update
theme/with the modifications that you want. For instance, for a page-level table of contents, modifyindex.hbsin this way:
<main>
+ <div class="content-wrap">
{{{ content }}}
+ </div>
+ <div id="sidetoc">
+ <nav id="pagetoc"></nav>
+ </div>
</main>- Update the
pagetocaddon (see the relevant section)
The addons folder contains assets used by external preprocessors or other tools that add features to mdBook.
mdbook-pagetoc provides page-level table of content with JS.
To update:
- Download the files from the repository.
- Replace
pagetoc.cssandpagetoc.jsinaddons/.
mdbook-mermaid is a preprocessor that adds support for mermaid.js diagrams.
To update:
- Download the new assets or obtain them by running
mdbook-mermaid install $(pwd). - Put the new assets in
addons/. - Update the version of
mdbook-mermaidthat is used in thedeployworkflow, by modifyingdeploy.yml.