]> git.r.bdr.sh - rbdr/blog/blame - doc/README.md
Add help
[rbdr/blog] / doc / README.md
CommitLineData
97b33932
RBR
1## Classes
2
3<dl>
4<dt><a href="#Blog">Blog</a></dt>
5<dd></dd>
6</dl>
7
8## Members
9
10<dl>
11<dt><a href="#HTMLGenerator">HTMLGenerator</a></dt>
12<dd><p>Generates the blog index page</p>
13</dd>
14<dt><a href="#RSSGenerator">RSSGenerator</a></dt>
15<dd><p>Generates an RSS feed XML file</p>
16</dd>
17<dt><a href="#StaticGenerator">StaticGenerator</a></dt>
18<dd><p>Generates the static assets required for the blog</p>
19</dd>
20<dt><a href="#TXTGenerator">TXTGenerator</a></dt>
21<dd><p>Generates a TXT version of the blog</p>
22</dd>
23</dl>
24
d92ac8cc
BB
25<a name="Blog"></a>
26
27## Blog
28**Kind**: global class
29
30* [Blog](#Blog)
31 * [new Blog(config)](#new_Blog_new)
32 * [.add(postLocation)](#Blog+add) ⇒ <code>Promise.&lt;undefined&gt;</code>
33 * [.update(postLocation)](#Blog+update) ⇒ <code>Promise.&lt;undefined&gt;</code>
34 * [.publish()](#Blog+publish) ⇒ <code>Promise.&lt;undefined&gt;</code>
97b33932
RBR
35 * [.publishArchive()](#Blog+publishArchive) ⇒ <code>Promise.&lt;undefined&gt;</code>
36 * [.addRemote()](#Blog+addRemote) ⇒ <code>Promise.&lt;undefined&gt;</code>
37 * [.removeRemote()](#Blog+removeRemote) ⇒ <code>Promise.&lt;undefined&gt;</code>
38 * [.syncDown()](#Blog+syncDown) ⇒ <code>Promise.&lt;undefined&gt;</code>
39 * [.syncUp()](#Blog+syncUp) ⇒ <code>Promise.&lt;undefined&gt;</code>
d92ac8cc
BB
40
41<a name="new_Blog_new"></a>
42
43### new Blog(config)
44The Blog class is the blog generator, it's in charge of adding and
45updating posts, and handling the publishing.
46
47
48| Param | Type | Description |
49| --- | --- | --- |
97b33932 50| config | <code>Blog.tConfiguration</code> | the initialization options to extend the instance |
d92ac8cc
BB
51
52<a name="Blog+add"></a>
53
54### blog.add(postLocation) ⇒ <code>Promise.&lt;undefined&gt;</code>
97b33932 55Shifts the blog posts, adds the passed file to slot 0, and
d92ac8cc
BB
56generates files.
57
58**Kind**: instance method of [<code>Blog</code>](#Blog)
59**Returns**: <code>Promise.&lt;undefined&gt;</code> - empty promise, returns no value
60
61| Param | Type | Description |
62| --- | --- | --- |
97b33932 63| postLocation | <code>string</code> | the path to the blog post file |
d92ac8cc
BB
64
65<a name="Blog+update"></a>
66
67### blog.update(postLocation) ⇒ <code>Promise.&lt;undefined&gt;</code>
97b33932 68Update slot 0 with the passed gmi file, and generates files.
d92ac8cc
BB
69
70**Kind**: instance method of [<code>Blog</code>](#Blog)
71**Returns**: <code>Promise.&lt;undefined&gt;</code> - empty promise, returns no value
72
73| Param | Type | Description |
74| --- | --- | --- |
97b33932 75| postLocation | <code>string</code> | the path to the blog post file |
d92ac8cc
BB
76
77<a name="Blog+publish"></a>
78
79### blog.publish() ⇒ <code>Promise.&lt;undefined&gt;</code>
80Publishes the files to a static host.
81
82**Kind**: instance method of [<code>Blog</code>](#Blog)
83**Returns**: <code>Promise.&lt;undefined&gt;</code> - empty promise, returns no value
97b33932
RBR
84<a name="Blog+publishArchive"></a>
85
86### blog.publishArchive() ⇒ <code>Promise.&lt;undefined&gt;</code>
87Publishes the archive to a host using rsync. Currently assumes
88gemlog archive.
89
90**Kind**: instance method of [<code>Blog</code>](#Blog)
91**Returns**: <code>Promise.&lt;undefined&gt;</code> - empty promise, returns no value
92<a name="Blog+addRemote"></a>
93
94### blog.addRemote() ⇒ <code>Promise.&lt;undefined&gt;</code>
95Adds a remote
96
97**Kind**: instance method of [<code>Blog</code>](#Blog)
98**Returns**: <code>Promise.&lt;undefined&gt;</code> - empty promise, returns no value
99<a name="Blog+removeRemote"></a>
100
101### blog.removeRemote() ⇒ <code>Promise.&lt;undefined&gt;</code>
102Removes a remote
103
104**Kind**: instance method of [<code>Blog</code>](#Blog)
105**Returns**: <code>Promise.&lt;undefined&gt;</code> - empty promise, returns no value
106<a name="Blog+syncDown"></a>
107
108### blog.syncDown() ⇒ <code>Promise.&lt;undefined&gt;</code>
109Pulls the posts and archive from the remote
110
111**Kind**: instance method of [<code>Blog</code>](#Blog)
112**Returns**: <code>Promise.&lt;undefined&gt;</code> - empty promise, returns no value
113<a name="Blog+syncUp"></a>
114
115### blog.syncUp() ⇒ <code>Promise.&lt;undefined&gt;</code>
116Pushes the posts and archive to the remote
117
118**Kind**: instance method of [<code>Blog</code>](#Blog)
119**Returns**: <code>Promise.&lt;undefined&gt;</code> - empty promise, returns no value
120<a name="HTMLGenerator"></a>
121
122## HTMLGenerator
123Generates the blog index page
124
125**Kind**: global variable
126
127| Param | Type | Description |
128| --- | --- | --- |
129| source | <code>string</code> | the source directory |
130| target | <code>string</code> | the target directory |
131| posts | <code>Array.&lt;Blog.tPost&gt;</code> | the list of posts |
132
133<a name="RSSGenerator"></a>
134
135## RSSGenerator
136Generates an RSS feed XML file
137
138**Kind**: global variable
139
140| Param | Type | Description |
141| --- | --- | --- |
142| source | <code>string</code> | the source directory |
143| target | <code>string</code> | the target directory |
144| posts | <code>Array.&lt;Blog.tPost&gt;</code> | the list of posts |
145
146<a name="StaticGenerator"></a>
147
148## StaticGenerator
149Generates the static assets required for the blog
150
151**Kind**: global variable
152
153| Param | Type | Description |
154| --- | --- | --- |
155| source | <code>string</code> | the source directory |
156| target | <code>string</code> | the target directory |
157| posts | <code>Array.&lt;Blog.tPost&gt;</code> | the list of posts |
158
159<a name="TXTGenerator"></a>
160
161## TXTGenerator
162Generates a TXT version of the blog
163
164**Kind**: global variable
165
166| Param | Type | Description |
167| --- | --- | --- |
168| source | <code>string</code> | the source directory |
169| target | <code>string</code> | the target directory |
170| posts | <code>Array.&lt;Blog.tPost&gt;</code> | the list of posts |
171