Merge pull request #31838 from karthikjeeyar/mkdocs-patch

feat(techdocs): add app-config option to disable external font download
This commit is contained in:
Andre Wanlin
2026-04-29 12:47:12 -05:00
committed by GitHub
14 changed files with 257 additions and 6 deletions
+1
View File
@@ -27,6 +27,7 @@ Usage: techdocs-cli generate|build [options]
Options:
--defaultPlugin [defaultPlugins...]
--disableExternalFonts
--docker-image <DOCKER_IMAGE>
--etag <ETAG>
--legacyCopyReadmeMdToIndexMd
@@ -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',