giraffe

command module
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2022 License: MIT Imports: 4 Imported by: 0

README

Giraffe: An opinionated static site generator

I want to start 2022 by writing a static site generator that is used by my personal website (https://thien.dev)

About the name "Giraffe" it's because of my son. He really like giraffes.

Install

go get github.com/tatthien/giraffe

For non-Go users.

curl -sf https://gobinaries.com/tatthien/giraffe | sh

Usage

There are only 2 commands:

  • giraffe: Build everything into dist folder.
  • giraffe serve: Serving the site at localhost:3333 for preview. It also rebuilds the site when a file in contents and theme changes.

How to write posts?

All content should be localed in /content/{post-type} folder, in markdown format. Each posts should have frontmatter and content:

---
title: <string>
date: YYYY-MM-DD
tags: <string>, <string>
description: <string>
draft: false <boolean> # This is the item status. Set true if you don't want to publish the item.
---

<your-content>

Each folder inside content is corresponding to a post type. For example, the folder /content/posts/ contains all posts.

License

MIT

Copyright (c) 2022-present, Thien Nguyen

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL