|
2 | 2 |
|
3 | 3 | 
|
4 | 4 |
|
5 |
| -TL;DR: A template to build static websites with [Pandoc](https://pandoc.org/), [Github Actions](http://github.com/actions) & [Github Pages](https://pages.github.com/). |
| 5 | +A template to build static websites with [Pandoc](https://pandoc.org/) & [Github Actions](http://github.com/actions). |
6 | 6 |
|
7 | 7 | ## Use
|
8 | 8 |
|
9 |
| -`bin/build` walks a source directory, invokes a Pandoc command for each target file, and copies assets to a destination folder. |
| 9 | +### `build` |
| 10 | + |
| 11 | +`bin/build` walks the source directory, invokes Pandoc on each file, and copies assets to a destination folder. |
10 | 12 |
|
11 | 13 | This tool is configurable by environment variables.
|
12 | 14 |
|
13 |
| -| Variable | Description | Default | |
14 |
| -|-----------|-----------------------------------------------------|-------------------------------------------------------| |
15 |
| -| `SRC` | Root directory of input sources. | `src/` | |
16 |
| -| `DST` | Root directory for generated output. | `public/` | |
17 |
| -| `STATIC` | Directory for static assets. | `$SRC/static` | |
18 |
| -| `SRC_EXT` | Input sources file extension. | `md` | |
19 |
| -| `DST_EXT` | Output generation file extension. | `html` | |
20 |
| -| `HEADER` | path/to/header.html (`--include-before-body`). | `$SRC/header.html` | |
21 |
| -| `FOOTER` | path/to/footer.html (`--include-after-body`). | `$SRC/footer.html` | |
22 |
| -| `CSS` | path/to/style.css embedded in header of a web page. | `/main.css` | |
| 15 | +| Variable | Description | Default | |
| 16 | +|-----------|-----------------------------------------------------|--------------------| |
| 17 | +| `SRC` | Root directory of input sources. | `src/` | |
| 18 | +| `DST` | Root directory for generated output. | `public/` | |
| 19 | +| `STATIC` | Directory for static assets. | `$SRC/static` | |
| 20 | +| `SRC_EXT` | Input sources file extension. | `md` | |
| 21 | +| `DST_EXT` | Output generation file extension. | `html` | |
| 22 | +| `HEADER` | path/to/header.html (`--include-before-body`). | `$SRC/header.html` | |
| 23 | +| `FOOTER` | path/to/footer.html (`--include-after-body`). | `$SRC/footer.html` | |
| 24 | +| `CSS` | path/to/style.css embedded in header of a web page. | `/main.css` | |
23 | 25 | | `PANOPTS` | Arguments to pass to Pandoc for each input file. | `--css $CSS --email-obfuscation=javascript --metadata-file=defaults.yml -f markdown_github+yaml_metadata_block -t html5 -B $HEADER -A $FOOTER` |
|
24 | 26 |
|
25 | 27 | The defaults of this script are oriented for creating static websites. However, the configuration is general enough to
|
26 |
| -support a wide variety of tasks; for instance, generating a CV or a slide deck. |
| 28 | +support a wide variety of tasks; for instance, generating a CV or a slide deck. See [these examples](https://pandoc.org/demos.html) |
| 29 | +for more inspiration. |
| 30 | + |
| 31 | + |
| 32 | +### `watch` |
| 33 | + |
| 34 | +`bin/watch` will watch the source directory. On any changes, it will invoke the build script. |
| 35 | + |
| 36 | + |
| 37 | +### Deployment |
| 38 | + |
| 39 | +This template will publish the static site to [Github Pages](https://pages.github.com) via [Github Actions](http://github.com/actions). |
27 | 40 |
|
28 |
| -We use Github Actions and Github Pages to automatically update the website on source changes. Should this template |
29 |
| -be used beyond websites, the build script can be tuned setting CI environment variables. |
30 | 41 |
|
31 | 42 | ## Thanks to
|
32 | 43 |
|
|
0 commit comments