-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.in
69 lines (47 loc) · 1.9 KB
/
README.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
## Usage
Create a configuration file (in [Java properties](https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html) format):
```
# The blog title
com.io7m.zeptoblog.title = Example Blog
# The blog source tree
com.io7m.zeptoblog.source_root = /home/someone/blog-src
# The output directory tree
com.io7m.zeptoblog.output_root = /tmp/blog-out
# The number of posts per page
com.io7m.zeptoblog.posts_per_page = 30
# The site URI
com.io7m.zeptoblog.site_uri = http://blog.io7m.com/
# The author information that will appear in Atom feeds
com.io7m.zeptoblog.author = [email protected]
# The default format of blog posts (CommonMark, here)
com.io7m.zeptoblog.format_default = com.io7m.zeptoblog.commonmark
```
Create posts by creating files in `com.io7m.zeptoblog.source_root` with names ending in `.zbp`.
Posts must consist of a series of commands that specify the date
(in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) and
title of the post, followed by an empty line, followed by the body
of the post in [CommonMark](http://commonmark.org/) format.
```
$ cat /home/someone/blog-src/2017/02/24/post.zbp
title An example post
date 2017-02-24T19:37:48+0000
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur
efficitur sed nisi ac volutpat.
![Ladybug](/2017/02/24/ladybug.jpg)
```
Files can appear anywhere in `com.io7m.zeptoblog.source_root`,
including any subdirectory, and directory names do not carry any
specific meaning. Organizing posts by `year/month/day` is merely a
useful convention. Any files with names not ending in `.zbp` will
be copied unmodified to the output directory.
Compile the blog:
```
$ zeptoblog compile --file blog.conf
```
Sign pages with `gpg`:
```
$ find /tmp/blog-out -name '*.xhtml' -type f -exec gpg -a --detach-sign -u 'my key id' {} \;
```
Use [rsync](https://rsync.samba.org/) to copy `/tmp/blog-out` to a site.
## Real-world Examples
https://blog.io7m.com