aboutsummaryrefslogtreecommitdiffstats
path: root/man/blogc-make.1.ronn
blob: 43778c794762a1b3152db85cd93b253a877a9eab (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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
blogc-make(1) -- a simple build tool for blogc
==============================================

## SYNOPSIS

`blogc-make` [`-V`] [`-f` <FILE>] [<RULE> ...]<br>
`blogc-make` [`-h`|`-v`]

## DESCRIPTION

**blogc-make** is a simple build tool for blogc websites. It reads a blogcfile(5)
and generates the output files using blogc(1) and some predefined rules, that are
useful enough for most common use cases.

See blogcfile(5) for details on the file format.

## OPTIONS

  * `-D`:
    Builds for development environment. This option is useful to load local,
    non-optimized assets for development purposes. It adds two global
    variables to all blogc(1) calls: `MAKE_ENV_DEV=1` and `MAKE_ENV=dev`.

  * `-V`:
    Activates verbose mode, that will give more details of commands runs.

  * `-f` <FILE>:
    Reads <FILE> as `blogcfile`.

  * `-v`:
    Show program name, version and exit.

  * `-h`:
    Show help message and exit.

## HELPER RULES

### all

Run all build rules. This is the default rule.

### clean

Clean built files and empty directories in output directory.

### runserver

Run `blogc-runserver(1)` (if available) pointing to output directory, watching
for changes in the source files and rebuilding as needed. This rule accepts
some arguments, in the following format:

    runserver:host=127.0.0.1,port=8080,threads=20

The values in the example are the default values. Rebuilds are done by running
`blogc-make all` internally.

### watch

Watch for changes in the source files, rebuilding as needed.

Rebuilds are done by running `blogc-make all` internally.

### atom_dump

Dump default Atom feed template based on current blogcfile(5) settings.

The template is dumped to the standard output, and can be used as a base
for customized Atom feed templates.

## BUILD RULES

### index

Build website index from posts.

The rule passes the following helper variables to blogc(1):

  * `MAKE_RULE`:
    `index`
  * `MAKE_TYPE`:
    `post`

### atom

Build main atom feed from posts.

The rule passes the following helper variables to blogc(1):

  * `MAKE_RULE`:
    `atom`
  * `MAKE_TYPE`:
    `atom`

### atom_tags

Build atom feeds for each tag from posts.

The rule passes the following helper variables to blogc(1):

  * `MAKE_RULE`:
    `atom_tags`
  * `MAKE_TYPE`:
    `atom`

### pagination

Build pagination pages from posts. This rule is disabled if `posts_per_page`
value in blogcfile(5) is negative or `0`.

The rule passes the following helper variables to blogc(1):

  * `MAKE_RULE`:
    `pagination`
  * `MAKE_TYPE`:
    `post`

### posts

Build individual pages for each post.

The rule passes the following helper variables to blogc(1):

  * `MAKE_RULE`:
    `posts`
  * `MAKE_TYPE`:
    `post`
  * `MAKE_SLUG`:
    The slug of the post being built, as provided in blogcfile

### tags

Build post listings for each tag from posts.

The rule passes the following helper variables to blogc(1):

  * `MAKE_RULE`:
    `tags`
  * `MAKE_TYPE`:
    `post`

### pages

Build individual pages for each page.

The rule passes the following helper variables to blogc(1):

  * `MAKE_RULE`:
    `pages`
  * `MAKE_TYPE`:
    `page`
  * `MAKE_SLUG`:
    The slug of the page being built, as provided in blogcfile

### copy

Copy static files from source directory to output directory.

## FILES

The `blogc-make` command expects a settings file, called `blogcfile` by default,
or any other file passed to `-f` option. `blogcfile` must have valid UTF-8 content.

The `blogc-make` command will read any files listed on `blogcfile`, and may write
files to the configured output directory.

## ENVIRONMENT

  * `BLOGC`:
    Path to `blogc(1)` binary. If not provided, the `blogc` binary in `$PATH` will
    be used.

  * `BLOGC_RUNSERVER`:
    Path to `blogc-runserver(1)` binary. If not provided, the `blogc-runserver`
    binary in `$PATH` will be used, if available.

  * `OUTPUT_DIR`:
    Path to the directory where `blogc-make` should write (or instruct blogc(1) to
    write) output files.

Any other environment variables are inherited by blogc(1) and blogc-runserver(1),
when called by `blogc-make`.

## EXAMPLES

Build all files:

    $ blogc-make

or

    $ blogc-make all

Clean built files:

    $ blogc-make clean

## BUGS

Please report any issues to: <https://github.com/blogc/blogc>

## AUTHOR

Rafael G. Martins &lt;<rafael@rafaelmartins.eng.br>&gt;

## SEE ALSO

blogc(1), blogc-runserver(1), blogcfile(5)