go-builder manual

August 23, 2025

User Guide: The go-builder Tool

This guide explains how to use the go-builder command-line tool to build the static website from your source files.


Purpose

The go-builder tool is the static site generator for this project. It takes your Markdown posts, templates, and images and compiles them into a complete, ready-to-deploy website.

The tool automates the following steps: 1. Reads the sections.ini configuration file to understand the blog’s structure. 2. Processes each Markdown post, converting it to HTML. 3. Applies the correct HTML templates to the generated content. 4. Copies all associated images to the final output directory. 5. Organizes the final HTML files and images into a clean directory structure inside the dist/ folder.


Project Directory Structure

The builder relies on a specific project structure to work correctly. The key components are the sections.ini file, a src/ directory for your content, a templates/ directory for your layouts, and a dist/ directory for the output.

/home/user/my-blog/
├── sections.ini
├── go-builder
├── templates/
│   ├── post.html
│   └── index.html
├── src/
│   ├── articles/
│   │   ├── images/
│   │   └── posts/
│   │       └── another-article.md
│   │
│   └── blog/
│       ├── images/
│       │   └── image1.png
│       └── posts/
│           └── example-article.md
│
└── dist/
    └── ... (This directory is created by the builder)

The sections.ini File

This configuration file tells the builder which sections to process. Each section listed in this file must correspond to a directory inside src/.

Example sections.ini:

[sections]
articles
blog

How to Use

The go-builder tool is simple to run. It does not require any command-line switches. Just execute the program from the root directory of your blog project.

./go-builder

What Happens

When you run the command, the tool performs the build process and creates (or overwrites) the dist/ directory. The final, static version of your website will be located in dist/.

The output structure inside dist/ will mirror your source structure:

/home/user/my-blog/
└── dist/
    ├── articles/
    │   ├── images/
    │   │   └── another-image.jpg
    │   └── another-article.html
    │
    └── blog/
        ├── images/
        │   └── image1.png
        └── example-article.html

You can then deploy the contents of the dist/ directory to your web server.

Reply via email

© 2026 rcanzlovar.com | About | Contact | Privacy Policy | RSS Feed