markdowns index.html
authorDaniel <thefekete@gmail.com>
Tue, 23 Jun 2020 15:06:38 +0000 (17:06 +0200)
committerDaniel <thefekete@gmail.com>
Tue, 23 Jun 2020 15:06:38 +0000 (17:06 +0200)
Makefile
inc/head.template
index.html [deleted file]
index.md [new file with mode: 0644]

index 9e69204..54734c1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,12 @@
 # markdown sources
 posts=$(patsubst %.md,build/%.html,$(wildcard blog/*.md))
 # static sources
-S=index.html img/
+S=img/
 
-all: blog $S $(posts)
+all: build/index.html blog $S
        cp -av $S build/
 
-blog: build/blog/
+blog: build/blog/ $(posts)
 
 build/:
        mkdir -p $@
@@ -14,7 +14,12 @@ build/:
 build/blog/: build/
        mkdir -p $@
 
-build/blog/%.html: blog/%.md build/
+build/index.html: index.md build/ inc/head.template inc/foot.template
+       sed "s/__TITLE__/thefekete.net/; /__DATE__/d" inc/head.template >$@
+       markdown index.md >>$@
+       cat inc/foot.template >>$@
+
+build/blog/%.html: blog/%.md build/ inc/head.template inc/foot.template
        @# `pacman -S discount` for `markdown`
        bin/blog.awk $< >$@
 
index d7f46b1..0bc6be7 100644 (file)
@@ -20,8 +20,7 @@
         <a href="https://thingiverse.com/thefekete">Thingiverse</a>
       </nav>
       <div style="clear: both"></div>
-      <p style="float: right"><small>__DATE__</small></p>
-      <div style="clear: both"></div>
+      <p style="float: right"><small>__DATE__</small></p><div style="clear: both"></div> <!-- one line so we can delete it if we want -->
       <h1>__TITLE__</h1>
     </header>
 
diff --git a/index.html b/index.html
deleted file mode 100644 (file)
index 05c4a80..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="utf-8">
-    <title>thefekete.net</title>
-    <!-- <link rel="stylesheet" href="style.css"> -->
-    <!-- <script src="script.js"></script> -->
-  </head>
-  <body>
-    <nav style="float: right">
-      <a href="https://thefekete.net">thefekete.net</a> |
-      <a href="https://thefekete.net/blog">Blog</a> |
-      <a href="https://git.thefekete.net">Git</a> |
-      <a href="https://www.youtube.com/user/thefekete">YouTube</a> |
-      <a href="https://gitlab.com/thefekete">GitLab</a> |
-      <a href="https://github.com/thefekete">GitHub</a> |
-      <a href="https://thingiverse.com/thefekete">Thingiverse</a>
-    </nav>
-    <div style="clear: both"></div>
-
-    <h1>thefekete.net</h1>
-    <img src="img/trogdor.png" alt="The burninator" />
-    <p>This is the first sentence.</p>
-    <p><small>
-      Special thanks to <a href="http://lukesmith.xyz">Luke Smith</a> for the
-      last little kick to finally get my site back up after more than
-      <a href="https://web.archive.org/web/20121029100909/http://thefekete.net/">
-        8 years of down time
-      </a>.
-    </small></p>
-  </body>
-</html>
\ No newline at end of file
diff --git a/index.md b/index.md
new file mode 100644 (file)
index 0000000..5fee029
--- /dev/null
+++ b/index.md
@@ -0,0 +1,7 @@
+![Trogdor](img/trogdor.png)
+
+This is the first sentence.
+
+Special thanks to [Luke Smith](http://lukesmith.xyz) for the
+last little kick to finally get my site back up after more than
+[8 years of down time](https://web.archive.org/web/20121029100909/http://thefekete.net/)