Rewritten in Next.js. (v2 alpha)
Install deps:
$ npm install
Development:
$ npm run dev
Static Site Generation Build:
$ npm run export
It will be generated to out/
directory.
Lint and check file style:
$ npm run lint
Data is in the data/
folder.
.
├── anime
│ ├── is_the_order_a_rabbit
│ │ ├── meta.yaml
│ │ └── testB.md
│ └── k_on
│ ├── meta.yaml
│ ├── testA.md
│ └── testB.md
├── authors.yaml
├── book
│ └── csapp
│ ├── meta.yaml
│ └── testB.md
└── collections.yaml
collections.yaml
:
anime:
name: 动画
book:
name: 书籍
authors.yaml
:
testA:
name: AAA
avatar: ""
testB:
name: BBB
avatar: ""
testC:
name: CCC
avatar: ""
${collection}/${item}/meta.yaml
:
name: 深入理解计算机系统
aliases: ["Computer Systems: A Programmer's Perspective", CSAPP]
links:
- source: 官网
link: https://csapp.cs.cmu.edu/
meta:
- name: ISBN
value: 9787111321330
image: http://csapp.cs.cmu.edu/3e/images/csapp3e-cover.jpg
${collection}/${item}/${author}.md
:
---
tags: [计算机]
score: 9.5
date: 2021-01-01 12:00
---
Amazing!
The new file structure is more natural, as you don't need to put everything in YAML frontmatter.
Take 'game' (游戏) as an example.
- Create a folder
game
indata/
- Append this to
collections.yaml
:game: name: 游戏
Take 'Teeworlds' as an example.
- Create folder
data/game/Teeworlds
- Create
data/game/Teeworlds/meta.yaml
with following contents:name: Teeworlds aliases: - Teeworlds - tws links: - source: Wikipedia link: https://en.wikipedia.org/wiki/Teeworlds - source: Teeworlds.com link: https://www.teeworlds.com/ - source: steam link: https://store.steampowered.com/app/380840/Teeworlds/ meta: - name: test value: test image: https://www.teeworlds.com/images/splashtee6.png
meta
, image
and aliases
are optional.
Assuming that you are 'testA'
-
First you shall add yourself to
data/authors.yaml
testA: name: test A avatar: ""
avatar
is not used for now. -
Create
data/game/Teeworlds/testA.md
with following contents:--- tags: - Open-source - Multiplayer - Sidescrolling score: 9 date: 2021-07-31 13:00 --- Teeworlds is a **great** game.
Notice:
- You can change global timezone in
config/site.js
. Date with timezone is not tested yet. - 206hub trusts user's input, and does not sanitize user input for now.
- You can change global timezone in