diff --git a/bin/commands/generate.mjs b/bin/commands/generate.mjs index d4586663..81dee2b0 100644 --- a/bin/commands/generate.mjs +++ b/bin/commands/generate.mjs @@ -56,6 +56,12 @@ export default new Command('generate') .addOption(new Option('-c, --changelog ', 'Changelog URL or path')) .addOption(new Option('--git-ref', 'Git ref URL')) .addOption(new Option('--index ', 'index.md URL or path')) + .addOption( + new Option( + '--index-redirect-url ', + 'URL to redirect index.html to (legacy-html generator)' + ) + ) .addOption(new Option('--minify', 'Minify?')) .addOption(new Option('--type-map ', 'Type map URL or path')) diff --git a/src/generators/legacy-html/index.mjs b/src/generators/legacy-html/index.mjs index 32003ec1..6826ebd1 100644 --- a/src/generators/legacy-html/index.mjs +++ b/src/generators/legacy-html/index.mjs @@ -31,6 +31,7 @@ export default createLazyGenerator({ ref: 'main', pageURL: '{baseURL}/latest-{version}/api{path}.html', editURL: `${GITHUB_EDIT_URL}/doc/api{path}.md`, + indexRedirectURL: '', }, hasParallelProcessor: true, diff --git a/src/generators/legacy-html/template.html b/src/generators/legacy-html/template.html index 0142fde1..7ef803f8 100644 --- a/src/generators/legacy-html/template.html +++ b/src/generators/legacy-html/template.html @@ -1,6 +1,7 @@ + __REDIRECT__ @@ -25,7 +26,7 @@