Mercurial > hg > chronicle
annotate COMMENTS @ 307:fe474f3ed3e5 default tip
Making archive pages have the same layout as the index
author | Dominic Cleal <dominic@computerkb.co.uk> |
---|---|
date | Mon, 22 Dec 2008 12:08:20 +0000 |
parents | 6e34732430db |
children |
rev | line source |
---|---|
109 | 1 |
2 | |
286
6e34732430db
Updated ot include the comments.cgi file.
Steve Kemp <steve@steve.org.uk>
parents:
220
diff
changeset
|
3 Chronicle supports the submission of comments upon published posts, |
6e34732430db
Updated ot include the comments.cgi file.
Steve Kemp <steve@steve.org.uk>
parents:
220
diff
changeset
|
4 via an optional CGI script. |
6e34732430db
Updated ot include the comments.cgi file.
Steve Kemp <steve@steve.org.uk>
parents:
220
diff
changeset
|
5 |
6e34732430db
Updated ot include the comments.cgi file.
Steve Kemp <steve@steve.org.uk>
parents:
220
diff
changeset
|
6 This document describes how you would go about enabling this support. |
109 | 7 |
8 | |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
9 |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
10 Introduction |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
11 ------------ |
109 | 12 |
13 The basic use of chronicle is to convert a collection of text files | |
14 into a HTML & RSS blog. | |
15 | |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
16 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
|
17 |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
18 Single Machine |
286
6e34732430db
Updated ot include the comments.cgi file.
Steve Kemp <steve@steve.org.uk>
parents:
220
diff
changeset
|
19 -------------- |
220 | 20 The blog input is stored upon your web-server and you generate |
141
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
21 the output directly to a http-accessible directory upon that |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
22 machine. |
109 | 23 |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
24 Multiple Machines |
286
6e34732430db
Updated ot include the comments.cgi file.
Steve Kemp <steve@steve.org.uk>
parents:
220
diff
changeset
|
25 ----------------- |
141
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
26 The blog input lives upon one machine, and once you've generated |
220 | 27 the output you copy it over to a remote web-server where it may |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
28 be viewed. |
109 | 29 |
141
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
30 Depending upon which of these ways you use the software the |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
31 comment support will need to be handled differently. |
109 | 32 |
33 | |
113
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 Common Setup |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
36 ------------ |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
37 |
286
6e34732430db
Updated ot include the comments.cgi file.
Steve Kemp <steve@steve.org.uk>
parents:
220
diff
changeset
|
38 Install the included file comments.cgi upon the web-server |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
39 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
|
40 file to specify: |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
41 |
141
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
42 1. The local directory to save the comments within. |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
43 |
220 | 44 2. The source and destination email addresses to use for |
45 notification purposes. | |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
46 |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
47 |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
48 |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
49 Single Machine |
109 | 50 -------------- |
51 | |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
52 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
|
53 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
|
54 within your blog tree. |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
55 |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
56 Assuming you have something like this: |
109 | 57 |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
58 comments/ |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
59 A directory to contain the comments. |
220 | 60 NOTE: You will need to ensure your web-server has the permissions |
129 | 61 to save files to this directory. |
62 | |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
63 data/ |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
64 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
|
65 |
109 | 66 |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
67 You may then regenerate your blog via: |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
68 |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
69 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
|
70 |
220 | 71 This will ensure that the comments saved by your web-server into the |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
72 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
|
73 |
129 | 74 |
109 | 75 |
76 | |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
77 Multiple Machines |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
78 ----------------- |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
79 |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
80 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
|
81 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
|
82 problems: |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
83 |
220 | 84 1. The comments are saved by your web-server to a local directory |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
85 upon the machine "remote". |
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 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
|
88 have those files. |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
89 |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
90 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
|
91 |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
92 1. Copy the comment files, if any from "remote" to "local". |
109 | 93 |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
94 2. Rebuild the blog. |
109 | 95 |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
96 3. Upload the built blog. |
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 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
|
99 you can automate this: |
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
100 |
204
1d4f3be0e000
Updated the comment example to be valid.
Steve Kemp <steve@steve.org.uk>
parents:
141
diff
changeset
|
101 chronicle \ |
1d4f3be0e000
Updated the comment example to be valid.
Steve Kemp <steve@steve.org.uk>
parents:
141
diff
changeset
|
102 --pre-build="rsync -varz user@remote:/path/to/comments comments/" \ |
1d4f3be0e000
Updated the comment example to be valid.
Steve Kemp <steve@steve.org.uk>
parents:
141
diff
changeset
|
103 --comments=./comments \ |
1d4f3be0e000
Updated the comment example to be valid.
Steve Kemp <steve@steve.org.uk>
parents:
141
diff
changeset
|
104 --output=./output \ |
1d4f3be0e000
Updated the comment example to be valid.
Steve Kemp <steve@steve.org.uk>
parents:
141
diff
changeset
|
105 --post-build="rsync -vazr ./output user@remote:/path/to/location" |
113
b296489d9ea1
Updated to give a better overview.
Steve Kemp <steve@steve.org.uk>
parents:
109
diff
changeset
|
106 |
129 | 107 |
141
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
108 |
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
109 Spam Filtering |
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
110 -------------- |
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
111 |
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
112 In the modern world many blogs will receive comments which are |
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
113 just spam, and not related to your content at all. |
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
114 |
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
115 My solution to this is to use an email spam filter upon the |
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
116 comments. So my comments are saved to a directory, and later |
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
117 tested automatically. If they are non-spam they are kept, if |
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
118 they are spam they are deleted. |
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
119 |
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
120 You might need to do something similar for your own installation. |
07482ca8e696
minor rewording + new section on spam.
Steve Kemp <steve@steve.org.uk>
parents:
129
diff
changeset
|
121 |
109 | 122 Steve |
204
1d4f3be0e000
Updated the comment example to be valid.
Steve Kemp <steve@steve.org.uk>
parents:
141
diff
changeset
|
123 -- |