Template Homepage #

This repository contains a Hugo-based documentation site template that’s ready to deploy to Cloudflare Pages.

Quick Start #

  1. Clone this repository:
git clone https://github.com/taslabs-net/timsnotes.git
  1. 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:
      • Framework Present: Hugo
      • Build command: hugo
      • Build directory: public
      • Environment variable: HUGO_VERSION: 0.139.3
      • Environment variable: HUGO_ENV : production

That’s it! Your site will be live at [your-project].pages.dev

Site Structure #

content/
├── _index.md          # Main landing page (Hugo home page)
└── docs/              # Required by Book theme
    ├── _index.md      # Docs section landing page
    ├── topic1/           
    │   ├── _index.md     # Topic overview
    │   ├── subtopic1/    
    │   │   └── _index.md # Subtopic content
    │   └── subtopic2/
    │       └── _index.md
    ├── topic2/
    │   ├── _index.md
    │   ├── subtopic1/
    │   │   └── _index.md
    │   └── subtopic2/
    │       └── _index.md
    └── topic3/
        ├── _index.md
        ├── subtopic1/
        │   └── _index.md
        └── subtopic2/
            └── _index.md

Creating Content #

File Format #

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

Markdown Examples #

Basic Formatting #

# Heading 1
## Heading 2
### Heading 3

**Bold text**
*Italic text*
~~Strikethrough~~

> This is a blockquote

Lists #

- Bullet point
- Another point
  - Nested point
  - Another nested point

1. Numbered list
2. Second item
   1. Nested numbered item
   2. Another nested item

Code #

```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)

Images #

![Alt text](/images/example.png)

Tables #

| Header 1 | Header 2 |
|----------|----------|
| Cell 1   | Cell 2   |
| Cell 3   | Cell 4   |
  1. From a topic page to its subtopics:
- [Subtopic 1](subtopic1)
- [Subtopic 2](subtopic2)
  1. From a subtopic back to its parent:
[Back to Topic 1](..)
  1. From any page to the home page:
[Home](/)
  1. Between sibling subtopics:
[Next Subtopic](../subtopic2)

Customization #

Site Configuration #

Edit hugo.toml to change:

  • Site title
  • Base URL (currently using relative path)
  • Language settings
  • Theme options

Adding New Topics #

  1. Create a new directory in content/
  2. Add an _index.md file
  3. Add your content files
  4. Push to GitHub - Cloudflare will automatically deploy changes

Troubleshooting #

Common Issues #

  1. Build fails: Check HUGO_VERSION in Cloudflare Pages settings
  2. Missing content: Ensure frontmatter is properly formatted
  3. Broken links: Check relative path structure

Need help? Open an issue on GitHub!