aboutsummaryrefslogtreecommitdiff
path: root/docs/posts/static_sites_with_bash
diff options
context:
space:
mode:
Diffstat (limited to 'docs/posts/static_sites_with_bash')
-rw-r--r--docs/posts/static_sites_with_bash/index.html37
1 files changed, 25 insertions, 12 deletions
diff --git a/docs/posts/static_sites_with_bash/index.html b/docs/posts/static_sites_with_bash/index.html
index 0605147..ed9de53 100644
--- a/docs/posts/static_sites_with_bash/index.html
+++ b/docs/posts/static_sites_with_bash/index.html
@@ -13,14 +13,20 @@
13 <body> 13 <body>
14 <div class="posts"> 14 <div class="posts">
15 <div class="post"> 15 <div class="post">
16 <a href="/" class="post-end-link">⟵ Back</a>
17 <div class="separator"></div>
16 <div class="date"> 18 <div class="date">
17 23/11 2019 19 23/11 2019
18 <span class="commit-hash"> 20 <div class="stats">
19 <a href="https://github.com/nerdypepper/site/blob/master/posts/static_sites_with_bash.md 21 <span class="stats-number">
20" style="text-decoration: none"> 22 21.17
21 d1faa7e 23 </span>
22 </a> 24 <span class="stats-unit">cm</span>
23 </span> 25 <span class="stats-number">
26 1.5
27 </span>
28 <span class="stats-unit">min</span>
29 </div>
24 </div> 30 </div>
25 <span class="post-title"> 31 <span class="post-title">
26 Static Sites With Bash 32 Static Sites With Bash
@@ -33,10 +39,14 @@
33my own. If you are more of the &#8216;show me the code&#8217; kinda guy, 39my own. If you are more of the &#8216;show me the code&#8217; kinda guy,
34<a href="https://github.com/nerdypepper/site">here</a> you go.</p> 40<a href="https://github.com/nerdypepper/site">here</a> you go.</p>
35 41
36<p><strong>Text formatting</strong>: I chose to write in markdown, and convert 42<h3 id="Text%20formatting">Text formatting</h3>
43
44<p>I chose to write in markdown, and convert
37to html with <a href="https://kristaps.bsd.lv/lowdown/">lowdown</a>.</p> 45to html with <a href="https://kristaps.bsd.lv/lowdown/">lowdown</a>.</p>
38 46
39<p><strong>Directory structure</strong>: I host my site on GitHub pages, so 47<h3 id="Directory%20structure">Directory structure</h3>
48
49<p>I host my site on GitHub pages, so
40<code>docs/</code> has to be the entry point. Markdown formatted posts 50<code>docs/</code> has to be the entry point. Markdown formatted posts
41go into <code>posts/</code>, get converted into html, and end up in 51go into <code>posts/</code>, get converted into html, and end up in
42<code>docs/index.html</code>, something like this:</p> 52<code>docs/index.html</code>, something like this:</p>
@@ -51,7 +61,9 @@ for f in $posts; do
51done 61done
52</code></pre> 62</code></pre>
53 63
54<p><strong>Assets</strong>: Most static site generators recommend dropping image 64<h3 id="Assets">Assets</h3>
65
66<p>Most static site generators recommend dropping image
55assets into the site source itself. That does have it&#8217;s 67assets into the site source itself. That does have it&#8217;s
56merits, but I prefer hosting images separately:</p> 68merits, but I prefer hosting images separately:</p>
57 69
@@ -67,8 +79,9 @@ scp -P 443 &quot;$1&quot; emerald:files/&quot;$id&quot;
67echo &quot;https://files.nerdypepper.tech/$id&quot; 79echo &quot;https://files.nerdypepper.tech/$id&quot;
68</code></pre> 80</code></pre>
69 81
70<p><strong>Templating</strong>: 82<h3 id="Templating">Templating</h3>
71<a href="https://github.com/NerdyPepper/site/blob/master/generate.sh"><code>generate.sh</code></a> 83
84<p><a href="https://github.com/NerdyPepper/site/blob/master/generate.sh"><code>generate.sh</code></a>
72brings the above bits and pieces together (with some extra 85brings the above bits and pieces together (with some extra
73cruft to avoid javascript). It uses <code>sed</code> to produce nice 86cruft to avoid javascript). It uses <code>sed</code> to produce nice
74titles from the file names (removes underscores, 87titles from the file names (removes underscores,
@@ -76,8 +89,8 @@ title-case), and <code>date(1)</code> to add the date to each post
76listing!</p> 89listing!</p>
77 90
78 </div> 91 </div>
79 <a href="/" class="post-end-link">⟵ Back</a>
80 <div class="separator"></div> 92 <div class="separator"></div>
93 <a href="/" class="post-end-link">⟵ Back</a>
81 </div> 94 </div>
82 </div> 95 </div>
83 </body> 96 </body>