Skip to content

phayz/phayz.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

myblog

Custom blog engine written in Go.

Features

  • Main page lists all blog posts in reverse chronological order.
  • Posts can be tagged.
  • Sidebar (can be positioned on the left or right) - includes tag cloud, search field, list of 5 most recent blog posts.
  • Tag cloud lists all tags. Selecting a tag lists all blog posts with that tag.
  • Light and dark themes. Selected automatically according to the system setting, but also can be toggled by the user.

Quick Start

Run the blog (serves on http://localhost:8080)

./blog.sh -serve

Build only (outputs to public/)

./blog.sh -build

Usage

./blog.sh [options]

Options

Flags take predecence over options specific in the configuration file.

Flag Description Default
-build Build the blog true
-serve Build and serve the blog false
-config Path to config file config.yaml
-port Port to serve on 8080

Configuration

Edit config.yaml to customize:

  • Site title, description, URL
  • Posts per page
  • Sidebar position and content
  • Theme selection (light/dark)

Examples

# Build the blog
./blog.sh -build

# Build and serve locally
./blog.sh -serve

# Serve on custom port
./blog.sh -serve -port 3000

Directory Structure

Directory Contents
bin/ Compiled binaries for different platforms
content/ Blog posts (Markdown files)
public/ Generated blog output
src/ Go source code
static/ Static assets (JS, images)
themes/ HTML templates and CSS themes

Building from Source

Prerequisites

  • Go 1.26+

Build binaries

The build.sh script builds binaries for macOS (Silicon) and Linux. The Linux build is intended for used in CI/CD environments. To build for other platforms, uncomment the relevant lines in the build script.

# Build all platform binaries
./bin/build.sh

About

Personal site

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors