go get


GIN-powered blog boilerplate

Provides essentials that most web blogs need - MVC pattern, user authorisation, SQL db migration, admin dashboard, javascript form validation, rss feeds, etc.

It consists of the following core components:

TODO (May be)


Home page


Markdown editor

Fancy 404, 405, 500 error pages


git clone
cd ginblog
go get .

Copy sample config cp config/config.json.example config/config.json, create postgresql database, modify config/config.json accordingly.

Type go run main.go -migrate=up to create users and pages tables.

go run main.go to launch web server.


make build

Upload ginblog binary and public directory to your server. If you find rice embed-go is running slow on your system, consider using other go.rice packing options with go generate command.

Project structure


Contains application configuration file.


All your controllers that serve defined routes.


Helper functions.


Database schema migrations


You database models.


It has all your static files


Core functions and structs.


Your views using standard Go template system.


This file starts your web application, contains routes definition & some custom middlewares.

Make it your own

I assume you have followed installation instructions and you have ginblog installed in your GOPATH location.

Let's say I want to create Amazing Website. I create new GitHub repository (of course replace that with your own repository).

Now I have to prepare ginblog. First thing is that I have to delete its .git directory.

I issue:

rm -rf src/

Then I want to replace all references from to

grep -rl '' ./ | xargs sed -i 's/\/denisbakhtin\/ginblog/\/denisbakhtin\/amazingblog/g'

Now I have to move all ginblog files to the new location:

mv src/ src/

And push it to my new repository at GitHub:

cd src/
git init
git add --all .
git commit -m "Amazing Blog First Commit"
git remote add origin
git push -u origin master

You can now go back to your GOPATH and check if everything is ok:

go install

And that's it.

Continuous Development

For Continuous Development I recommend using Reflex -

You can install Reflex by issuing:

go get

Then create a config file reflex.conf in your GOPATH:

# Restart server when .go, .html files change
-sr '(\.go|\.html)$' go run main.go

Now if you run reflex -c reflex.conf, project will automatically rebuild itself when a change to *.go, *.html file occurs. For more options read