This repository contains a Hugo-based documentation site template that's ready to deploy to Cloudflare Pages.
visit this example here https://timsnotes.pages.dev/
-
Fork this repository:
-
Deploy to Cloudflare Pages:
- Go to Cloudflare Pages
- Click "Create application"
- Choose "Pages"
- Select your cloned repository that you just made
- Use these build settings:
- Build command:
hugo
- Build directory:
public
- Environment variable:
HUGO_VERSION
:0.139.3
- Environment variable:
HUGO_ENV
:production
- Build command:
That's it! Your site will be live at [your-project].pages.dev
content/
├── _index.md # Main landing page
├── topic1/
│ ├── _index.md # Topic overview
│ ├── subtopic1/
│ │ └── _index.md # Subtopic content
│ └── subtopic2/
│ └── _index.md
└── [other topics]
Every markdown file should start with frontmatter:
---
title: "Your Page Title"
description: "Brief description"
date: 2024-12-11
draft: false
---
- if draft: true is set, it will not publish publicly
# Heading 1
## Heading 2
### Heading 3
**Bold text**
*Italic text*
~~Strikethrough~~
> This is a blockquote
- Bullet point
- Another point
- Nested point
- Another nested point
1. Numbered list
2. Second item
1. Nested numbered item
2. Another nested item
```python
def hello_world():
print("Hello, World!")
```
# Internal Links
- [Link to Topic 1](/topic1)
- [Link to Subtopic](../subtopic1)
- [Relative link to sibling page](./another-page)
# External Links
[OpenAI](https://openai.com)
![Alt text](/images/example.png)
| Header 1 | Header 2 |
|----------|----------|
| Cell 1 | Cell 2 |
| Cell 3 | Cell 4 |
- From a topic page to its subtopics:
- [Subtopic 1](subtopic1)
- [Subtopic 2](subtopic2)
- From a subtopic back to its parent:
[Back to Topic 1](..)
- From any page to the home page:
[Home](/)
- Between sibling subtopics:
[Next Subtopic](../subtopic2)
Edit hugo.toml
to change:
- Site title
- Base URL (currently using relative path)
- Language settings
- Theme options
- Create a new directory in
content/
- Add an
_index.md
file - Add your content files
- Push to GitHub - Cloudflare will automatically deploy changes
This build uses relative path so custom hostname does work
- Build fails: Check HUGO_VERSION in Cloudflare Pages settings
- Missing content: Ensure frontmatter is properly formatted
- Broken links: Check relative path structure
Need help? Open an issue on GitHub!