InkPaper is a static blog generator developed in Golang. No dependencies, cross platform, easy to use, fast building times and an elegant theme.
-
Download & Extract Ink and run
ink preview
Tip:Linux/macOS, use
./ink preview
-
Open
http://localhost:8000
in your browser to preview
Edit config.yml
, use this format:
site:
title: Website Title
subtitle: Website Subtitle
limit: Max Article Count Per Page
theme: Website Theme Directory
comment: Comment Plugin Variable (Default is disqus username)
root: Website Root Path #Optional
lang: Website Language #Support en, zh, ru, ja, de, Configurable in theme/lang.yml
url: Website URL #For RSS Generating
link: Article Link Scheme #Default Is {title}.html,Support {year},{month},{day},{hour},{minute},{second},{title} Variables
authors:
AuthorID:
name: Author Name
intro: Author Motto
avatar: Author Avatar Path
build:
output: Build Output Directory #Optional, Default is "public"
port: Preview Port
copy:
- Copied Files When Build
publish: |
Excuted command when 'ink publish' is used
Create a .md
file in the source
directory (Supports subdirectories). Use this format:
title: Article Title
date: Year-Month-Day Hour:Minute:Second #Created Time,Support TimeZone, such as " +0800"
update: Year-Month-Day Hour:Minute:Second #Updated Time,Optional,Support TimeZone, such as " +0800"
author: AuthorID
cover: Article Cover Path #Optional
draft: false #If Draft,Optional
top: false #Place article to top, Optional
preview: Article Preview,Also use <!--more--> to split in body #Optional
tags: #Optional
- Tag1
- Tag2
type: post #Specify type is post or page, Optional
hide: false #Hide article,can be accessed via URL, Optional
---
Markdown Format's Body
- Run
ink publish
in the blog directory to automatically build and publish - Or run
ink build
to manually deploy generatedpublic
directory
Tips: When
source
directory changed,ink preview
will automatically rebuild the blog. Refresh browser to update
The default theme is placed in the theme
folder, run npm install
and npm run build
to rebuild in this folder.
page page.html
(article list) and article.html
(article), use variable with Golang Template syntax.
Created any .html
file will be copied to source
directory, could use all variables on site
field in config.yml
.
Supports simple Jeklly/Hexo post convertions. Usage:
ink convert /path/_posts
Local Build (for go 1.18
- Install Golang environment
- Run
go get github.com/InkProject/ink
, compile and get ink - Run
ink preview $GOPATH/src/github.com/InkProject/ink/template
, preview blog
Docker Build (Example)
- Clone code
git clone git@github.com:InkProject/ink.git
- Build image
docker build -t ink .
in source directory - Run container
docker run -p 8888:80 ink
- Dark (Official Theme): https://github.com/InkProject/ink-theme-dark
- Simple: https://github.com/myiq/ink-simple
- Story: https://github.com/akkuman/ink-theme-story
- Material2: https://github.com/w568w/InkMaterialTheme