Skip to content

Commit

Permalink
feat(site): update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
juanrgm committed Nov 21, 2024
1 parent 070ae31 commit 97000d8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 25 deletions.
10 changes: 1 addition & 9 deletions packages/site/src/components/CommandPage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro";
interface Props {
name: string;
description: string;
}
const props = Astro.props;
---
Expand All @@ -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" }]}
>
<h2 id="command">Command</h2>
<Code lang="sh" code={`npx dk ${props.name}`} />

<h2 id="description">Description</h2>
<p>{props.description}</p>
<slot />
</StarlightPage>

Expand Down
10 changes: 5 additions & 5 deletions packages/site/src/pages/api/$settings/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 0 additions & 11 deletions packages/site/src/pages/commands/generate.astro

This file was deleted.

10 changes: 10 additions & 0 deletions packages/site/src/pages/commands/generate.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import CommandPage from "../../components/CommandPage.astro";

<CommandPage name="generate">
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.

</CommandPage>

0 comments on commit 97000d8

Please sign in to comment.