Portfoligo is a personal blog and portfolio website, written in Go using the zaptross/gorgeous
library for multi-page static site generation.
To run Portfoligo locally, clone this repository and ensure Go is installed, before running the following commands from the root of the repo:
# install dependencies
go mod download
# build the static site
cd ./cmd/
go run ./
New pages can be added by creating a new .go
file in the ./internal/pages
directory.
The Type
and Slug
properties of the page will inform the file structure and url of the resulting page, eg:
page := types.PageDetails{
Type: "blog",
Slug: "my-first-post",
// ... etc.
}
Will result in a page being generated at dist/blog/my-first-post/index.html
.
Notably, there exists a utility type pages.TYPE_ROOT = "root"
which will result in a page being generated as the index of it's slug type, eg:
page := types.PageDetails{
Type: pages.TYPE_ROOT,
Slug: "blog",
// ... etc.
}
Will result in a page being generated at dist/blog/index.html
.