From 97000d82b511ec6690d36faf613fdcb427767cd8 Mon Sep 17 00:00:00 2001 From: Juanra GM Date: Thu, 21 Nov 2024 13:21:23 +0100 Subject: [PATCH] feat(site): update docs --- packages/site/src/components/CommandPage.astro | 10 +--------- packages/site/src/pages/api/$settings/index.mdx | 10 +++++----- packages/site/src/pages/commands/generate.astro | 11 ----------- packages/site/src/pages/commands/generate.mdx | 10 ++++++++++ 4 files changed, 16 insertions(+), 25 deletions(-) delete mode 100644 packages/site/src/pages/commands/generate.astro create mode 100644 packages/site/src/pages/commands/generate.mdx diff --git a/packages/site/src/components/CommandPage.astro b/packages/site/src/components/CommandPage.astro index ade0bb2..a5cfccb 100644 --- a/packages/site/src/components/CommandPage.astro +++ b/packages/site/src/components/CommandPage.astro @@ -4,7 +4,6 @@ import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro"; interface Props { name: string; - description: string; } const props = Astro.props; --- @@ -13,16 +12,9 @@ const props = Astro.props; frontmatter={{ title: props.name, }} - headings={[ - { depth: 2, text: "Command", slug: "command" }, - { depth: 2, text: "Description", slug: "description" }, - ]} + headings={[{ depth: 2, text: "Description", slug: "description" }]} > -

Command

- -

Description

-

{props.description}

diff --git a/packages/site/src/pages/api/$settings/index.mdx b/packages/site/src/pages/api/$settings/index.mdx index 8141b33..08f78d6 100644 --- a/packages/site/src/pages/api/$settings/index.mdx +++ b/packages/site/src/pages/api/$settings/index.mdx @@ -28,23 +28,23 @@ In production mode, it is possible to change the path from which the settings ar #### name -You can have as many settings as you want, since each one of them will use the 'name' option that you have assigned to save its data. +You can have as many settings as you want, since each one of them will use the `name` option that you have assigned to save its data. #### params -The settings parameters are defined with the 'params' option and their values ​​are loaded and validated directly from the 'settings.json' file. +The settings parameters are defined with the `params` option and their values ​​are loaded and validated directly from the `settings.json` file. If the data types of the settings do not match the defined ones, a fatal error will be generated which will prevent the application from starting, thus early detection of errors. #### generator -The settings file will be automatically generated if the settings have the 'generator' option, so you could initialize certain settings as random keys if these have not been defined already. +The settings file will be automatically generated if the settings have the `generator` option, so you could initialize certain settings as random keys if these have not been defined already. #### optional -Sometimes it may be necessary to have optional settings and we want the application to start even if the settings have not been defined. This can be done by enabling the 'optional' option. +Sometimes it may be necessary to have optional settings and we want the application to start even if the settings have not been defined. This can be done by enabling the `optional` option. -When someone consumes the settings if you leave them undefined, it will throw a local error. You can also consume the settings optionally with 'iocParam' (see examples below). +When someone consumes the settings if you leave them undefined, it will throw a local error. You can also consume the settings optionally with `iocParam` (see examples below). #### create diff --git a/packages/site/src/pages/commands/generate.astro b/packages/site/src/pages/commands/generate.astro deleted file mode 100644 index 984272b..0000000 --- a/packages/site/src/pages/commands/generate.astro +++ /dev/null @@ -1,11 +0,0 @@ ---- -import CommandPage from "../../components/CommandPage.astro"; ---- - - -

- In development mode, metadata is generated live based on changes made to the - code, but there may be times when you want to generate this metadata without - entering development mode or simply force its generation. -

-
diff --git a/packages/site/src/pages/commands/generate.mdx b/packages/site/src/pages/commands/generate.mdx new file mode 100644 index 0000000..8a4c89f --- /dev/null +++ b/packages/site/src/pages/commands/generate.mdx @@ -0,0 +1,10 @@ +import CommandPage from "../../components/CommandPage.astro"; + + +Generates all metadata. + +In development mode, metadata is generated live based on changes made to the +code, but there may be times when you want to generate this metadata without +entering development mode or simply force its generation. + +