From 7624df0688ebc50715d44ff87897845f8872dad5 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 26 Jan 2020 12:00:37 +0530 Subject: gen --- docs/posts/static_sites_with_bash/index.html | 37 +++++++++++++++++++--------- 1 file changed, 25 insertions(+), 12 deletions(-) (limited to 'docs/posts/static_sites_with_bash') 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 @@
+ ⟵ Back +
23/11 2019 - - - d1faa7e - - +
+ + 21.17 + + cm + + 1.5 + + min +
Static Sites With Bash @@ -33,10 +39,14 @@ my own. If you are more of the ‘show me the code’ kinda guy, here you go.

-

Text formatting: I chose to write in markdown, and convert +

Text formatting

+ +

I chose to write in markdown, and convert to html with lowdown.

-

Directory structure: I host my site on GitHub pages, so +

Directory structure

+ +

I host my site on GitHub pages, so docs/ has to be the entry point. Markdown formatted posts go into posts/, get converted into html, and end up in docs/index.html, something like this:

@@ -51,7 +61,9 @@ for f in $posts; do done -

Assets: Most static site generators recommend dropping image +

Assets

+ +

Most static site generators recommend dropping image assets into the site source itself. That does have it’s merits, but I prefer hosting images separately:

@@ -67,8 +79,9 @@ scp -P 443 "$1" emerald:files/"$id" echo "https://files.nerdypepper.tech/$id" -

Templating: -generate.sh +

Templating

+ +

generate.sh brings the above bits and pieces together (with some extra cruft to avoid javascript). It uses sed to produce nice titles from the file names (removes underscores, @@ -76,8 +89,8 @@ title-case), and date(1) to add the date to each post listing!

- ⟵ Back
+ ⟵ Back
-- cgit v1.2.3