Skip to content

Commit 3e17351

Browse files
committed
docs: consolidate list item separators to em dashes (#447)
Closes #446
1 parent 9db4b76 commit 3e17351

File tree

4 files changed

+34
-38
lines changed

4 files changed

+34
-38
lines changed

docs/README.md

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,46 +17,42 @@ docs/
1717

1818
## Writing Documentation
1919

20-
Write plain Markdown without frontmatter:
20+
Each Markdown file needs minimal YAML frontmatter with a title and description:
2121

2222
```markdown
23-
# Your Page Title
23+
---
24+
title: Your Page Title
25+
description: A brief summary of what this page covers.
26+
---
2427

2528
Content here...
2629
```
2730

28-
The build process automatically extracts the title from the first `# Heading` and adds frontmatter to a temporary copy.
31+
Starlight renders the `title` as the page's H1 heading, so do **not** add a separate `# Heading` in the content.
2932

3033
### Best Practices
3134

32-
- Use standard Markdown - keep it simple and GitHub-friendly
33-
- Start with H1 heading: `# Title`
34-
- Use relative links: `[text](./other-doc.md)`
35+
- Use standard Markdown keep it simple and GitHub-friendly
36+
- Always include `title` and `description` in frontmatter
37+
- Use relative links with `.md` extensions: `[text](./other-doc.md)` (works on GitHub; a rehype plugin strips `.md` at build time)
3538
- Use `.md` files (not `.mdx`) for better GitHub rendering
3639
- Code blocks with language: ` ```bash `
40+
- Use em dashes (``) to separate list item subjects from descriptions: `- **Term** — Description`
3741

3842
## Generated Documentation
3943

4044
Some docs are auto-generated from code:
4145

42-
- **`reference/cli.md`** - Generated by `scripts/generate-cli-docs.sh` from CLI command definitions
43-
- **`schemas/*.json`** - Generated by `scripts/generate-config-schemas.sh` from Rust types
46+
- **`reference/cli.md`** Generated by `scripts/generate-cli-docs.sh` from CLI command definitions
47+
- **`schemas/*.json`** Generated by `scripts/generate-config-schemas.sh` from Rust types
4448

4549
Run these scripts when command-line options or config types change.
4650

4751
## Build Process
4852

49-
The documentation website is built using [Astro](https://astro.build/) + [Starlight](https://starlight.astro.build/). The build process is handled by `scripts/prepare-docs.sh`, which:
53+
The documentation website is built using [Astro](https://astro.build/) + [Starlight](https://starlight.astro.build/). Starlight reads directly from the `docs/` directory via a glob content loader — no preprocessing step is needed.
5054

51-
1. Copies markdown files from `docs/` to `docs-site/.docs-temp/` (excluding schemas and READMEs)
52-
2. Adjusts relative paths and strips `.md` extensions for Starlight's clean URLs
53-
3. Adds frontmatter (extracts title from H1 heading)
54-
55-
This keeps source docs clean and framework-agnostic while enabling a polished documentation site. The script runs automatically during the build process (`npm run build` in `docs-site/`), but you can also run it manually:
56-
57-
```bash
58-
./scripts/prepare-docs.sh
59-
```
55+
A rehype plugin (`docs-site/plugins/rehype-rewrite-links.mjs`) rewrites `.md` links at build time so that relative links with `.md` extensions work on both GitHub and the documentation site.
6056

6157
## Preview
6258

@@ -85,8 +81,8 @@ The documentation website is automatically built and deployed to GitHub Pages:
8581
## Adding New Documentation
8682

8783
1. Create a `.md` file in the appropriate directory
88-
2. Start with a `# Heading` (used as page title)
89-
3. Write standard Markdown content
84+
2. Add YAML frontmatter with `title` and `description`
85+
3. Write standard Markdown content (no H1 heading — Starlight renders the title)
9086
4. Add the page to the sidebar in `../docs-site/astro.config.mjs` under the appropriate section:
9187
```js
9288
{
@@ -100,9 +96,9 @@ The documentation website is automatically built and deployed to GitHub Pages:
10096

10197
## Directory Guidelines
10298

103-
- **`guides/`** - Task-oriented, step-by-step instructions
104-
- **`concepts/`** - Understanding-oriented explanations
105-
- **`reference/`** - Information-oriented specifications
106-
- **`migration/`** - Version or tool migration guides
99+
- **`guides/`** Task-oriented, step-by-step instructions
100+
- **`concepts/`** Understanding-oriented explanations
101+
- **`reference/`** Information-oriented specifications
102+
- **`migration/`** Version or tool migration guides
107103

108104
This follows the [Diátaxis](https://diataxis.fr/) documentation framework.

docs/concepts/project-model.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ Networks can be defined in three ways:
6161
### Implicit networks
6262
6363
There are two implicit networks defined:
64-
- `local` - is a local managed network
65-
- `ic` - is the IC mainnet (connected network)
64+
- `local` is a local managed network
65+
- `ic` is the IC mainnet (connected network)
6666

6767
Their configuration is equivalent to:
6868

@@ -111,8 +111,8 @@ Environments can be defined in three ways:
111111
### Implicit Environments
112112

113113
There are two implicit environments:
114-
- `local` - uses the local managed network
115-
- `ic` - uses the IC mainnet
114+
- `local` uses the local managed network
115+
- `ic` uses the IC mainnet
116116

117117
They are defined like this:
118118

docs/guides/containerized-networks.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,9 @@ The anonymous principal must have sufficient ICP balance to fund all identities
217217
### Required System Canisters
218218

219219
The network must include these system canisters:
220-
- **ICP ledger** - For ICP token transfers during seeding
221-
- **Cycles ledger** - For cycles management
222-
- **Cycles minting canister (CMC)** - For converting ICP to cycles
220+
- **ICP ledger** For ICP token transfers during seeding
221+
- **Cycles ledger** For cycles management
222+
- **Cycles minting canister (CMC)** For converting ICP to cycles
223223

224224
## Troubleshooting
225225

@@ -401,9 +401,9 @@ ENTRYPOINT ["/app/start-network.sh"]
401401
Your custom network must include the system canisters and pre-funded accounts described in [Image Contract](#image-contract). In summary:
402402

403403
**Required system canisters:**
404-
- **ICP ledger canister** (`ryjl3-tyaaa-aaaaa-aaaba-cai`) - For ICP token transfers
405-
- **Cycles ledger canister** (`um5iw-rqaaa-aaaaq-qaaba-cai`) - For cycles management
406-
- **Cycles minting canister** (`rkp4c-7iaaa-aaaaa-aaaca-cai`) - For converting ICP to cycles
404+
- **ICP ledger canister** (`ryjl3-tyaaa-aaaaa-aaaba-cai`) For ICP token transfers
405+
- **Cycles ledger canister** (`um5iw-rqaaa-aaaaq-qaaba-cai`) For cycles management
406+
- **Cycles minting canister** (`rkp4c-7iaaa-aaaaa-aaaca-cai`) For converting ICP to cycles
407407

408408
**Pre-funded anonymous principal:**
409409

docs/reference/configuration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,10 @@ environments:
393393
## Schema
394394

395395
JSON schemas for editor integration are available in [docs/schemas/](https://github.com/dfinity/icp-cli/tree/main/docs/schemas):
396-
- [`icp-yaml-schema.json`](https://raw.githubusercontent.com/dfinity/icp-cli/main/docs/schemas/icp-yaml-schema.json) - Main project configuration
397-
- [`canister-yaml-schema.json`](https://raw.githubusercontent.com/dfinity/icp-cli/main/docs/schemas/canister-yaml-schema.json) - Canister configuration
398-
- [`network-yaml-schema.json`](https://raw.githubusercontent.com/dfinity/icp-cli/main/docs/schemas/network-yaml-schema.json) - Network configuration
399-
- [`environment-yaml-schema.json`](https://raw.githubusercontent.com/dfinity/icp-cli/main/docs/schemas/environment-yaml-schema.json) - Environment configuration
396+
- [`icp-yaml-schema.json`](https://raw.githubusercontent.com/dfinity/icp-cli/main/docs/schemas/icp-yaml-schema.json) Main project configuration
397+
- [`canister-yaml-schema.json`](https://raw.githubusercontent.com/dfinity/icp-cli/main/docs/schemas/canister-yaml-schema.json) Canister configuration
398+
- [`network-yaml-schema.json`](https://raw.githubusercontent.com/dfinity/icp-cli/main/docs/schemas/network-yaml-schema.json) Network configuration
399+
- [`environment-yaml-schema.json`](https://raw.githubusercontent.com/dfinity/icp-cli/main/docs/schemas/environment-yaml-schema.json) Environment configuration
400400

401401
Configure your editor to use them for autocomplete and validation:
402402

0 commit comments

Comments
 (0)