From c9758fe81ecc0be18d6802d1a35c757eccd0f952 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Tue, 10 Jan 2023 14:16:53 -0600 Subject: [PATCH] Updated default name and params Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- packages/techdocs-cli/src/commands/index.ts | 6 +++--- .../techdocs-node/src/stages/generate/helpers.ts | 13 ++++++------- plugins/techdocs-node/src/stages/generate/types.ts | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/techdocs-cli/src/commands/index.ts b/packages/techdocs-cli/src/commands/index.ts index 0ff52eee36..102e6d87de 100644 --- a/packages/techdocs-cli/src/commands/index.ts +++ b/packages/techdocs-cli/src/commands/index.ts @@ -57,7 +57,7 @@ export function registerCommands(program: Command) { .option( '--site-name', 'Name for site when using default MkDocs config', - 'Table of Contents', + 'Documentation Site', ) .option('-v --verbose', 'Enable verbose output.', false) .option( @@ -232,7 +232,7 @@ export function registerCommands(program: Command) { .option( '--site-name', 'Name for site when using default MkDocs config', - 'Table of Contents', + 'Documentation Site', ) .option('-p, --port ', 'Port to serve documentation locally', '8000') .option('-v --verbose', 'Enable verbose output.', false) @@ -263,7 +263,7 @@ export function registerCommands(program: Command) { .option( '--site-name', 'Name for site when using default MkDocs config', - 'Table of Contents', + 'Documentation Site', ) .option('--mkdocs-port ', 'Port for MkDocs server to use', '8000') .option('-v --verbose', 'Enable verbose output.', false) diff --git a/plugins/techdocs-node/src/stages/generate/helpers.ts b/plugins/techdocs-node/src/stages/generate/helpers.ts index ee0ba8b6fd..5fc74eafc2 100644 --- a/plugins/techdocs-node/src/stages/generate/helpers.ts +++ b/plugins/techdocs-node/src/stages/generate/helpers.ts @@ -154,8 +154,8 @@ export const MKDOCS_SCHEMA = DEFAULT_SCHEMA.extend([ * Generates a mkdocs.yml configuration file * * @param inputDir - base dir to where the mkdocs.yml file will be created - * @param siteName - name of site to be used in mkdocs.yml for the - * required `site_name` property, default value is "Table of Contents" + * @param siteOptions - options for the site: `name` property will be used in mkdocs.yml for the + * required `site_name` property, default value is "Documentation Site" */ export const generateMkdocsYml = async ( inputDir: string, @@ -168,7 +168,7 @@ export const generateMkdocsYml = async ( // minimum mkdocs.yml file const mkdocsYmlPath = path.join(inputDir, 'mkdocs.yml'); - const defaultSiteName = siteOptions?.name ?? 'Table of Contents'; + const defaultSiteName = siteOptions?.name ?? 'Documentation Site'; const defaultMkdocsContent = `site_name: ${defaultSiteName}\n` + 'docs_dir: docs\n' + @@ -186,10 +186,9 @@ export const generateMkdocsYml = async ( * depending on which is present (MkDocs supports both as of v1.2.2). * @public * - * @param inputDir - base dir to be searched for either an mkdocs.yml or - * mkdocs.yaml file. - * @param siteName - name of site to be used in mkdocs.yml for the - * required `site_name` property, default value is "Table of Contents" + * @param inputDir - base dir to be searched for either an mkdocs.yml or mkdocs.yaml file. + * @param siteOptions - options for the site: `name` property will be used in mkdocs.yml for the + * required `site_name` property, default value is "Documentation Site" */ export const getMkdocsYml = async ( inputDir: string, diff --git a/plugins/techdocs-node/src/stages/generate/types.ts b/plugins/techdocs-node/src/stages/generate/types.ts index 4c1f074797..1d0c6bb8f2 100644 --- a/plugins/techdocs-node/src/stages/generate/types.ts +++ b/plugins/techdocs-node/src/stages/generate/types.ts @@ -53,7 +53,7 @@ export type GeneratorConfig = { * @param etag - A unique identifier for the prepared tree e.g. commit SHA. If provided it will be stored in techdocs_metadata.json. * @param logger - A logger that forwards the messages to the caller to be displayed outside of the backend. * @param logStream - A log stream that can send raw log messages to the caller to be displayed outside of the backend. - * @param siteName - Name of the site to be used in mkdocs.yml for the required `site_name` property, default value is "Table of Contents" + * @param siteOptions - Options for the site: The `name` property will be used in mkdocs.yml config for the required `site_name` property, default value is "Documentation Site" */ export type GeneratorRunOptions = { inputDir: string;