X-Git-Url: https://plomlompom.com/repos/?p=redo-blog;a=blobdiff_plain;f=README.md;h=420c15164d490f65ba405ce25d6fa265adcf970e;hp=92047da94629eb39e998266eea9d46180a276f54;hb=611d6762ca9203d7595c4921308ebe6ac0112a49;hpb=40b6e84ca0b49be896d60457b43374ab929d2737 diff --git a/README.md b/README.md index 92047da..420c151 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ dependencies - redo - python3 -- uuidgen +- uuidgen (Debian package: uuid-runtime) - html2text - pandoc @@ -25,17 +25,59 @@ 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. -(Some other metadata files will also be generated: for each article, there will -also be generated a .uuid and a .intermediate file; furthermore, files with -metadata used in ./feed.xml and ./index.html will be built and can be edited to -customize the blog: ./url, ./author, ./uuid, ./title.) +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 ---- -Due to bad shell scripting in ./processor/index.html.do and -./processor/feed.xml.do (see the FIXME notes there), source files whose names -contain "$" break the redo processing. - -Oh, and don't create a index.rst or index.md in the redo-managed directory, -that will also break things. +Don't create a index.rst or index.md in the redo-managed directory, that will +break things.