fix typo, improve wording of some comments - static-site-scripts - static site … | |
git clone git://git.codemadness.org/static-site-scripts | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 9cdec7ec0bba8b1205aacd9cd1b9c1c3b87fde98 | |
parent f227e539940c89763e5eefa2ab6abc599269d6bb | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Sat, 24 May 2014 12:54:25 +0200 | |
fix typo, improve wording of some comments | |
Signed-off-by: Hiltjo Posthuma <[email protected]> | |
Diffstat: | |
M generate.sh | 22 +++++++++++++--------- | |
1 file changed, 13 insertions(+), 9 deletions(-) | |
--- | |
diff --git a/generate.sh b/generate.sh | |
@@ -13,13 +13,13 @@ siteurlfull="${sitedomain}${siteurlrel}" | |
sitekeywords="blog, suckless, dwm-hiltjo" | |
# site description (global default). | |
sitedescription="blog with various projects and articles about computer-relate… | |
-# sitem mail used for contact "mail link". | |
+# site mail used for contact "mail link". | |
sitemail="hiltjo@[email protected]" | |
# site author (global). | |
siteauthor="hiltjo" | |
# site last updated (default use date when script was run). | |
siteupdated=$(date "+%Y-%m-%dT%H:%M:%SZ") | |
-# Directories containing content and metadata. | |
+# directories containing content and metadata. | |
# NOTE: it's recommended to use absolute paths here, use "." for current direc… | |
pagesdir="pages" | |
# Output dir. | |
@@ -168,7 +168,9 @@ fi | |
# try to make output dir. | |
mkdir -p "${outputdir}" | |
-> "${outputdir}/urllist.txt" # truncate urllist.txt (sitemap). | |
+# truncate urllist.txt (sitemap). | |
+> "${outputdir}/urllist.txt" | |
+# content for RSS, Atom sitemap and index, this is appended as a string. | |
contentindex="" | |
contentrss="" | |
contentatom="" | |
@@ -186,7 +188,8 @@ while read -r meta; do | |
)" | |
# RSS item: append. | |
- # NOTE: GMT is hard-coded since %z is not consistent, change according… | |
+ # NOTE: GMT timezone is hard-coded because %z is not consistent, | |
+ # change accordingly. | |
contentrsspubdate=$(date "+%a, %d %b %Y %H:%M:%S GMT" -d "${timeupdate… | |
contentrss="${contentrss}$( | |
cat <<!__EOF__ | |
@@ -224,7 +227,8 @@ while read -r meta; do | |
# sitemap: sitemap.xml, append item. | |
contentsitemap="${contentsitemap}<url><loc>${urlfull}</loc></url>" | |
- # sitemap: urllist.txt, append item, write directly to file. | |
+ # sitemap: urllist.txt, append item, write directly to file, because | |
+ # this is just a plain-text list. | |
printf '%s\n' "${urlfull}" >> "${outputdir}/urllist.txt" | |
done <<!FILELIST | |
$(find "${pagesdir}" -type f -name "*.sh" | sort -rn) | |
@@ -234,7 +238,7 @@ $(find "${pagesdir}" -type f -name "*.sh" | sort -rn) | |
# in the scope after the while loop (subshell / pipes prevents this in a | |
# standard manner). | |
-# index page. | |
+# index HTML page (index.html). | |
pagereset | |
title="Posts" | |
(pageheader | |
@@ -246,7 +250,7 @@ cat <<!__EOF__ | |
!__EOF__ | |
pagefooter) > "${outputdir}/index.html" | |
-# RSS | |
+# RSS feed (rss.xml). | |
cat <<!__EOF__ > "${outputdir}/rss.xml" | |
<?xml version="1.0" encoding="UTF-8"?> | |
<rss version="2.0"> | |
@@ -260,7 +264,7 @@ cat <<!__EOF__ > "${outputdir}/rss.xml" | |
</rss> | |
!__EOF__ | |
-# Atom | |
+# Atom feed (atom.xml). | |
cat <<!__EOF__ > "${outputdir}/atom.xml" | |
<?xml version="1.0" encoding="UTF-8"?> | |
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="${sitelang}"> | |
@@ -274,7 +278,7 @@ cat <<!__EOF__ > "${outputdir}/atom.xml" | |
</feed> | |
!__EOF__ | |
-# sitemap: sitemap.xml | |
+# sitemap (sitemap.xml). | |
cat <<!__EOF__ > "${outputdir}/sitemap.xml" | |
<?xml version="1.0" encoding="UTF-8"?><urlset>${contentsitemap}</urlset> | |
!__EOF__ |