Skip to content

Commit 76c95a8

Browse files
authored
Merge pull request #14 from PureStackStudio/update-guides
Add new categories to the guides.
2 parents 025b1ae + f1a4a8a commit 76c95a8

40 files changed

Lines changed: 577 additions & 312 deletions

‎README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ stays in Markdown; components, style builders, and scripts live in TypeScript.
4545
The aim is a source model that remains understandable as the product grows.
4646

4747
`.mdx` and `.rmdx` pages use Regor components and expressions. Plain `.md`
48-
files work for prose pages. See the [Regor guide](https://purestack.studio/guides/regor/)
48+
files work for prose pages. See the [Regor guide](https://purestack.studio/guides/extending/regor/)
4949
for the markup and browser app model.
5050

5151
## Get your first page running
@@ -128,10 +128,10 @@ has a complete example.
128128

129129
| I want to… | Start here |
130130
| :--- | :--- |
131-
| Configure a site | [Site configuration](https://purestack.studio/guides/site-config/) |
131+
| Configure a site | [Site configuration](https://purestack.studio/guides/getting-started/site-config/) |
132132
| Build a richer page | [Component catalog](https://purestack.studio/components/) |
133133
| Add browser behavior | [PageScript and RegorApp examples](packages/purestack/README.md) |
134-
| Understand the CLI | [CLI guide](https://purestack.studio/guides/purestack-cli/) |
134+
| Understand the CLI | [CLI guide](https://purestack.studio/guides/getting-started/purestack-cli/) |
135135
| Explore a complete project | [Sample content](packages/ts-ssg/sample-content) · [Website source](frontend) |
136136
| Work on PureStack itself | [Contribution guide](CONTRIBUTING.md) |
137137

@@ -146,8 +146,8 @@ has a complete example.
146146
| `PageScript` and `RegorApp` | Bundle TypeScript and add browser behavior where requested. |
147147
| Static assets | Copies files from the content directory into the site output. |
148148

149-
The [CLI guide](https://purestack.studio/guides/purestack-cli/) covers the
150-
commands and options. [Site configuration](https://purestack.studio/guides/site-config/)
149+
The [CLI guide](https://purestack.studio/guides/getting-started/purestack-cli/) covers the
150+
commands and options. [Site configuration](https://purestack.studio/guides/getting-started/site-config/)
151151
covers navigation, themes, search, sitemap, localization, and output paths.
152152

153153
</details>

‎frontend/purestack.studio/components/_nav.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"pageLinks": true,
3-
"sequence": ["index.mdx", "guides"],
3+
"sequence": ["guides", "index.mdx"],
44
"items": [
55
{
66
"id": "guides",

‎frontend/purestack.studio/components/actions/alert-box/alert-box.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ nav:
1818
## In context
1919

2020
<ComponentExample label="A complete message" caption="Every content feature is visible: eyebrow, title, badge, icon, body, metadata, and the actions slot.">
21-
<div class="component-recipe"><AlertBox tone="info" variant="spotlight" eyebrow="DESIGN SYSTEM" title="Make feedback useful" badge="Tip" icon="lucide:check" meta="Semantic tones adapt to light and dark themes."><p>Explain what happened, why it matters, and what the reader can do next.</p><template #actions><BtnLink href="/guides/semantic-tones/" tone="info" variant="outline">Explore semantic tones</BtnLink></template></AlertBox></div>
21+
<div class="component-recipe"><AlertBox tone="info" variant="spotlight" eyebrow="DESIGN SYSTEM" title="Make feedback useful" badge="Tip" icon="lucide:check" meta="Semantic tones adapt to light and dark themes."><p>Explain what happened, why it matters, and what the reader can do next.</p><template #actions><BtnLink href="/guides/styling/semantic-tones/" tone="info" variant="outline">Explore semantic tones</BtnLink></template></AlertBox></div>
2222
</ComponentExample>
2323

2424
```html
2525
<AlertBox tone="info" variant="spotlight" eyebrow="DESIGN SYSTEM" title="Make feedback useful" badge="Tip" icon="lucide:check" meta="Semantic tones adapt to light and dark themes.">
2626
<p>Explain what happened, why it matters, and what the reader can do next.</p>
2727
<template #actions>
28-
<BtnLink href="/guides/semantic-tones/" tone="info" variant="outline">Explore semantic tones</BtnLink>
28+
<BtnLink href="/guides/styling/semantic-tones/" tone="info" variant="outline">Explore semantic tones</BtnLink>
2929
</template>
3030
</AlertBox>
3131
```

‎frontend/purestack.studio/components/actions/btn-link/btn-link.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ Use BtnLink to navigate to a page, a section, or an external destination. For an
2020
## In context
2121

2222
<ComponentExample label="A useful destination" caption="These are real links. Use the keyboard or your browser’s open-in-new-tab action to follow them.">
23-
<div class="component-recipe"><Badge tone="feature">START HERE</Badge><h3>Build your first interface</h3><p>Learn how static content and interactive components fit together.</p><BtnGroup :wrap="true"><BtnLink href="/guides/regor/" tone="accent">Explore Regor</BtnLink><BtnLink href="/components/" variant="outline">Browse components</BtnLink></BtnGroup></div>
23+
<div class="component-recipe"><Badge tone="feature">START HERE</Badge><h3>Build your first interface</h3><p>Learn how static content and interactive components fit together.</p><BtnGroup :wrap="true"><BtnLink href="/guides/extending/regor/" tone="accent">Explore Regor</BtnLink><BtnLink href="/components/" variant="outline">Browse components</BtnLink></BtnGroup></div>
2424
</ComponentExample>
2525

2626
```html
2727
<Badge tone="feature">START HERE</Badge>
2828
<h3>Build your first interface</h3>
2929
<p>Learn how static content and interactive components fit together.</p>
3030
<BtnGroup :wrap="true">
31-
<BtnLink href="/guides/regor/" tone="accent">Explore Regor</BtnLink>
31+
<BtnLink href="/guides/extending/regor/" tone="accent">Explore Regor</BtnLink>
3232
<BtnLink href="/components/" variant="outline">Browse components</BtnLink>
3333
</BtnGroup>
3434
```

‎frontend/purestack.studio/components/site/nav-menu/nav-menu-playground.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const TREES: Record<TreeName, NavItem[]> = {
8989
title: 'Guides',
9090
icon: 'tabler:book',
9191
children: [
92-
{ title: 'Themes', url: '/guides/themes/', icon: 'tabler:palette' },
92+
{ title: 'Themes', url: '/guides/styling/themes/', icon: 'tabler:palette' },
9393
{
9494
title: 'Components',
9595
icon: 'tabler:components',
@@ -143,7 +143,7 @@ const TREES: Record<TreeName, NavItem[]> = {
143143

144144
const DEFAULTS = {
145145
treeName: 'docs' as TreeName,
146-
currentUrl: '/guides/themes/',
146+
currentUrl: '/guides/styling/themes/',
147147
showIcons: true,
148148
tone: 'neutral' as SemanticTone,
149149
variant: 'flat' as ComponentVariant,

‎frontend/purestack.studio/guides/_nav.json‎

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,11 @@
33
"sequence": [
44
"index.mdx",
55
"components",
6-
"purestack-cli.mdx",
7-
"site-config.mdx",
8-
"links.mdx",
9-
"code-blocks.mdx",
10-
"shared-content.mdx",
11-
"vscode-extension.mdx",
12-
"regor.mdx",
13-
"typography.mdx",
14-
"utility-css-classes.mdx",
15-
"semantic-tones.mdx",
16-
"icons.mdx",
17-
"themes.mdx",
18-
"plugins.mdx"
6+
"getting-started/",
7+
"content/",
8+
"styling/",
9+
"extending/",
10+
"publishing/"
1911
],
2012
"items": [
2113
{
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"sequence": [
3+
"index.mdx",
4+
"links.mdx",
5+
"code-blocks.mdx",
6+
"shared-content.mdx",
7+
"localization.mdx"
8+
]
9+
}

frontend/purestack.studio/guides/code-blocks.mdx renamed to frontend/purestack.studio/guides/content/code-blocks.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const answer = 42
2525
```
2626
````
2727

28-
The language selects the highlighting. The [site configuration](./site-config#markdown-and-code-blocks) chooses the highlighter.
28+
The language selects the highlighting. The [site configuration](../getting-started/site-config#markdown-and-code-blocks) chooses the highlighter.
2929

3030
## Show a file's code
3131

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Content
3+
description: Write links and code examples, share content, and organize translations.
4+
template: doc
5+
nav:
6+
icon: tabler:files
7+
layout:
8+
showToc: true
9+
---
10+
11+
# Content
12+
13+
Write links and code examples, share content, and organize translations.
14+
15+
- [Links](./links)
16+
- [Code blocks](./code-blocks)
17+
- [Shared content](./shared-content)
18+
- [Localization](./localization)

frontend/purestack.studio/guides/links.mdx renamed to frontend/purestack.studio/guides/content/links.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ nav:
1313

1414
# Links
1515

16-
Write a link the way you see your files. PureStack turns it into the right address and checks it every time the site builds, so a renamed or deleted page or image never leaves a broken link behind.
16+
Write local links relative to the source file. PureStack resolves them to public URLs and fails the build when the target page or asset is missing. Root-relative public URLs, external destinations, and fragment IDs have different validation rules, described below.
1717

1818
## Link to another page
1919

@@ -53,7 +53,7 @@ Add `#` and the section name after the page:
5353
[Back to the top](#links)
5454
```
5555

56-
A section name is its heading in lowercase, with hyphens between the words. The heading "Create a skin" becomes `#create-a-skin`. Try it: [create a skin](./themes#create-a-skin).
56+
A section name is its heading in lowercase, with hyphens between the words. The heading "Create a skin" becomes `#create-a-skin`. Try it: [create a skin](../styling/themes#create-a-skin).
5757

5858
PureStack checks that the page exists, not the section, so double-check section names after you rename a heading.
5959

@@ -103,9 +103,9 @@ Anything that starts with `/` or a protocol is used as written:
103103

104104
PureStack doesn't check these links, because the pages behind them aren't part of your content folder.
105105

106-
You can link your own pages this way too, as in `/guides/themes/`, but a relative link is the better habit: if that page moves, the build tells you.
106+
You can link your own pages this way too, as in `/guides/styling/themes/`, but a relative link is the better habit: if that page moves, the build tells you.
107107

108-
If the site lives under a base path, such as `/docs`, PureStack adds it to every link for you. Set it once in the [site configuration](./site-config).
108+
If the site lives under a base path, such as `/docs`, PureStack adds it to every link for you. Set it once in the [site configuration](../getting-started/site-config).
109109

110110
## When a link is broken
111111

0 commit comments

Comments
 (0)