feat(techdocs-cli): add --defaultPlugin argument to the generate command
Signed-off-by: Dominik Schwank <dominik.schwank@sda.se>
This commit is contained in:
@@ -47,6 +47,7 @@ export default async function generate(opts: OptionValues) {
|
||||
const dockerImage = opts.dockerImage;
|
||||
const pullImage = opts.pull;
|
||||
const legacyCopyReadmeMdToIndexMd = opts.legacyCopyReadmeMdToIndexMd;
|
||||
const defaultPlugins = opts.defaultPlugin;
|
||||
|
||||
logger.info(`Using source dir ${sourceDir}`);
|
||||
logger.info(`Will output generated files in ${outputDir}`);
|
||||
@@ -68,6 +69,7 @@ export default async function generate(opts: OptionValues) {
|
||||
mkdocs: {
|
||||
legacyCopyReadmeMdToIndexMd,
|
||||
omitTechdocsCorePlugin,
|
||||
defaultPlugins,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -70,6 +70,11 @@ export function registerCommands(program: Command) {
|
||||
'Attempt to ensure an index.md exists falling back to using <docs-dir>/README.md or README.md in case a default <docs-dir>/index.md is not provided.',
|
||||
false,
|
||||
)
|
||||
.option(
|
||||
'--defaultPlugin [defaultPlugins...]',
|
||||
'Plugins which should be added automatically to the mkdocs.yaml file',
|
||||
[],
|
||||
)
|
||||
.alias('build')
|
||||
.action(lazy(() => import('./generate/generate').then(m => m.default)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user