Skip to content

Commit 4d1a1b8

Browse files
committed
Improve repo readme.
1 parent 91aa617 commit 4d1a1b8

4 files changed

Lines changed: 140 additions & 143 deletions

File tree

‎PureStackStudio-profile-README.md‎

Lines changed: 0 additions & 107 deletions
This file was deleted.

‎README.md‎

Lines changed: 103 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,60 @@
1+
<div align="center">
2+
3+
<img src="docs/assets/readme-banner.svg" alt="PureStack: Build sites with Markdown and TypeScript. Pages, components, styles, and browser scripts." width="1200" />
4+
15
# PureStack
26

3-
**Build content sites and interactive pages with Markdown, components, and TypeScript.**
7+
**Build content sites and interactive pages from one coherent source model.**
8+
9+
Markdown for your content. TypeScript for your components, styles, and behavior.
10+
11+
[![npm version](https://img.shields.io/npm/v/purestack?style=flat-square&color=c026d3)](https://www.npmjs.com/package/purestack)
12+
[![CI](https://github.com/PureStackStudio/PureStack/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/PureStackStudio/PureStack/actions/workflows/ci.yml)
13+
[![TypeScript](https://img.shields.io/badge/TypeScript-7-3178c6?style=flat-square&logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
14+
[![License: MIT](https://img.shields.io/badge/License-MIT-a855f7?style=flat-square)](LICENSE)
15+
16+
**[Explore the docs](https://purestack.studio/guides/)** ·
17+
**[Browse components](https://purestack.studio/components/)** ·
18+
**[See an example site](packages/ts-ssg/sample-content)** ·
19+
**[Contribute](CONTRIBUTING.md)**
20+
21+
</div>
22+
23+
---
24+
25+
## Your content. Your components. One pipeline.
426

527
PureStack turns a content directory into a static website. Write pages in
628
Markdown or Regor MDX, use built-in components where they help, and add
729
browser-side TypeScript only where a page needs behavior. The CLI handles
830
routes, styles, assets, development preview, and release builds.
931

10-
[Documentation](https://purestack.studio/guides/) | [Component catalog](https://purestack.studio/components/) | [npm package](https://www.npmjs.com/package/purestack)
32+
| Build your foundation | Shape the experience |
33+
| :--- | :--- |
34+
| **📝 Content that becomes a site**<br>File-based routes, frontmatter, navigation, and page outlines. Write Markdown or compose richer pages with Regor MDX. | **🧩 Components you can compose**<br>Panels, tabs, forms, charts, and more. Explore the [component catalog](https://purestack.studio/components/) for building blocks. |
35+
| **🎨 A shared design language**<br>Themes, skins, semantic tones, and typed style builders keep components and pages visually connected. | **⚡ Interaction where you need it**<br>Load page-specific TypeScript with `PageScript` or mount a Regor app with `RegorApp`. |
36+
| **📦 Static files, ready to host**<br>Build HTML, CSS, JavaScript, and assets. Prepare a minified publish directory for your static host. | **🔎 Built-in discovery**<br>Optional Pagefind search, generated navigation, and sitemaps help readers find their way. |
37+
38+
> **PureStack in practice:** [purestack.studio](https://purestack.studio) is built
39+
> from the [frontend source in this repository](frontend).
1140
12-
## What you can build
41+
## Why coherent source matters
1342

14-
- **Content and documentation sites:** file-based routes, frontmatter, navigation,
15-
page outlines, and optional search.
16-
- **Interactive pages:** server-rendered Regor components, page-specific
17-
TypeScript through `PageScript`, and mounted apps through `RegorApp`.
18-
- **Sites with a consistent visual system:** themes, semantic tones, typed
19-
styles, and a component library shared across pages.
20-
- **Static output:** generated HTML, CSS, JavaScript, and assets that can be
21-
served by a static host.
43+
Generating a first page is only the beginning. A product keeps changing:
44+
new content, new components, new behavior, and new people working on it.
45+
46+
PureStack's architectural bet is that explicit, typed source makes that ongoing
47+
work easier for humans and AI tools to inspect and reason about. Content
48+
stays in Markdown; components, style builders, and scripts live in TypeScript.
49+
The aim is a source model that remains understandable as the product grows.
2250

2351
`.mdx` and `.rmdx` pages use Regor components and expressions. Plain `.md`
2452
files work for prose pages. See the [Regor guide](https://purestack.studio/guides/regor/)
2553
for the markup and browser app model.
2654

27-
## Quick start
55+
## Get your first page running
2856

29-
Create a project and install the CLI:
57+
### 1. Create a project
3058

3159
```sh
3260
mkdir my-site
@@ -36,7 +64,18 @@ npm install purestack
3664
mkdir content
3765
```
3866

39-
Create `content/siteConfig.json`:
67+
### 2. Add your config and a page
68+
69+
Your starting point is just two files:
70+
71+
```text
72+
my-site/
73+
└── content/
74+
├── siteConfig.json
75+
└── index.mdx
76+
```
77+
78+
**`content/siteConfig.json`**
4079

4180
```json
4281
{
@@ -47,7 +86,7 @@ Create `content/siteConfig.json`:
4786
}
4887
```
4988

50-
Create `content/index.mdx`:
89+
**`content/index.mdx`**
5190

5291
```mdx
5392
---
@@ -56,16 +95,16 @@ description: My first PureStack site.
5695
template: doc
5796
---
5897

59-
# Welcome
98+
# Make something worth reading.
6099

61-
This page is built from MDX.
100+
Start with Markdown. Add components when your page needs more.
62101

63102
<Panel tone="info" variant="surface">
64-
<p>Edit this file and see the page update.</p>
103+
<p>Your first PureStack page, ready to make your own.</p>
65104
</Panel>
66105
```
67106

68-
Start the development server:
107+
### 3. Preview it
69108

70109
```sh
71110
npx purestack serve --content ./content
@@ -74,7 +113,7 @@ npx purestack serve --content ./content
74113
Open <http://127.0.0.1:4173/>. Add `content/about.mdx` to create `/about/`.
75114
The server watches your files and reloads the browser as you edit.
76115

77-
When the site is ready:
116+
### 4. Build for your host
78117

79118
```sh
80119
npx purestack build --content ./content
@@ -89,7 +128,19 @@ For browser behavior, add a TypeScript file beside a page and load it with
89128
`<PageScript src="./example.ts" />`. The [purestack package README](packages/purestack/README.md)
90129
has a complete example.
91130

92-
## How PureStack fits together
131+
## Pick your next step
132+
133+
| I want to… | Start here |
134+
| :--- | :--- |
135+
| Configure a site | [Site configuration](https://purestack.studio/guides/site-config/) |
136+
| Build a richer page | [Component catalog](https://purestack.studio/components/) |
137+
| Add browser behavior | [PageScript and RegorApp examples](packages/purestack/README.md) |
138+
| Understand the CLI | [CLI guide](https://purestack.studio/guides/purestack-cli/) |
139+
| Explore a complete project | [Sample content](packages/ts-ssg/sample-content) · [Website source](frontend) |
140+
| Work on PureStack itself | [Contribution guide](CONTRIBUTING.md) |
141+
142+
<details>
143+
<summary><strong>How PureStack fits together</strong></summary>
93144

94145
| Source | What PureStack does |
95146
| --- | --- |
@@ -103,8 +154,16 @@ The [CLI guide](https://purestack.studio/guides/purestack-cli/) covers the
103154
commands and options. [Site configuration](https://purestack.studio/guides/site-config/)
104155
covers navigation, themes, search, sitemap, localization, and output paths.
105156

157+
</details>
158+
106159
## Repository map
107160

161+
The workspace contains the CLI, site generator, UI components, typed HTML/CSS
162+
builders, browser scripts, icon providers, and a private VS Code extension.
163+
164+
<details>
165+
<summary><strong>Explore the packages and source directories</strong></summary>
166+
108167
| Path | Purpose |
109168
| --- | --- |
110169
| [`packages/purestack`](packages/purestack) | Public `purestack` package, CLI, and TypeScript API. |
@@ -114,21 +173,25 @@ covers navigation, themes, search, sitemap, localization, and output paths.
114173
| [`packages/ts-css`](packages/ts-css) and [`packages/ts-html`](packages/ts-html) | Typed CSS and HTML builders. |
115174
| [`packages/ts-page-scripts`](packages/ts-page-scripts) | Browser-side behavior used by site components. |
116175
| [`packages/ts-svg-icons`](packages/ts-svg-icons) | SVG icon providers and lookup. |
117-
| [`packages/ts-ssg-vscode`](packages/ts-ssg-vscode) | VS Code support for PureStack content and components. |
176+
| [`packages/ts-ssg-vscode`](packages/ts-ssg-vscode) | Private VS Code extension for PureStack content and components. |
118177
| [`frontend`](frontend) | Source for purestack.studio, built with PureStack. |
119178
| [`packages/ts-ssg/sample-content`](packages/ts-ssg/sample-content) | A larger example site with content, components, and browser scripts. |
120179

121180
The remaining workspace packages provide shared types, utilities, rendering,
122181
and DOM support.
123182

183+
</details>
184+
124185
## Develop this repository
125186

126187
See [Contributing](CONTRIBUTING.md) for the branch, pull request, CI, and publishing workflow.
127188

128-
This is a Yarn 4 workspace. Run commands from the repository root:
189+
Use **Node.js 24** and the Yarn version pinned in `package.json`.
190+
Run commands from the repository root:
129191

130192
```sh
131-
yarn install
193+
corepack enable
194+
yarn install --immutable
132195
yarn build
133196
yarn dev
134197
```
@@ -138,17 +201,23 @@ run `yarn frontend`; its development server opens at
138201
<http://127.0.0.1:4700/>. See the [frontend README](frontend/README.md) for
139202
the site-specific workflow.
140203

141-
Useful checks and build commands:
204+
| Command | Purpose |
205+
| :--- | :--- |
206+
| `yarn lint:ci` | Check source without modifying files. |
207+
| `yarn test:ci` | Run the test suite once. |
208+
| `yarn bundle` | Build distributable packages. |
209+
| `yarn package` | Pack non-private workspaces into local tarballs. |
142210

143-
```sh
144-
yarn test run
145-
yarn bundle
146-
yarn package
147-
```
211+
---
212+
213+
<div align="center">
214+
215+
**Build something with PureStack. Help shape what comes next.**
148216

149-
`yarn bundle` creates distributable package builds. `yarn package` packs the
150-
non-private workspace packages into local tarballs.
217+
[Documentation](https://purestack.studio/guides/) ·
218+
[Report a bug](https://github.com/PureStackStudio/PureStack/issues) ·
219+
[Contribute](CONTRIBUTING.md)
151220

152-
## License
221+
Released under the [MIT license](LICENSE).
153222

154-
[MIT](LICENSE). Bugs and feature requests: [GitHub issues](https://github.com/PureStackStudio/PureStack/issues).
223+
</div>

‎docs/assets/readme-banner.svg‎

Lines changed: 35 additions & 0 deletions
Loading

‎packages/ts-ssg/sample-content/guide/forms.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ Use labels that tell people why a field exists. A small inquiry form usually nee
2121
<Grid columns="1" columnsMd="2">
2222
<Panel tone="neutral" variant="surfaceAlt">
2323
<h3>Good field</h3>
24-
<p><strong>Work email</strong> — where a reply should go.</p>
24+
<p><strong>Work email:</strong> where a reply should go.</p>
2525
</Panel>
2626
<Panel tone="neutral" variant="surfaceAlt">
2727
<h3>Good choice</h3>
28-
<p><strong>Topic</strong> — product question, implementation help, or something else.</p>
28+
<p><strong>Topic:</strong> product question, implementation help, or something else.</p>
2929
</Panel>
3030
</Grid>
3131

0 commit comments

Comments
 (0)