summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Kerr <dwmkerr@gmail.com>2020-06-10 13:54:31 +0800
committerDave Kerr <dwmkerr@gmail.com>2020-06-10 13:54:31 +0800
commitabd0df9699e8ac17441ae00559c25b8f7fd50dc8 (patch)
treee66bef877a85f88e9dfe172dc56c46fc3582c151
parentf51990e911748e13f1a67e77d49151d1a6748dbb (diff)
chore: build the frontmatter programmatically
-rw-r--r--README.md6
-rwxr-xr-xassets/ebook.sh13
2 files changed, 11 insertions, 8 deletions
diff --git a/README.md b/README.md
index cfcfdbc..aa0932a 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,3 @@
----
-title: "Hacker Laws"
-author: "Dave Kerr, github.com/dwmkerr/hacker-laws"
-subtitle: "Laws, Theories, Principles and Patterns that developers will find useful."
----
-
# 💻📖 hacker-laws
Laws, Theories, Principles and Patterns that developers will find useful.
diff --git a/assets/ebook.sh b/assets/ebook.sh
index f2c9799..18c25fd 100755
--- a/assets/ebook.sh
+++ b/assets/ebook.sh
@@ -6,8 +6,17 @@
# brew install
# brew cask install basictex
-# First, we need to make a copy of the README, which we will modify slighty.
-cp README.md hacker-laws.md
+# Create the frontmatter.
+cat << EOF > frontmatter.md
+---
+title: "Hacker Laws"
+author: "Dave Kerr, github.com/dwmkerr/hacker-laws"
+subtitle: "Laws, Theories, Principles and Patterns that developers will find useful."
+---
+EOF
+
+# Combine the frontmatter and the laws.
+cat frontmatter.md README.md >> hacker-laws.md
# Remove the title - we have it in the front-matter of the doc, so it will
# automatically be added to the PDF.