comparison COMMENTS @ 113:b296489d9ea1

Updated to give a better overview.
author Steve Kemp <steve@steve.org.uk>
date Thu, 13 Dec 2007 13:29:24 +0000
parents 10797bf26799
children 613ad3447729
comparison
equal deleted inserted replaced
112:bdc987f0c049 113:b296489d9ea1
1 1
2 2
3 Chronicle, since version 2.0, supports the submission of post 3 Chronicle, since version 2.0, supports the submission of comments
4 comments. 4 upon published posts. This document describes how you would go
5 5 about enabling this support.
6 The way this works is rather non-standard so please read this
7 document to understand it.
8 6
9 7
10 Basic Usage 8
11 ----------- 9 Introduction
10 ------------
12 11
13 The basic use of chronicle is to convert a collection of text files 12 The basic use of chronicle is to convert a collection of text files
14 into a HTML & RSS blog. 13 into a HTML & RSS blog.
15 14
16 Generally it appears that people will do this upon a local machine, 15 There are two ways this software is typically used:
17 then scp, rsync, or otherwise move the output into place upon their
18 remote webserver.
19 16
20 This process looks something like this: 17 Single Machine
18 The blog input is stored upon your webserver and you generate
19 the output directly to a web-accessible location upon that
20 machine.
21 21
22 chronicle --input=./blog --output=./html 22 Multiple Machines
23 rsync html user@host:/path/to/blog 23 The blog input lives upon a machine, and once you've generated
24 the output you copy it over to a remote webserver where it may
25 be viewed.
26
27 Depending upon which of these ways you use the software the
28 comment support will need to be handled differently.
24 29
25 30
26 Advanced Usage 31
32 Common Setup
33 ------------
34
35 Install the included file cgi-bin/comments.cgi upon the webserver
36 which hosts the blog, and adjust the settings at the start of that
37 file to specify:
38
39 1. The location to save the comments to.
40
41 2. The source and destination email addresses to use for notication
42 purposes.
43
44
45
46 Single Machine
27 -------------- 47 --------------
28 48
29 Since the blog, once produced, is typically stored upon a remote 49 If you have only a single machine then you may configure the
30 system there is no easy way for comments which are stored upon that 50 comments.cgi script to save the comments in text files directly
31 system to be integrated into the main blog. 51 within your blog tree.
32 52
33 The solution to this problem is to merely record comments upon 53 Assuming you have something like this:
34 the webserver in simple text files.
35 54
36 Later these can be fetched to the machine which is building the 55 comments/
37 blog, and integrated for the next rebuild: 56 A directory to contain the comments.
57 data/
58 The directory where your blog posts are loaded from.
38 59
39 60
40 scp uesr@host://path/to/comments/* ./comments/ 61 You may then regenerate your blog via:
41 chronicle --input=./blog --output=./html --comments=./comments 62
42 rsync html user@host:/path/to/blog 63 chronicle --input=./date/ --comments=./comments/ --output=/var/www/blog/
64
65 This will ensure that the comments saved by your webserver into the
66 comments directory are included in the (re)generated blog.
67
68
43 69
44 70
71 Multiple Machines
72 -----------------
73
74 If you have the blog input files upon machine "local" and the
75 hosted blog upon the machine "remote" then you will run into
76 problems:
77
78 1. The comments are saved by your webserver to a local directory
79 upon the machine "remote".
80
81 2. To rebuild the blog upon your local machine, "local", you must
82 have those files.
83
84 The solution is to generate your blog in a three-step process:
85
86 1. Copy the comment files, if any from "remote" to "local".
87
88 2. Rebuild the blog.
89
90 3. Upload the built blog.
91
92 With the "pre-build" and "post-build" arguments to chronicle
93 you can automate this:
94
95 chronicle
96 --pre-build="rsync varz user@remote:/path/to/comments comments/" \
97 --comments=./comments
98 --output=./output
99 --post-build="rsync vazr ./output user@remote:/path/to/location"
100
101
45 Steve 102 Steve
46 -- 103 --