Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Minimalistic SSG(Static Site Generator) in Go

NotificationsYou must be signed in to change notification settings

K-Sato1995/go-simple-ssg

Repository files navigation

Yet another SSG in Go. It's not intended to replace any existing SSGs. I created it as a learning exercise and really enjoyed the process.🤗

Heavily inspired by this blog post(Writing a Static Blog Generator in Go) by@zupzup.

In case you are wondering how to use this, check out the Initialization process below.

Initialization

Install the cli.

go install github.com/K-Sato1995/go-simple-ssg/simple-ssg-cli@latest

run

simple-ssg-cli init

would create a new project that looks somethi ng like this.

./├── contents/ (Stores markdown files)├── templates/ (Stores template html files and style files)├── generated/ (Stores generated files)├── go.mod├── go.sum└── main.go

cd your project and just run

go run main.go

You should be able to see the site running onhttp://localhost:3001

Todo

  • CLI To run generating static contents based on the config file
    • put all the code in one func
    • create cmd to copy the template
  • write tests
  • Custom Error pages(404)
  • HMR
  • SEO stuffda

About

Minimalistic SSG(Static Site Generator) in Go

Topics

Resources

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp