diff options
author | Dave Kerr <dwmkerr@gmail.com> | 2020-06-10 13:54:31 +0800 |
---|---|---|
committer | Dave Kerr <dwmkerr@gmail.com> | 2020-06-10 13:54:31 +0800 |
commit | abd0df9699e8ac17441ae00559c25b8f7fd50dc8 (patch) | |
tree | e66bef877a85f88e9dfe172dc56c46fc3582c151 | |
parent | f51990e911748e13f1a67e77d49151d1a6748dbb (diff) |
chore: build the frontmatter programmatically
-rw-r--r-- | README.md | 6 | ||||
-rwxr-xr-x | assets/ebook.sh | 13 |
2 files changed, 11 insertions, 8 deletions
@@ -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. |