diff options
Diffstat (limited to 'posts')
-rw-r--r-- | posts/static_sites_with_bash.md | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/posts/static_sites_with_bash.md b/posts/static_sites_with_bash.md index d87cefd..2a1cc92 100644 --- a/posts/static_sites_with_bash.md +++ b/posts/static_sites_with_bash.md | |||
@@ -5,10 +5,12 @@ After going through a bunch of static site generators | |||
5 | my own. If you are more of the 'show me the code' kinda guy, | 5 | my own. If you are more of the 'show me the code' kinda guy, |
6 | [here](https://github.com/nerdypepper/site) you go. | 6 | [here](https://github.com/nerdypepper/site) you go. |
7 | 7 | ||
8 | **Text formatting**: I chose to write in markdown, and convert | 8 | ### Text formatting |
9 | I chose to write in markdown, and convert | ||
9 | to html with [lowdown](https://kristaps.bsd.lv/lowdown/). | 10 | to html with [lowdown](https://kristaps.bsd.lv/lowdown/). |
10 | 11 | ||
11 | **Directory structure**: I host my site on GitHub pages, so | 12 | ### Directory structure |
13 | I host my site on GitHub pages, so | ||
12 | `docs/` has to be the entry point. Markdown formatted posts | 14 | `docs/` has to be the entry point. Markdown formatted posts |
13 | go into `posts/`, get converted into html, and end up in | 15 | go into `posts/`, get converted into html, and end up in |
14 | `docs/index.html`, something like this: | 16 | `docs/index.html`, something like this: |
@@ -24,7 +26,8 @@ for f in $posts; do | |||
24 | done | 26 | done |
25 | ``` | 27 | ``` |
26 | 28 | ||
27 | **Assets**: Most static site generators recommend dropping image | 29 | ### Assets |
30 | Most static site generators recommend dropping image | ||
28 | assets into the site source itself. That does have it's | 31 | assets into the site source itself. That does have it's |
29 | merits, but I prefer hosting images separately: | 32 | merits, but I prefer hosting images separately: |
30 | 33 | ||
@@ -41,7 +44,7 @@ scp -P 443 "$1" emerald:files/"$id" | |||
41 | echo "https://files.nerdypepper.tech/$id" | 44 | echo "https://files.nerdypepper.tech/$id" |
42 | ``` | 45 | ``` |
43 | 46 | ||
44 | **Templating**: | 47 | ### Templating |
45 | [`generate.sh`](https://github.com/NerdyPepper/site/blob/master/generate.sh) | 48 | [`generate.sh`](https://github.com/NerdyPepper/site/blob/master/generate.sh) |
46 | brings the above bits and pieces together (with some extra | 49 | brings the above bits and pieces together (with some extra |
47 | cruft to avoid javascript). It uses `sed` to produce nice | 50 | cruft to avoid javascript). It uses `sed` to produce nice |