added news
[www.git] / src / news / asciidoctor_to_rss.adoc
1 = Asciidoctor to RSS
2 Jean-Philippe Orsini <jeanfi@gmail.com>
3 :date: 2016-11-07
4 :icons: font
5
6 In order to have a website based only on Asciidoctor
7 documents, I have written a small utility which
8 converts a set of Asciidoctor documents to HTML pages and
9 generates a RSS 2.0 feed.
10
11 == Installation of asciidoctor_to_rss
12
13 It is required to install:
14
15 * maven
16
17 * java (>1.7)
18
19 The sources can be retrieved from GIT:
20
21 ----
22 git clone git clone https://git.wpitchoune.net/asciidoctor_to_rss.git
23 ----
24
25 Compilation:
26
27 ----
28 cd asciidoctor_to_rss
29 mvn clean install
30 ----
31
32 == Howto write news
33
34 Each news has to be written in a separate Asciidoctor document
35 and all documents must be dropped into a directory.
36
37 There is not any restriction concerning the syntax because
38 the utility is based on the java bridge of Asciidoctor.
39 I have added an attribute 'date' which allows the utility
40 to know the publication date of the news.
41
42 You can see some examples at https://wpitchoune.net/gitweb/?p=www.git;a=tree;f=src/news;hb=HEAD .
43 The source document of this news is at https://wpitchoune.net/gitweb/?p=www.git;a=blob;f=src/news/asciidoctor_to_rss.adoc;hb=HEAD
44
45 == Configuration
46
47 The configuration of the utility can be done in text file.
48
49 See an example at https://wpitchoune.net/gitweb/?p=www.git;a=blob;f=src/asciidoctorrss.props;hb=HEAD .
50
51 == Run the utility
52
53 The command line usage is:
54
55 ----
56 asciidoctor_to_rss.sh <IN_DIR> <OUT_DIR> <CFG_FILE>
57 ----
58
59 `IN_DIR`: the directory containing the news as Asciidoctor documents.
60
61 `OUT_DIR`: the output directory which contains all generated files
62
63 `CFG_FILE`: the path to the configuration file
64
65 The `OUT_DIR` will contain:
66
67 * one HTML file for each Asciidoctor document
68
69 * the `news.html` file
70
71 * the `feed.xml` file which is a feed compatible with RSS v2.0.