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