feat(techdocs): add techdocs-cli option to disable external font download
Signed-off-by: Karthik <karthik.jk11@gmail.com>
This commit is contained in:
@@ -42,6 +42,7 @@ export default async function generate(opts: OptionValues) {
|
||||
const dockerImage = opts.dockerImage;
|
||||
const pullImage = opts.pull;
|
||||
const legacyCopyReadmeMdToIndexMd = opts.legacyCopyReadmeMdToIndexMd;
|
||||
const disableExternalFonts = opts.disableExternalFonts;
|
||||
const defaultPlugins = opts.defaultPlugin;
|
||||
|
||||
logger.info(`Using source dir ${sourceDir}`);
|
||||
@@ -64,6 +65,7 @@ export default async function generate(opts: OptionValues) {
|
||||
mkdocs: {
|
||||
legacyCopyReadmeMdToIndexMd,
|
||||
omitTechdocsCorePlugin,
|
||||
disableExternalFonts,
|
||||
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(
|
||||
'--disableExternalFonts',
|
||||
'Disable external font downloads by default by setting theme.font: false in mkdocs.yml when not already configured. Useful for air-gapped environments where Google fonts cannot be accessed.',
|
||||
false,
|
||||
)
|
||||
.option(
|
||||
'--defaultPlugin [defaultPlugins...]',
|
||||
'Plugins which should be added automatically to the mkdocs.yaml file',
|
||||
|
||||
Reference in New Issue
Block a user