Skip to content

Commit d807e0d

Browse files
feat: Add docs site
1 parent a3a463f commit d807e0d

11 files changed

Lines changed: 402 additions & 28 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
- name: Build shellscape
2121
run: go build -o shellscape ./cmd/shellscape
2222

23-
- name: Build site
24-
run: ./shellscape build
23+
- name: Build docs site
24+
run: ./shellscape build -c docs/config.yaml
2525

2626
- name: Deploy to Cloudflare Pages
2727
uses: cloudflare/wrangler-action@v3
2828
with:
2929
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
3030
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
31-
command: pages deploy dist --project-name=${{ vars.CLOUDFLARE_PROJECT_NAME }}
31+
command: pages deploy docs/dist --project-name=${{ vars.CLOUDFLARE_PROJECT_NAME }}

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,5 @@ build:
22
go build ./cmd/shellscape
33
mv ./shellscape ~/dev/bin
44

5-
init: build
6-
shellscape init mysite
7-
8-
serve: build
9-
(cd mysite && shellscape serve)
5+
docs: build
6+
(cd docs && open "http://localhost:1313" && shellscape serve)

docs/config.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
site:
2+
title: "Shellscape"
3+
description: "A static site generator that produces interactive terminal-themed websites"
4+
author: "Rob Reid"
5+
base_url: "https://shellscape.io"
6+
language: "en"
7+
8+
theme: "terminal"
9+
10+
nav:
11+
- label: "Home"
12+
path: "/"
13+
- label: "Install"
14+
path: "/docs/install"
15+
- label: "Get Started"
16+
path: "/docs/getting-started"
17+
- label: "Configuration"
18+
path: "/docs/configuration"
19+
20+
terminal:
21+
prompt: ""
22+
banner:
23+
text: "shellscape"
24+
font: colossal
25+
color_type: "gradient-lr"
26+
27+
blog:
28+
posts_dir: "docs"
29+
date_format: "2006-02-01"
30+
show_reading_time: true
31+
show_tags: true
32+
code_style_dark: "paraiso-dark"
33+
code_style_light: "paraiso-light"
34+
35+
footer:
36+
text: "Built with shellscape"
37+
links:
38+
- label: "GitHub"
39+
url: "https://github.com/codingconcepts/shellscape"

docs/content/docs/configuration.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
---
2+
title: "Configuration"
3+
description: "Shellscape configuration reference"
4+
date: 2026-07-20
5+
tags: ["configuration"]
6+
draft: false
7+
---
8+
9+
## Configuration
10+
11+
All configuration lives in `config.yaml` at the root of your site.
12+
13+
### Full example
14+
15+
```yaml
16+
site:
17+
title: "My Site"
18+
description: "A terminal-themed personal site"
19+
author: "Your Name"
20+
base_url: "https://yoursite.com"
21+
language: "en"
22+
23+
theme: "terminal"
24+
25+
nav:
26+
- label: "Home"
27+
path: "/"
28+
- label: "About"
29+
path: "/about"
30+
- label: "Blog"
31+
path: "/blog"
32+
33+
terminal:
34+
banner:
35+
text: "Shellscape"
36+
font: "banner3"
37+
38+
blog:
39+
posts_dir: "blog"
40+
date_format: "2006-02-01"
41+
show_reading_time: true
42+
show_tags: true
43+
code_style_dark: "paraiso-dark"
44+
code_style_light: "paraiso-light"
45+
46+
build:
47+
output_dir: "dist"
48+
49+
footer:
50+
text: "Built with shellscape"
51+
links:
52+
- label: "GitHub"
53+
url: "https://github.com/you/yoursite"
54+
```
55+
56+
### Themes
57+
58+
Set `theme` to one of:
59+
60+
| Theme | Description |
61+
|-------|-------------|
62+
| `terminal` | Dark terminal look (default) |
63+
| `light` | Light theme |
64+
| `system` | Follows OS preference |
65+
66+
### Banner
67+
68+
The ASCII art banner at the top of every page:
69+
70+
```yaml
71+
terminal:
72+
banner:
73+
text: "My Site"
74+
font: "banner3"
75+
color_type: "gradient-lr"
76+
colors:
77+
- "#e06c75"
78+
- "#d19a66"
79+
- "#e5c07b"
80+
- "#98c379"
81+
- "#56b6c2"
82+
- "#61afef"
83+
- "#c678dd"
84+
```
85+
86+
| Option | Values | Default |
87+
|--------|--------|---------|
88+
| `font` | Any [go-figure](https://github.com/common-nighthawk/go-figure) font | `banner3` |
89+
| `color_type` | `letter`, `gradient-lr`, `gradient-tb` | `letter` |
90+
| `colors` | Array of hex colors | Rainbow |
91+
92+
### Code syntax highlighting
93+
94+
Code blocks in Markdown get syntax highlighting automatically. Separate styles for dark and light mode:
95+
96+
```yaml
97+
blog:
98+
code_style_dark: "dracula"
99+
code_style_light: "github"
100+
```
101+
102+
Any [Chroma style](https://github.com/alecthomas/chroma/tree/master/styles) works. Some popular options:
103+
104+
| Style | Best for |
105+
|-------|----------|
106+
| `dracula` | dark |
107+
| `monokai` | dark |
108+
| `nord` | dark |
109+
| `github` | light |
110+
| `solarized-dark` | dark |
111+
| `solarized-light` | light |
112+
113+
### Custom themes
114+
115+
Create a CSS file in `themes/` to override the default theme. Themes are pure CSS custom properties:
116+
117+
```css
118+
:root {
119+
--ss-bg: #1a1b26;
120+
--ss-text: #a9b1d6;
121+
--ss-accent: #7aa2f7;
122+
--ss-green: #9ece6a;
123+
--ss-prompt-user: #9ece6a;
124+
}
125+
```
126+
127+
See `embed/themes/terminal/theme.css` for all available variables.
128+
129+
### Deploy
130+
131+
The `dist/` directory is fully static. Deploy it anywhere:
132+
133+
- GitHub Pages
134+
- Cloudflare Pages
135+
- Netlify
136+
- S3 + CloudFront
137+
- Any static file server
138+
139+
A GitHub Actions workflow for Cloudflare Pages is included at `.github/workflows/deploy.yml`.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
title: "Getting Started"
3+
description: "Create your first shellscape site"
4+
date: 2026-07-20
5+
tags: ["getting-started"]
6+
draft: false
7+
---
8+
9+
## Getting started
10+
11+
### Create a site
12+
13+
```sh
14+
shellscape init mysite
15+
cd mysite
16+
```
17+
18+
This scaffolds a new site with the following structure:
19+
20+
```
21+
mysite/
22+
config.yaml # site configuration
23+
content/
24+
index.md # home page
25+
about.md # additional pages
26+
blog/
27+
my-post.md # blog posts
28+
static/ # your images, downloads, etc.
29+
themes/ # custom theme overrides
30+
dist/ # build output (gitignored)
31+
```
32+
33+
### Run the dev server
34+
35+
```sh
36+
shellscape serve
37+
```
38+
39+
Open [http://localhost:1313](http://localhost:1313) and start typing.
40+
41+
### Serve flags
42+
43+
| Flag | Default | Description |
44+
|------|---------|-------------|
45+
| `--config`, `-c` | `config.yaml` | Path to config file |
46+
| `--drafts` | `false` | Include draft posts |
47+
| `--port`, `-p` | `1313` | Port number |
48+
49+
### Writing content
50+
51+
Pages use Markdown with YAML frontmatter:
52+
53+
```markdown
54+
---
55+
title: "My Post"
56+
date: 2026-07-16
57+
tags: ["go", "tools"]
58+
draft: false
59+
description: "A short summary"
60+
slug: "custom-url-slug"
61+
banner:
62+
text: "My Post"
63+
font: "slant"
64+
color_type: "gradient-lr"
65+
---
66+
67+
Your content here. Code blocks get syntax highlighting.
68+
```
69+
70+
### Build for production
71+
72+
```sh
73+
shellscape build
74+
```
75+
76+
| Flag | Default | Description |
77+
|------|---------|-------------|
78+
| `--config`, `-c` | `config.yaml` | Path to config file |
79+
| `--drafts` | `false` | Include draft posts |
80+
81+
Output goes to `dist/`. Deploy that directory anywhere — GitHub Pages, Cloudflare Pages, Netlify, S3, or any static file server.
82+
83+
### Terminal commands
84+
85+
Visitors to your site can use these commands:
86+
87+
| Command | Action |
88+
|---------|--------|
89+
| `help` | List available commands |
90+
| `ls [dir]` | List pages at current or given location |
91+
| `cd <page>` | Navigate to a page |
92+
| `cd ..` | Go up one level |
93+
| `cat <page>` | Display page content inline |
94+
| `open <page>` | Navigate to and display a page |
95+
| `clear` | Clear terminal output |
96+
| `history` | Show command history |
97+
| `theme <name>` | Switch theme (`system`, `light`, `dark`) |
98+
99+
Tab completion, command history (up/down arrows), and Ctrl+L (clear) are supported.

docs/content/docs/install.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: "Install"
3+
description: "How to install shellscape"
4+
date: 2026-07-20
5+
tags: ["install"]
6+
draft: false
7+
---
8+
9+
## Install
10+
11+
Shellscape is a single Go binary. Install it with:
12+
13+
```sh
14+
go install github.com/codingconcepts/shellscape/cmd/shellscape@latest
15+
```
16+
17+
This requires [Go 1.22+](https://go.dev/dl/). The binary will be placed in your `$GOPATH/bin` directory.
18+
19+
### Verify
20+
21+
```sh
22+
shellscape --help
23+
```
24+
25+
### Available commands
26+
27+
| Command | What it does |
28+
|---------|-------------|
29+
| `shellscape init [name]` | Scaffold a new site |
30+
| `shellscape build` | Build static site to `dist/` |
31+
| `shellscape serve` | Dev server with live reload |

docs/content/index.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: "Home"
3+
description: "Shellscape - terminal-themed static site generator"
4+
template: "home"
5+
---
6+
7+
## Websites that look like terminals
8+
9+
Shellscape is a static site generator that produces interactive terminal-themed websites. Visitors can type real commands (`ls`, `cd`, `cat`) to navigate your content, or just click around like a normal site.
10+
11+
Write your content in YAML + Markdown. No frontend skills required.
12+
13+
### Quick links
14+
15+
- Type `cd docs/install` to get started
16+
- Type `ls docs` to see all documentation

0 commit comments

Comments
 (0)