Categorygithub.com/rn2dy/blog
modulepackage
0.0.0-20220301220246-0bc6a23152f4
Repository: https://github.com/rn2dy/blog.git
Documentation: pkg.go.dev

# README

My Blog

Run it locally

First install dependecies

> go get github.com/russross/blackfriday
> go get gopkg.in/yaml.v2

To run it

> go build -o blog
> ./blog

By default go to localhost:3000

copyright 2022

# Functions

FindArticle find article based on the slug.
GetArchiveList generate a archive list grouped by dates and tags/categories.
LoadArticle load one.
LoadArticles all articles in srcDir.
NewSiteConfig initialize global site config.

# Variables

TitleRegex matches the post slug.

# Structs

Article
Article is the model of each posts.
C http request context to store free variables.
Matcher my custom path matcher.
Mux custom http multiplexer.
Router register matchers from a pattern and also does static file serving.
SimpleLogger default logger.
SiteConfig holds global configs, mostly paths.
Subscriber - describe subscribers.

# Interfaces

Logger custom logger.

# Type aliases

Articles is a collection of Article.
Handler a adapter for my own convenient.