aboutsummaryrefslogtreecommitdiff
path: root/doc/README.md
blob: 988e0e7ae6c79e0160fe7d799087c095da020fa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
## Classes

<dl>
<dt><a href="#Blog">Blog</a></dt>
<dd></dd>
</dl>

## Members

<dl>
<dt><a href="#HTMLGenerator">HTMLGenerator</a></dt>
<dd><p>Generates the blog index page</p>
</dd>
<dt><a href="#RSSGenerator">RSSGenerator</a></dt>
<dd><p>Generates an RSS feed XML file</p>
</dd>
<dt><a href="#StaticGenerator">StaticGenerator</a></dt>
<dd><p>Generates the static assets required for the blog</p>
</dd>
<dt><a href="#TXTGenerator">TXTGenerator</a></dt>
<dd><p>Generates a TXT version of the blog</p>
</dd>
</dl>

<a name="Blog"></a>

## Blog
**Kind**: global class  

* [Blog](#Blog)
    * [new Blog(config)](#new_Blog_new)
    * [.add(postLocation)](#Blog+add) ⇒ <code>Promise.&lt;undefined&gt;</code>
    * [.update(postLocation)](#Blog+update) ⇒ <code>Promise.&lt;undefined&gt;</code>
    * [.publish()](#Blog+publish) ⇒ <code>Promise.&lt;undefined&gt;</code>
    * [.publishArchive()](#Blog+publishArchive) ⇒ <code>Promise.&lt;undefined&gt;</code>
    * [.addRemote()](#Blog+addRemote) ⇒ <code>Promise.&lt;undefined&gt;</code>
    * [.removeRemote()](#Blog+removeRemote) ⇒ <code>Promise.&lt;undefined&gt;</code>
    * [.syncDown()](#Blog+syncDown) ⇒ <code>Promise.&lt;undefined&gt;</code>
    * [.syncUp()](#Blog+syncUp) ⇒ <code>Promise.&lt;undefined&gt;</code>

<a name="new_Blog_new"></a>

### new Blog(config)
The Blog class is the blog generator, it's in charge of adding and
updating posts, and handling the publishing.


| Param | Type | Description |
| --- | --- | --- |
| config | <code>Blog.tConfiguration</code> | the initialization options to extend the instance |

<a name="Blog+add"></a>

### blog.add(postLocation) ⇒ <code>Promise.&lt;undefined&gt;</code>
Shifts the blog posts, adds the passed file to slot 0, and
generates files.

**Kind**: instance method of [<code>Blog</code>](#Blog)  
**Returns**: <code>Promise.&lt;undefined&gt;</code> - empty promise, returns no value  

| Param | Type | Description |
| --- | --- | --- |
| postLocation | <code>string</code> | the path to the blog post file |

<a name="Blog+update"></a>

### blog.update(postLocation) ⇒ <code>Promise.&lt;undefined&gt;</code>
Update slot 0 with the passed gmi file, and generates files.

**Kind**: instance method of [<code>Blog</code>](#Blog)  
**Returns**: <code>Promise.&lt;undefined&gt;</code> - empty promise, returns no value  

| Param | Type | Description |
| --- | --- | --- |
| postLocation | <code>string</code> | the path to the blog post file |

<a name="Blog+publish"></a>

### blog.publish() ⇒ <code>Promise.&lt;undefined&gt;</code>
Publishes the files to a static host.

**Kind**: instance method of [<code>Blog</code>](#Blog)  
**Returns**: <code>Promise.&lt;undefined&gt;</code> - empty promise, returns no value  
<a name="Blog+publishArchive"></a>

### blog.publishArchive() ⇒ <code>Promise.&lt;undefined&gt;</code>
Publishes the archive to a host using rsync. Currently assumes
gemlog archive.

**Kind**: instance method of [<code>Blog</code>](#Blog)  
**Returns**: <code>Promise.&lt;undefined&gt;</code> - empty promise, returns no value  
<a name="Blog+addRemote"></a>

### blog.addRemote() ⇒ <code>Promise.&lt;undefined&gt;</code>
Adds a remote

**Kind**: instance method of [<code>Blog</code>](#Blog)  
**Returns**: <code>Promise.&lt;undefined&gt;</code> - empty promise, returns no value  
<a name="Blog+removeRemote"></a>

### blog.removeRemote() ⇒ <code>Promise.&lt;undefined&gt;</code>
Removes a remote

**Kind**: instance method of [<code>Blog</code>](#Blog)  
**Returns**: <code>Promise.&lt;undefined&gt;</code> - empty promise, returns no value  
<a name="Blog+syncDown"></a>

### blog.syncDown() ⇒ <code>Promise.&lt;undefined&gt;</code>
Pulls the posts and archive from the remote

**Kind**: instance method of [<code>Blog</code>](#Blog)  
**Returns**: <code>Promise.&lt;undefined&gt;</code> - empty promise, returns no value  
<a name="Blog+syncUp"></a>

### blog.syncUp() ⇒ <code>Promise.&lt;undefined&gt;</code>
Pushes the posts and archive to the remote

**Kind**: instance method of [<code>Blog</code>](#Blog)  
**Returns**: <code>Promise.&lt;undefined&gt;</code> - empty promise, returns no value  
<a name="HTMLGenerator"></a>

## HTMLGenerator
Generates the blog index page

**Kind**: global variable  

| Param | Type | Description |
| --- | --- | --- |
| source | <code>string</code> | the source directory |
| target | <code>string</code> | the target directory |
| posts | <code>Array.&lt;Blog.tPost&gt;</code> | the list of posts |

<a name="RSSGenerator"></a>

## RSSGenerator
Generates an RSS feed XML file

**Kind**: global variable  

| Param | Type | Description |
| --- | --- | --- |
| source | <code>string</code> | the source directory |
| target | <code>string</code> | the target directory |
| posts | <code>Array.&lt;Blog.tPost&gt;</code> | the list of posts |

<a name="StaticGenerator"></a>

## StaticGenerator
Generates the static assets required for the blog

**Kind**: global variable  

| Param | Type | Description |
| --- | --- | --- |
| source | <code>string</code> | the source directory |
| target | <code>string</code> | the target directory |
| posts | <code>Array.&lt;Blog.tPost&gt;</code> | the list of posts |

<a name="TXTGenerator"></a>

## TXTGenerator
Generates a TXT version of the blog

**Kind**: global variable  

| Param | Type | Description |
| --- | --- | --- |
| source | <code>string</code> | the source directory |
| target | <code>string</code> | the target directory |
| posts | <code>Array.&lt;Blog.tPost&gt;</code> | the list of posts |