Repository navigation
feat: add on-site documentation and fix navigation #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| # Blog Generator | ||
|
|
||
| <details> | ||
| slug: docs/blog | ||
| published: 03/15/2026 | ||
| author: Gopher Guides | ||
| seo_description: Hype documentation — Blog Generator. Learn how to use this feature in the Hype dynamic Markdown engine. | ||
| tags: docs, blog, hype | ||
| </details> | ||
|
|
||
|
|
||
| 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. | ||
|
|
||
| **Live Demo:** [gopherguides.github.io/hype-blog-sample](https://gopherguides.github.io/hype-blog-sample) | ||
|
|
||
| ## Quick Start | ||
|
|
||
| ```bash | ||
| # Install hype | ||
| go install github.com/gopherguides/hype/cmd/hype@latest | ||
|
|
||
| # Create a new blog | ||
| hype blog init mysite | ||
| cd mysite | ||
|
|
||
| # Create your first article | ||
| hype blog new hello-world | ||
|
|
||
| # Build and preview | ||
| hype blog build | ||
| hype blog serve | ||
| ``` | ||
|
|
||
| Your site is now live at `http://localhost:3000`. | ||
|
|
||
| ## Features | ||
|
|
||
| - **Code Execution** - Run code blocks and include real output (hype's signature feature) | ||
| - **3 Built-in Themes** - suspended (minimal), developer (terminal-style), cards (grid layout) | ||
| - **Hugo-style Templates** - Layered template system with easy customization | ||
| - **Live Reload** - `--watch` flag for automatic rebuilds during development | ||
| - **SEO Ready** - Meta tags, Open Graph, Twitter cards, sitemap, RSS feed | ||
| - **GitHub Pages** - Deploy automatically with the included workflow | ||
|
|
||
| ## Commands | ||
|
|
||
| | Command | Description | | ||
| |---------|-------------| | ||
| | `hype blog init <name>` | Create a new blog project | | ||
| | `hype blog new <slug>` | Create a new article | | ||
| | `hype blog build` | Build the static site | | ||
| | `hype blog serve` | Start local preview server | | ||
| | `hype blog serve --watch` | Preview with live reload | | ||
| | `hype blog theme list` | List available themes | | ||
| | `hype blog theme add <name>` | Add a theme to your project | | ||
|
|
||
| ## Themes | ||
|
|
||
| ### Suspended (Default) | ||
|
|
||
| Minimal, typography-focused theme perfect for technical writing. | ||
|
|
||
|  | ||
|
|
||
| ### Developer | ||
|
|
||
| Dark, terminal-inspired theme for code-heavy blogs. | ||
|
|
||
|  | ||
|
|
||
| ### Cards | ||
|
|
||
| Modern card-based layout with visual hierarchy. | ||
|
|
||
|  | ||
|
|
||
| Switch themes by updating `config.yaml`: | ||
|
|
||
| ```yaml | ||
| theme: "developer" | ||
| ``` | ||
|
|
||
| ## Deploy to GitHub Pages | ||
|
|
||
| Add this workflow to `.github/workflows/deploy.yaml`: | ||
|
|
||
| <code src="src/deploy.yaml"></code> | ||
|
|
||
| Then enable GitHub Pages in your repo settings (Settings > Pages > Source: GitHub Actions). | ||
|
|
||
| ## Project Structure | ||
|
|
||
| <code src="src/structure.txt"></code> | ||
|
|
||
| ## Article Format | ||
|
|
||
| Articles use a `<details>` block for metadata: | ||
|
|
||
| ```markdown | ||
| # My Article Title | ||
|
|
||
| <details> | ||
| slug: my-article | ||
| published: 01/25/2026 | ||
| author: Your Name | ||
| seo_description: Brief description for SEO | ||
| tags: go, tutorial | ||
| </details> | ||
|
|
||
| Your content here... | ||
| ``` | ||
|
|
||
| ## Full Documentation | ||
|
|
||
| For complete documentation including theme customization, template overrides, and advanced features, see [docs/blog/README.md](README.md). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,257 @@ | ||
| # CLI Reference | ||
|
|
||
| <details> | ||
| slug: docs/cli-reference | ||
| published: 03/15/2026 | ||
| author: Gopher Guides | ||
| seo_description: Hype documentation — CLI Reference. Learn how to use this feature in the Hype dynamic Markdown engine. | ||
| tags: docs, cli-reference, hype | ||
| </details> | ||
|
|
||
|
|
||
| Hype provides several commands for working with dynamic markdown documents. | ||
|
|
||
| ## Commands Overview | ||
|
|
||
| | Command | Description | | ||
| |---------|-------------| | ||
| | `export` | Export documents to different formats (markdown, HTML) | | ||
| | `preview` | Start a live preview server with auto-reload | | ||
| | `marked` | Integration with Marked 2 app | | ||
| | `slides` | Web-based presentation server | | ||
| | `blog` | Static blog generator | | ||
|
|
||
| --- | ||
|
|
||
| ## export | ||
|
|
||
| Export hype documents to markdown or HTML. | ||
|
|
||
| ```bash | ||
| hype export [options] | ||
| ``` | ||
|
|
||
| ### Options | ||
|
|
||
| | Flag | Default | Description | | ||
| |------|---------|-------------| | ||
| | `-f` | `hype.md` | Input file to process | | ||
| | `-format` | `markdown` | Output format: `markdown` or `html` | | ||
| | `-o` | stdout | Output file path | | ||
| | `-theme` | `github` | Theme for HTML export | | ||
| | `-css` | | Path to custom CSS file | | ||
| | `-no-css` | `false` | Output raw HTML without styling | | ||
| | `-themes` | | List available themes and exit | | ||
| | `-timeout` | `30s` | Execution timeout | | ||
| | `-v` | `false` | Verbose output | | ||
|
|
||
| ### Examples | ||
|
|
||
| ```bash | ||
| # Export to markdown (default) | ||
| hype export -f hype.md > README.md | ||
|
|
||
| # Export to HTML | ||
| hype export -f docs.md -format html > docs.html | ||
|
|
||
| # Export with a theme | ||
| hype export -f docs.md -format html -theme solarized-dark | ||
|
|
||
| # Export with custom CSS | ||
| hype export -f docs.md -format html -css ./styles.css | ||
|
|
||
| # Export raw HTML (no styling) | ||
| hype export -f docs.md -format html -no-css | ||
|
|
||
| # List available themes | ||
| hype export -themes | ||
|
|
||
| # Output directly to file | ||
| hype export -f hype.md -format markdown -o README.md | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## preview | ||
|
|
||
| Start a live preview server with file watching and auto-reload. | ||
|
|
||
| ```bash | ||
| hype preview [options] | ||
| ``` | ||
|
|
||
| ### Options | ||
|
|
||
| | Flag | Alias | Default | Description | | ||
| |------|-------|---------|-------------| | ||
| | `-f` | | `hype.md` | Source file to preview | | ||
| | `-port` | | `3000` | Server port | | ||
| | `-w` | `-watch` | | Additional directories to watch (repeatable) | | ||
| | `-e` | `-ext` | | File extensions to watch (comma-separated) | | ||
| | `-i` | `-include` | | Glob patterns to include (repeatable) | | ||
| | `-x` | `-exclude` | | Glob patterns to exclude (repeatable) | | ||
| | `-d` | `-debounce` | `300ms` | Debounce delay before rebuild | | ||
| | `-v` | `-verbose` | `false` | Verbose output | | ||
| | `-open` | | `false` | Auto-open browser on start | | ||
| | `-theme` | | `github` | Preview theme | | ||
| | `-css` | | | Custom CSS file path | | ||
| | `-themes` | | | List available themes | | ||
| | `-timeout` | | `0` | Execution timeout | | ||
|
|
||
| ### Examples | ||
|
|
||
| ```bash | ||
| # Basic preview | ||
| hype preview -f hype.md | ||
|
|
||
| # Open browser automatically | ||
| hype preview -f hype.md -open | ||
|
|
||
| # Watch additional directories | ||
| hype preview -f hype.md -w ./src -w ./images | ||
|
|
||
| # Filter by extension | ||
| hype preview -f hype.md -e md,go,html | ||
|
|
||
| # Use a dark theme | ||
| hype preview -f hype.md -theme solarized-dark | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## marked | ||
|
|
||
| Integration with [Marked 2](https://marked2app.com/) for macOS. | ||
|
|
||
| ```bash | ||
| hype marked [options] | ||
| ``` | ||
|
|
||
| ### Options | ||
|
|
||
| | Flag | Default | Description | | ||
| |------|---------|-------------| | ||
| | `-f` | | Input file (uses `MARKED_PATH` if not set) | | ||
| | `-p` | `false` | Parse only (no execution) | | ||
| | `-timeout` | `5s` | Execution timeout | | ||
| | `-context` | | Context folder path | | ||
| | `-section` | `0` | Target section number | | ||
| | `-v` | `false` | Verbose output | | ||
|
|
||
| ### Environment Variables | ||
|
|
||
| - `MARKED_PATH` - Set by Marked 2 to the current file path | ||
| - `MARKED_ORIGIN` - Set by Marked 2 to the file's directory | ||
|
|
||
| --- | ||
|
|
||
| ## slides | ||
|
|
||
| Web-based presentation server. | ||
|
|
||
| ```bash | ||
| hype slides [options] [file] | ||
| ``` | ||
|
|
||
| ### Options | ||
|
|
||
| | Flag | Default | Description | | ||
| |------|---------|-------------| | ||
| | `-port` | `3000` | Server port | | ||
|
|
||
| ### Examples | ||
|
|
||
| ```bash | ||
| # Start slides server | ||
| hype slides presentation.md | ||
|
|
||
| # Use a different port | ||
| hype slides -port 8080 presentation.md | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## blog | ||
|
|
||
| Static blog generator with theming support. | ||
|
|
||
| ```bash | ||
| hype blog <command> [options] | ||
| ``` | ||
|
|
||
| ### Subcommands | ||
|
|
||
| | Command | Description | | ||
| |---------|-------------| | ||
| | `init <name>` | Create a new blog project | | ||
| | `build` | Build static site to `public/` | | ||
| | `serve` | Start local preview server | | ||
| | `new <slug>` | Create a new article | | ||
| | `theme` | Manage themes (add, list, remove) | | ||
|
|
||
| ### Options | ||
|
|
||
| | Flag | Default | Description | | ||
| |------|---------|-------------| | ||
| | `-timeout` | `30s` | Execution timeout | | ||
| | `-v` | `false` | Verbose output | | ||
|
|
||
| ### Examples | ||
|
|
||
| ```bash | ||
| # Create a new blog | ||
| hype blog init mysite | ||
|
|
||
| # Create with a theme | ||
| hype blog init mysite --theme developer | ||
|
|
||
| # Build the site | ||
| hype blog build | ||
|
|
||
| # Start preview server | ||
| hype blog serve | ||
|
|
||
| # Create a new article | ||
| hype blog new hello-world | ||
|
|
||
| # List available themes | ||
| hype blog theme list | ||
|
|
||
| # Add a theme | ||
| hype blog theme add suspended | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Common Options | ||
|
|
||
| These options are available across most commands: | ||
|
|
||
| | Flag | Description | | ||
| |------|-------------| | ||
| | `-f` | Input file path | | ||
| | `-timeout` | Execution timeout for code blocks | | ||
| | `-v` | Enable verbose/debug output | | ||
|
|
||
| --- | ||
|
|
||
| ## Exit Codes | ||
|
|
||
| | Code | Meaning | | ||
| |------|---------| | ||
| | `0` | Success | | ||
| | `1` | General error | | ||
|
|
||
| --- | ||
|
|
||
| ## Getting Help | ||
|
|
||
| ```bash | ||
| # Show available commands | ||
| hype | ||
|
|
||
| # Show help for a specific command | ||
| hype export --help | ||
| hype preview --help | ||
| hype blog --help | ||
| ``` |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
Full Documentationlink targetsREADME.md, but there is nocontent/docs-blog/README.md(or corresponding routed page), so users on/docs/blog/will hit a 404 when they click it. Since this section is presented as the next step for advanced usage, it should link to a valid on-site URL (or a concrete GitHub URL) instead of a missing relative file.Useful? React with 👍 / 👎.