X-Git-Url: https://plomlompom.com/repos/?p=redo-blog;a=blobdiff_plain;f=README.md;h=c28df86a0a0488f6b33bf9545a9de78718f318c9;hp=9d6a05b17e7cbffe92d6f62d90315fa5f8724102;hb=a8f1293b7fdf45388f990afabe194ad3d09502b4;hpb=6b5631096b03f1c985bc40c4d2e244315280c686 diff --git a/README.md b/README.md index 9d6a05b..c28df86 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,15 @@ redo-blog ========= -small blog system using the redo build system +small blog system using the redo build system, with blog article files written +in (pandoc) Markdown or ReStructured Text. dependencies ------------ - redo - python3 -- uuidgen +- uuidgen (Debian package: uuid-runtime) - html2text - pandoc @@ -29,12 +30,62 @@ 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. +data used in ./feed.xml and ./index.html will, if non-existant, 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. -bugs ----- +recipe to remotely manage a redo blog 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 (you obviously need to customize this code; at least +replace the username `user` and the server name `example.org`): + + 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 and peculiarities +---------------------- Don't create a index.rst or index.md in the redo-managed directory, that will break things. + +The article title is derived in .md files from a first line prefixed with "% ", +while all other headings are treated as sub-headings. In .rst files, the title +is derived from a heading that must be at the top of the document, and be of an +adornment style (such as underlining with "=") that must be used only once in +it.