landonia / landotube

The blog of Landon Wainwright that uses the simplegoblog package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

landotube

My blog landotube created using the simplegoblog. Deployed using Docker.

Overview

I have uploaded my blog to github as an example on how to create a blog using simplegoblog. All changes to the blog will be committed here and available for all to see.

Maturity

This is my first actual application written using the Go Language and therefore you should expect some bugs.

Installation

With a healthy Go Language installed, simply run go get github.com/landonia/landoblog

Out of Box Example

With a healthy Go Language installed, simply run go build github.com/landonia/landotube/main

Custom Example

	package main

	import (
		"fmt"
		"github.com/landonia/simplegoblog/blog"
	)

	func main() {
		blog := SimpleBlog.Create(directory)

		// If you want to overwrite the NotFound page
		blog.NotFoundPage("page.html")

		// Or
		blog.NotFoundFunction(func(){})

		// Any custom handlers
		err := blog.AddCustomHandler("/custom", func() {})
		if err != nil {
			panic(err.Error())
		}

		// Start the server
		err != blog.Start()
		if err != nil {
			panic(err.Error())
		}
	}

Future

As the blog posts are marshalled to/from json and written to disk it would make sense to add a feature that would allow you to use a json backed data store such as mongodb.

About

simplegoblog was written by Landon Wainwright | GitHub.

Follow me on Twitter @landotube! Although I don't really tweet much tbh.

About

The blog of Landon Wainwright that uses the simplegoblog package

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:CSS 92.6%Language:HTML 6.2%Language:Go 1.3%