Getting started with Typedocinc
Insert files content in documentation pages generated with typedoc
.
With this tool, API documentation writers will insert their own content before and after the original content of a typedoc-generated documentation. For every .html
file in the original documentation, the tool creates the <basename>_before.md
and <basename>_after.md
files. Next, the documentation writer adds content in these files. Finally, the tool merges the original documentation and the before
and after
files, and saves the new documentation.
Install
Install typedocinc
as global
:
npm i typedocinc -g
Check it works:
typedocinc -h
Usage: typedocin [options] [command]
Includes files in documentation generated with typedoc
Options:
-V, --version output the version number
-v, --verbose show detail messages during execution. (default: false)
-h, --help display help for command
Commands:
prepare|p [options] <path> prepare original documentation in <path> by creating its before and after files
build|b [options] <path> enhance original documentation in <path> by mergind before and after files in the original documentation.
generate|g [options] <path> prepare before and after files, enhance original documentation in <path> by mergind before and after files
in the original documentation.
help [command] display help for command
Usage
typedocinc build original --includes original_includes --target original_modified
Build a modified documentation version in original_modified
. Merge the original documentation in original
folder with custom content in original_includes
folder.
The original_includes
folder contains the files with the content you want to include either before (_before
) or after (_after
) the API documentation text in the original
.
For example, you want to include your custom text before API text in original/index.html
. To this end, you will create the original_includes/index_before.md
file. To include your custom text after the API text in original/index.html
, you will create the original_includes/index_after.md
In original_includes/index_before.md
:
## Hello World!
Welcome to our software product API documentation. You can find as at [FintechOS](http://fintechos.com). Use Markdown notation to quickly add content such as paragraphs, headers, tables, links, bullet and item lists.
In original_includes/index_after.md
:
## Awesome, right?
We encourage you to contact us with your questions, comments and suggestions. Please feel free to contact our visit our [Community](http://community.fintechos.com).
typedocinc prepare original --includes original_includes
typedocinc prepare original --includes original_includes --clear
Getting help
Get basic help information
// short option name
typedocinc -h
// or the long option name
typedocinc --help
// or the help command
typedocinc help [command]
prepare | p
command
Get help for typedocinc help prepare
Usage: typedocin prepare|p [options] <path>
prepare original documentation in <path> by creating its before and after files
Options:
-i, --includes <path> Path where before and after files will be created.
-c, --clear Override before and after files (default: false)
-d, --defaultIncludes <path> Path to file with default content for includes files
-b, --beforeIncludes <path> Path to file with default before content for includes files
-a, --afterIncludes <path> Path to file with default after content for includes files
-h, --help display help for command
build | b
command
Get help for typedocinc help build
Usage: typedocin build|b [options] <path>
enhance original documentation in <path> by mergind before and after files in the original documentation.
Options:
-i, --includes <path> Path where before and after files already exist.
-t, --target <path> Path where enhanced documentation is saved into.
-h, --help display help for command
Get help for generate | g
command
typedocinc help generate
Usage: typedocin generate|g [options] <path>
prepare before and after files, enhance original documentation in <path> by mergind before and after files in the original documentation.
Options:
-i, --includes <path> Path where before and after files already exist.
-t, --target <path> Path where enhanced documentation is saved into.
-c, --clear Override before and after files (default: false)
-d, --defaultIncludes <path> Path to file with default content for includes files
-b, --beforeIncludes <path> Path to file with default before content for includes files
-a, --afterIncludes <path> Path to file with default after content for includes files
-h, --help display help for command