|
| 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. |
0 commit comments