X-Git-Url: https://plomlompom.com/repos/?p=redo-blog;a=blobdiff_plain;f=README.md;h=e4d63fa5f6c218e056a13cf37c634181b37a3400;hp=54029dea8266a961e51639f9b906b7aef6956530;hb=1c7b84260b8a71cabce924814a1d36ed6567a67e;hpb=41db49b35f4622e7caa7aecd9b814d8a760fc259 diff --git a/README.md b/README.md index 54029de..e4d63fa 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,86 @@ -# redo-blog +redo-blog +========= + small blog system using the redo build system + +dependencies +------------ + +- redo +- python3 +- uuidgen (Debian package: uuid-runtime) +- html2text +- pandoc + +testing +------- + +Run ./test.sh. + +setup +----- + +To set up a directory with symbolic links to the relevant files in ./processor/, +run ./add_dir.sh DIRECTORY. + +You can then enter the directory and run redo there. This will generate article +.html files from all .md and .rst files, plus a ./index.html, and a ./feed.xml. +These files will be linked to symbolically in a directory ./public/. + +Some metadata files will also be generated below ./metadata/: For each article, +there will be generated a .uuid and a .intermediate file; furthermore, files for +data used in ./feed.xml and ./index.html will be built there and can be edited +to customize the blog – namely the files url, author, uuid, title, index.tmpl, +index_snippet.tmpl, article.tmpl. + +recipe to use server-side with git +---------------------------------- + +On your server, install the dependencies listed above. Then set up a repository +for your blog files. Let's assume we want it to sit in our home directory and be +called `blog`: + + cd ~ + mkdir blog + git init --bare blog.git + cat << EOF > blog.git/hooks/post-update + #!/bin/sh + BLOGDIR=~/blog + GIT_WORK_TREE=$BLOGDIR git checkout -f + cd \$BLOGDIR + redo + EOF + chmod a+x blog.git/hooks/post-update + +Enable management of `~/blog` via redo-blog: + + git clone https://github.com/plomlompom/redo-blog/ + cd redo-blog/ + ./add_dir.sh ~/blog + mkdir ~/blog/public + +Link to the `public` subdirectory from wherever your web server expects your +public web content to sit: + + ln -s ~/blog/public /var/www/html/blog + +Client-side, do this (obviously, replace server and username): + + cd ~ + git init blog + cd blog + git remote add origin ssh://user@example.org:/home/user/blog.git + mkdir metadata + echo 'https://example.org/blog/' > metadata/url + git add metadata/url + git commit -m 'set up blog metadata' + git push origin master + +bugs +---- + +Don't create a index.rst or index.md in the redo-managed directory, that will +break things. + +Running redo without a single blog entry source file (.md or .rst) in the +directory will also break things.