Skip to content

Static website generator based on golang (for personal blogs, etc.)

License

Notifications You must be signed in to change notification settings

lanqy/mksite.go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mksite.go

Build html file from markdown folder

Usage

  • create markdown files folder
  • create html template
  • create config.json

for example:

{
    "siteName": "site name here",
    "staticDir": "static",
    "baseUrl": "https://lanqy.xyz",
    "sourceDir": "source/_posts/*",
    "targetDir": "website",
    "postTemplateFile": "template/post.html",
    "navTemplateFile": "template/nav.html",
    "indexTemplateFile": "template/index.html",
    "tagTemplateFile": "template/tag.html",
    "itemTemplateFile": "template/item.html"
}

run

go run ./mksite.go

or build .exe

go build -o mksite.exe ./mksite.go

then you got a website on website folder :)

note

not work with go get install if you use windows

Use node.js ?

Nodejs: https://github.com/lanqy/mksite

Use rust ?

Rust: https://github.com/lanqy/mksite.rs

Releases

No releases published

Packages

No packages published