From 6e4c4a70a77487a92438e9f1a89d06907682beb4 Mon Sep 17 00:00:00 2001 From: martinbydefault Date: Thu, 3 Aug 2017 00:44:21 -0300 Subject: [PATCH 1/2] added prompt to choose title, tag is added to allowed-tags --- createtag | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/createtag b/createtag index 1ec23dd..4766b6e 100644 --- a/createtag +++ b/createtag @@ -22,10 +22,12 @@ if [ -d "${TAGDIR}" ]; then echo "Creating tag(s) for ${tags}" for tag in ${tags}; do + echo "Title for $tag:" + read title # Cannot indent here string. cat <"${TAGDIR}/tag_${tag}.md" --- -title: "${tag} Posts" +title: "${title}" tagName: ${tag} search: exclude permalink: tag_${tag}.html @@ -39,6 +41,8 @@ folder: tags {% include links.html %} EOF +echo " - ${tag}" >> _data/tags.yml + done else From 4fd2bca45049887c671f427b49af7dca245ccbb4 Mon Sep 17 00:00:00 2001 From: martinbydefault Date: Thu, 3 Aug 2017 01:01:40 -0300 Subject: [PATCH 2/2] added a note when using the createtag script --- _data/tags.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/_data/tags.yml b/_data/tags.yml index af48a82..79d2545 100644 --- a/_data/tags.yml +++ b/_data/tags.yml @@ -1,3 +1,6 @@ +# Note: +# If you are using the createtag script, don't leave an blank line at the end of this file. +# In other words, the last line must be the last tag in the allowed-tags list. allowed-tags: - getting_started - content_types @@ -9,4 +12,4 @@ allowed-tags: - collaboration - news - troubleshooting - - mobile \ No newline at end of file + - mobile