Categorygithub.com/barelyhuman/statico
modulepackage
0.0.8-dev.0
Repository: https://github.com/barelyhuman/statico.git
Documentation: pkg.go.dev

# README

Statico

A static site generator for creative devs

If you like any of my work, you can support me on: https://barelyhuman.dev/donate

Motivation

I use markdown for most of my writing and really like the simplicity. This started as an experiment to power my websites but is now at a decent level of generalisation to be used by others.

Features

  • Supports Templates (Go Templates)
  • Watch Mode
  • Local server
  • ⚡ Fast
  • Markdown => HTML

Documentation

Documentation - You can find your documentation here

Install

  • You can download the binaries from the releases page for your specific system and add it to a directory that is in your PATH variables.

Usage

$ statico [flags]

Usage of statico:
  -c -config
        alias -config
  -config string
        Config file to use
  -init
        Initialize the app
  -s -serve
        alias -serve
  -serve
        Enable file server
  -w -watch
        alias -watch
  -watch
        Start statico in watch mode

statico doesn't come with any necessary boilerplate and just injects a few variables into the provided templates using a .config.yml file. You can either use the default template or make your own with inspirations and hacking the following available templates

The tool needs a config.yml and you can find a template in this repository config.template.yml

Template Development

  • If you wish to develop templates for the same, please try naming them in the following format statico-<name>-template, to make it easier for people looking for other templates and make sure you have a demo/preview link for the same on the repo.

  • The templates are purely built on go-templates and you can include and do all kinds of stuff that you'd do with a normal go template, the only limitation being that the config can take only so many 4 types of template name so those 4 are to act as your umbrella templates, you can always use the above example templates for checking out use-cases

Contribute

Issues and PR's are your way to go, fork the repository, create a PR and you're done. Just make sure you let the maintainer know about the issue you pick up to avoid overlaps

License

MIT © Reaper

# Functions

No description provided by the author
CopyDir recursively copies a directory tree, attempting to preserve permissions.
CopyFile - copies the file from one directory to another.
No description provided by the author
GenerateMeta - Genrate the base meta data for a generic markdown file, doesn't generate it for other files so the others are handled in their specific functions.
No description provided by the author
No description provided by the author
Statico - static file and index generator.
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author

# Structs

ATOMFeed - Information stuct containing all needed items for for creating a Atom RSS Feed TODO: has duplicate structs and can reuse existing structs.
No description provided by the author
Date was added to act as a custom Marshal and Unmarshal solution for working with various date formats that the posts contain and right now supports the following "02-01-2006" "2006-01-02" "02/01/2006" "2/01/2006" "2006-01-02 15:04:05" "2006-01-02T15:04:05.999999999Z07:00".
BlogIndex , used for storing metadata indexes for creatings a blog index responsible for the /posts url to show a list of all available posts.
No description provided by the author
Post
Post - container for both metadata and the content of the post used to differentiate between a post and just metadata as part of other items that might need metadata.
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author