home · contact · privacy
Fix some issues with the git recipe.
[redo-blog] / README.md
1 redo-blog
2 =========
3
4 small blog system using the redo build system
5
6 dependencies
7 ------------
8
9 - redo
10 - python3
11 - uuidgen (Debian package: uuid-runtime)
12 - html2text
13 - pandoc
14
15 testing
16 -------
17
18 Run ./test.sh.
19
20 setup
21 -----
22
23 To set up a directory with symbolic links to the relevant files in ./processor/,
24 run ./add_dir.sh DIRECTORY.
25
26 You can then enter the directory and run redo there. This will generate article
27 .html files from all .md and .rst files, plus a ./index.html, and a ./feed.xml.
28 These files will be linked to symbolically in a directory ./public/.
29
30 Some metadata files will also be generated below ./metadata/: For each article,
31 there will be generated a .uuid and a .intermediate file; furthermore, files for
32 data used in ./feed.xml and ./index.html will be built there and can be edited
33 to customize the blog – namely the files url, author, uuid, title, index.tmpl,
34 index_snippet.tmpl, article.tmpl.
35
36 recipe to use server-side with git
37 ----------------------------------
38
39 On your server, install the dependencies listed above. Then set up a repository
40 for your blog files. Let's assume we want it to sit in our home directory and be
41 called `blog`:
42
43     cd ~
44     mkdir blog
45     git init --bare blog.git
46     cat << EOF > blog.git/hooks/post-update
47     #!/bin/sh
48     BLOGDIR=~/blog
49     GIT_WORK_TREE=$BLOGDIR git checkout -f
50     cd \$BLOGDIR
51     redo
52     EOF
53     chmod a+x blog.git/hooks/post-update
54
55 Enable management of `~/blog` via redo-blog:
56
57     git clone https://github.com/plomlompom/redo-blog/
58     cd redo-blog/
59     ./add_dir.sh ~/blog
60     mkdir ~/blog/public
61
62 Link to the `public` subdirectory from wherever your web server expects your
63 public web content to sit:
64
65     ln -s ~/blog/public /var/www/html/blog
66
67 Client-side, do this (obviously, replace server and username):
68
69     cd ~
70     git init blog
71     cd blog
72     git remote add origin ssh://user@example.org:/home/user/blog.git
73     mkdir metadata
74     echo 'https://example.org/blog/' > metadata/url
75     git add metadata/url
76     git commit -m 'set up blog metadata'
77     git push origin master
78
79 bugs
80 ----
81
82 Don't create a index.rst or index.md in the redo-managed directory, that will
83 break things.
84
85 Running redo without a single blog entry source file (.md or .rst) in the
86 directory will also break things.