Applying _before, _after to all files
In this example, we will create the _before and _after files for all files in the original documentation. In Quick example you created includes files (ftosapifiles_includes/index_before.md, ftosapifiles_includes/index_after.md) manually. This may work for several original documentation files, but it is unfeasible for real documentation files.
We will create *_after.md and *_before.md files with typedocinc's prepare command.
Prerequisites
cdinside themy_projectfolder --ftosapifilesresides in this folder.
Step 1: Create _before and _after files in bulk
echo ## Top content for all > beforeContent.md
echo ## Bottom content for all > afterContent.md
typedocinc prepare ftosapifiles --includes ftosapifiles_includes --beforeIncludes beforeContent.md --afterIncludes afterContent.md --clear
This will create the ftosapifiles_includes folder *_before.md and *_after.md files that will correspond the files in ftosapifiles. Files *_before.md are copies of beforeContent.md file, and *_after.md are copies of afterContent.md file.
The --clear option will clear before and after files before creating the new before and after files. Use this with care, fully aware it will delete any previously created or modified before and after files.
**
Step 2: Insert _before and _after includes files
typedocinc build ftosapifiles --includes ftosapifiles_includes --target ftosapifiles_modified
The build command will include all _before.md before the API documentation in*.html, and include the *_after.md after the API documentation in *.html.
Step 3: Use modified documentation
Open the ftosapifiles_modified\index.html in your browser, and notice the content the before and after content.
Summary
We created content files for before and after in beforeContent.md and afterContents.md, and used the prepare command to create the ftosapifiles_includes/*_before.md and ftosapifiles_includes/*_after.md for each .html file in the ftosapifiles original documentation. The modified documentation is available in ftosapifiles_modified.