fix(techdocs): do not copy docs/README.md as docs/index.md
Signed-off-by: Phil Kuang <pkuang@factset.com>
This commit is contained in:
@@ -42,6 +42,7 @@ export default async function generate(cmd: Command) {
|
||||
const omitTechdocsCorePlugin = cmd.omitTechdocsCoreMkdocsPlugin;
|
||||
const dockerImage = cmd.dockerImage;
|
||||
const pullImage = cmd.pull;
|
||||
const legacyCopyReadmeMdToIndexMd = cmd.legacyCopyReadmeMdToIndexMd;
|
||||
|
||||
logger.info(`Using source dir ${sourceDir}`);
|
||||
logger.info(`Will output generated files in ${outputDir}`);
|
||||
@@ -56,6 +57,7 @@ export default async function generate(cmd: Command) {
|
||||
runIn: cmd.docker ? 'docker' : 'local',
|
||||
dockerImage,
|
||||
pullImage,
|
||||
legacyCopyReadmeMdToIndexMd,
|
||||
mkdocs: {
|
||||
omitTechdocsCorePlugin,
|
||||
},
|
||||
|
||||
@@ -59,6 +59,11 @@ export function registerCommands(program: CommanderStatic) {
|
||||
"Don't patch MkDocs file automatically with techdocs-core plugin.",
|
||||
false,
|
||||
)
|
||||
.option(
|
||||
'--legacyCopyReadmeMdToIndexMd',
|
||||
'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,
|
||||
)
|
||||
.alias('build')
|
||||
.action(lazy(() => import('./generate/generate').then(m => m.default)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user