From: Christian Heller Date: Mon, 2 Jan 2017 02:43:41 +0000 (+0100) Subject: Update README. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/static/todo?a=commitdiff_plain;h=db90b1dd62031a9b1f05d21b73a47335bc35892c;p=redo-blog Update README. --- diff --git a/README.md b/README.md index 9d6a05b..f036e86 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ dependencies - redo - python3 -- uuidgen +- uuidgen (Debian package: uuid-runtime) - html2text - pandoc @@ -33,8 +33,54 @@ 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: + + link -s ~/blog/public /var/www/html/blog + +Client-side, do this: + + cd ~ + git init blog + cd blog + git remote add origin ssh://user@example.org:~/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.