Skip to content

hoathienvu8x/tulip

Repository files navigation

Simple Tulip blog markdown with golang

That is simple blog markdown with golang. Not smart and clean code.

Requirements

go get github.com/julienschmidt/httprouter
go get github.com/russross/blackfriday
go get github.com/sourcegraph/syntaxhighlight
go get github.com/PuerkitoBio/goquery

Installation

To install this repository using command

go get github.com/hoathienvu8x/tulip && cp -rf ~/go/src/github.com/hoathienvu8x/tulip ~/go/src/tulip

That command will get source store to go source and copy to go src folder

To run script follow command

cd ~/go/src/tulip
export TULIP_PORT=9600
go run tulip.go

Open webbrower type http://localhost:9600

Configuration

You can configure this using environment variables. You need to add prefix TULIP_ before the name of options.

Option Description Type
PORT Port number string
BASEDIR Base directory for your site string
POSTDIR Path to directory of your blog's posts string
TEMPLDIR Path to directory of your blog's templates string
STATICDIR Path to directory of your blog's static files string
RELATIVE If true make *DIR relative to BASEDIR bool
MAXPOSTS Number of max posts in one page uint8
Option Default
PORT ":9600"
BASEDIR $PWD
POSTDIR "posts"
TEMPLDIR "templates"
STATICDIR "static"
RELATIVE true
MAXPOSTS 5

Write a post

To write a post you must create *.md file with struct and save to posts folder

---
title:The title
excerpt:The excerpt
date:2019-06-18 15:02:00
author:The author
tags:the tag with ","
categories:The category with ","
---

The content will be here

Links

Zupzup.Org Documentation syntax highlight

La Tulip

About

Go tulip source code blog simple

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published