hugo new posts/hello-world.md 5. **Edit the Markdown File:** Open `content/posts/hello-world.md` in your IDE. You will see some YAML frontmatter at the top (title, date, draft status). Change `draft: true` to `draft: false` and add some test content.markdown — title: “Hello World” date: 2026-05-02T17:30:00+05:30 draft: false —

This is a test post to verify the Cloudflare Pages pipeline is working.
```
  1. Test Locally: Run the local development server.
    hugo server -D
    
    Visit http://localhost:1313 in your browser to verify the site renders correctly.

Phase 2: Push to GitHub

  1. Commit Your Code: Stop the local server (Ctrl+C) and commit your files.
    git add .
    git commit -m "Initial commit with Hugo setup and Hello World post"
    
  2. Create a Remote Repository: Go to GitHub, create a new public or private repository named automated-weekly-digest (do not initialize it with a README or .gitignore).
  3. Push to Origin: Link your local repository to GitHub and push the code.
    git branch -M main
    git remote add origin https://github.com/YOUR_GITHUB_USERNAME/automated-weekly-digest.git
    git push -u origin main
    

Phase 3: Deploy to Cloudflare Pages

  1. Connect to Cloudflare: Log in to your Cloudflare dashboard.
  2. Navigate to Pages: On the left sidebar, click on Workers & Pages, then click the Create application button. Select the Pages tab and click Connect to Git.
  3. Authorize GitHub: Follow the prompts to authorize Cloudflare to read your GitHub repositories. Select your automated-weekly-digest repository and click Begin setup.
  4. Configure Build Settings: This is the most critical step to ensure Cloudflare knows how to build your site.
    • Project name: (Leave as default or rename)
    • Production branch: main
    • Framework preset: Select Hugo from the dropdown menu.
    • Build command: hugo --minify
    • Build output directory: public
  5. Set the Environment Variable: Scroll down to the Environment variables (advanced) section. Cloudflare uses an older version of Hugo by default, which can cause build errors with modern themes.
    • Click Add variable.
    • Variable name: HUGO_VERSION
    • Value: 0.120.0 (or whatever version you see when you run hugo version locally).
  6. Deploy: Click Save and Deploy.

Cloudflare will instantly pull your code, run the build command, and deploy the HTML to its edge network. Within about 30 seconds, you will be given a live *.pages.dev URL where you can see your “Hello World” post live on the internet.

From this point forward, anytime your future MCP automation script pushes a new .md file to the content/posts/ directory of that GitHub repository, Cloudflare will automatically rebuild and publish the update without any manual intervention.