Skip to content

Commit 052d0fe

Browse files
committed
feat: add on-site documentation and fix navigation links
Move all documentation on-site instead of linking back to GitHub. Update nav, hero, and footer links to point to local doc pages. Add docs landing page and 10 synced documentation articles.
1 parent a254920 commit 052d0fe

21 files changed

Lines changed: 1402 additions & 5 deletions

File tree

121 KB
Loading
173 KB
Loading
127 KB
Loading
160 KB
Loading
135 KB
Loading
191 KB
Loading

content/docs-blog/module.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Blog Generator
2+
3+
<details>
4+
slug: docs/blog
5+
published: 03/15/2026
6+
author: Gopher Guides
7+
seo_description: Hype documentation — Blog Generator. Learn how to use this feature in the Hype dynamic Markdown engine.
8+
tags: docs, blog, hype
9+
</details>
10+
11+
12+
Create beautiful static blogs with hype's signature code execution feature. Write articles in markdown, include runnable code examples, and deploy to GitHub Pages with a single workflow.
13+
14+
**Live Demo:** [gopherguides.github.io/hype-blog-sample](https://gopherguides.github.io/hype-blog-sample)
15+
16+
## Quick Start
17+
18+
```bash
19+
# Install hype
20+
go install github.com/gopherguides/hype/cmd/hype@latest
21+
22+
# Create a new blog
23+
hype blog init mysite
24+
cd mysite
25+
26+
# Create your first article
27+
hype blog new hello-world
28+
29+
# Build and preview
30+
hype blog build
31+
hype blog serve
32+
```
33+
34+
Your site is now live at `http://localhost:3000`.
35+
36+
## Features
37+
38+
- **Code Execution** - Run code blocks and include real output (hype's signature feature)
39+
- **3 Built-in Themes** - suspended (minimal), developer (terminal-style), cards (grid layout)
40+
- **Hugo-style Templates** - Layered template system with easy customization
41+
- **Live Reload** - `--watch` flag for automatic rebuilds during development
42+
- **SEO Ready** - Meta tags, Open Graph, Twitter cards, sitemap, RSS feed
43+
- **GitHub Pages** - Deploy automatically with the included workflow
44+
45+
## Commands
46+
47+
| Command | Description |
48+
|---------|-------------|
49+
| `hype blog init <name>` | Create a new blog project |
50+
| `hype blog new <slug>` | Create a new article |
51+
| `hype blog build` | Build the static site |
52+
| `hype blog serve` | Start local preview server |
53+
| `hype blog serve --watch` | Preview with live reload |
54+
| `hype blog theme list` | List available themes |
55+
| `hype blog theme add <name>` | Add a theme to your project |
56+
57+
## Themes
58+
59+
### Suspended (Default)
60+
61+
Minimal, typography-focused theme perfect for technical writing.
62+
63+
![Suspended Theme](images/theme-suspended-home.png)
64+
65+
### Developer
66+
67+
Dark, terminal-inspired theme for code-heavy blogs.
68+
69+
![Developer Theme](images/theme-developer-home.png)
70+
71+
### Cards
72+
73+
Modern card-based layout with visual hierarchy.
74+
75+
![Cards Theme](images/theme-cards-home.png)
76+
77+
Switch themes by updating `config.yaml`:
78+
79+
```yaml
80+
theme: "developer"
81+
```
82+
83+
## Deploy to GitHub Pages
84+
85+
Add this workflow to `.github/workflows/deploy.yaml`:
86+
87+
&lt;code src="src/deploy.yaml">&lt;/code&gt;
88+
89+
Then enable GitHub Pages in your repo settings (Settings > Pages > Source: GitHub Actions).
90+
91+
## Project Structure
92+
93+
&lt;code src="src/structure.txt">&lt;/code&gt;
94+
95+
## Article Format
96+
97+
Articles use a `<details>` block for metadata:
98+
99+
```markdown
100+
# My Article Title
101+
102+
<details>
103+
slug: my-article
104+
published: 01/25/2026
105+
author: Your Name
106+
seo_description: Brief description for SEO
107+
tags: go, tutorial
108+
</details>
109+
110+
Your content here...
111+
```
112+
113+
## Full Documentation
114+
115+
For complete documentation including theme customization, template overrides, and advanced features, see [docs/blog/README.md](README.md).
Lines changed: 257 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,257 @@
1+
# CLI Reference
2+
3+
<details>
4+
slug: docs/cli-reference
5+
published: 03/15/2026
6+
author: Gopher Guides
7+
seo_description: Hype documentation — CLI Reference. Learn how to use this feature in the Hype dynamic Markdown engine.
8+
tags: docs, cli-reference, hype
9+
</details>
10+
11+
12+
Hype provides several commands for working with dynamic markdown documents.
13+
14+
## Commands Overview
15+
16+
| Command | Description |
17+
|---------|-------------|
18+
| `export` | Export documents to different formats (markdown, HTML) |
19+
| `preview` | Start a live preview server with auto-reload |
20+
| `marked` | Integration with Marked 2 app |
21+
| `slides` | Web-based presentation server |
22+
| `blog` | Static blog generator |
23+
24+
---
25+
26+
## export
27+
28+
Export hype documents to markdown or HTML.
29+
30+
```bash
31+
hype export [options]
32+
```
33+
34+
### Options
35+
36+
| Flag | Default | Description |
37+
|------|---------|-------------|
38+
| `-f` | `hype.md` | Input file to process |
39+
| `-format` | `markdown` | Output format: `markdown` or `html` |
40+
| `-o` | stdout | Output file path |
41+
| `-theme` | `github` | Theme for HTML export |
42+
| `-css` | | Path to custom CSS file |
43+
| `-no-css` | `false` | Output raw HTML without styling |
44+
| `-themes` | | List available themes and exit |
45+
| `-timeout` | `30s` | Execution timeout |
46+
| `-v` | `false` | Verbose output |
47+
48+
### Examples
49+
50+
```bash
51+
# Export to markdown (default)
52+
hype export -f hype.md > README.md
53+
54+
# Export to HTML
55+
hype export -f docs.md -format html > docs.html
56+
57+
# Export with a theme
58+
hype export -f docs.md -format html -theme solarized-dark
59+
60+
# Export with custom CSS
61+
hype export -f docs.md -format html -css ./styles.css
62+
63+
# Export raw HTML (no styling)
64+
hype export -f docs.md -format html -no-css
65+
66+
# List available themes
67+
hype export -themes
68+
69+
# Output directly to file
70+
hype export -f hype.md -format markdown -o README.md
71+
```
72+
73+
---
74+
75+
## preview
76+
77+
Start a live preview server with file watching and auto-reload.
78+
79+
```bash
80+
hype preview [options]
81+
```
82+
83+
### Options
84+
85+
| Flag | Alias | Default | Description |
86+
|------|-------|---------|-------------|
87+
| `-f` | | `hype.md` | Source file to preview |
88+
| `-port` | | `3000` | Server port |
89+
| `-w` | `-watch` | | Additional directories to watch (repeatable) |
90+
| `-e` | `-ext` | | File extensions to watch (comma-separated) |
91+
| `-i` | `-include` | | Glob patterns to include (repeatable) |
92+
| `-x` | `-exclude` | | Glob patterns to exclude (repeatable) |
93+
| `-d` | `-debounce` | `300ms` | Debounce delay before rebuild |
94+
| `-v` | `-verbose` | `false` | Verbose output |
95+
| `-open` | | `false` | Auto-open browser on start |
96+
| `-theme` | | `github` | Preview theme |
97+
| `-css` | | | Custom CSS file path |
98+
| `-themes` | | | List available themes |
99+
| `-timeout` | | `0` | Execution timeout |
100+
101+
### Examples
102+
103+
```bash
104+
# Basic preview
105+
hype preview -f hype.md
106+
107+
# Open browser automatically
108+
hype preview -f hype.md -open
109+
110+
# Watch additional directories
111+
hype preview -f hype.md -w ./src -w ./images
112+
113+
# Filter by extension
114+
hype preview -f hype.md -e md,go,html
115+
116+
# Use a dark theme
117+
hype preview -f hype.md -theme solarized-dark
118+
```
119+
120+
---
121+
122+
## marked
123+
124+
Integration with [Marked 2](https://marked2app.com/) for macOS.
125+
126+
```bash
127+
hype marked [options]
128+
```
129+
130+
### Options
131+
132+
| Flag | Default | Description |
133+
|------|---------|-------------|
134+
| `-f` | | Input file (uses `MARKED_PATH` if not set) |
135+
| `-p` | `false` | Parse only (no execution) |
136+
| `-timeout` | `5s` | Execution timeout |
137+
| `-context` | | Context folder path |
138+
| `-section` | `0` | Target section number |
139+
| `-v` | `false` | Verbose output |
140+
141+
### Environment Variables
142+
143+
- `MARKED_PATH` - Set by Marked 2 to the current file path
144+
- `MARKED_ORIGIN` - Set by Marked 2 to the file's directory
145+
146+
---
147+
148+
## slides
149+
150+
Web-based presentation server.
151+
152+
```bash
153+
hype slides [options] [file]
154+
```
155+
156+
### Options
157+
158+
| Flag | Default | Description |
159+
|------|---------|-------------|
160+
| `-port` | `3000` | Server port |
161+
162+
### Examples
163+
164+
```bash
165+
# Start slides server
166+
hype slides presentation.md
167+
168+
# Use a different port
169+
hype slides -port 8080 presentation.md
170+
```
171+
172+
---
173+
174+
## blog
175+
176+
Static blog generator with theming support.
177+
178+
```bash
179+
hype blog <command> [options]
180+
```
181+
182+
### Subcommands
183+
184+
| Command | Description |
185+
|---------|-------------|
186+
| `init <name>` | Create a new blog project |
187+
| `build` | Build static site to `public/` |
188+
| `serve` | Start local preview server |
189+
| `new <slug>` | Create a new article |
190+
| `theme` | Manage themes (add, list, remove) |
191+
192+
### Options
193+
194+
| Flag | Default | Description |
195+
|------|---------|-------------|
196+
| `-timeout` | `30s` | Execution timeout |
197+
| `-v` | `false` | Verbose output |
198+
199+
### Examples
200+
201+
```bash
202+
# Create a new blog
203+
hype blog init mysite
204+
205+
# Create with a theme
206+
hype blog init mysite --theme developer
207+
208+
# Build the site
209+
hype blog build
210+
211+
# Start preview server
212+
hype blog serve
213+
214+
# Create a new article
215+
hype blog new hello-world
216+
217+
# List available themes
218+
hype blog theme list
219+
220+
# Add a theme
221+
hype blog theme add suspended
222+
```
223+
224+
---
225+
226+
## Common Options
227+
228+
These options are available across most commands:
229+
230+
| Flag | Description |
231+
|------|-------------|
232+
| `-f` | Input file path |
233+
| `-timeout` | Execution timeout for code blocks |
234+
| `-v` | Enable verbose/debug output |
235+
236+
---
237+
238+
## Exit Codes
239+
240+
| Code | Meaning |
241+
|------|---------|
242+
| `0` | Success |
243+
| `1` | General error |
244+
245+
---
246+
247+
## Getting Help
248+
249+
```bash
250+
# Show available commands
251+
hype
252+
253+
# Show help for a specific command
254+
hype export --help
255+
hype preview --help
256+
hype blog --help
257+
```

0 commit comments

Comments
 (0)