diff options
author | Cem Keylan <cem@ckyln.com> | 2020-08-03 23:36:01 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-08-03 23:36:01 +0300 |
commit | f0b208e0d7875ba91b9733b30d73b0ac20c10070 (patch) | |
tree | 7a38f6112349c859632b5fe5673db3ced66a137a /build | |
parent | ec7e9e3183492bcd18d06c02b90930f6a837c6b5 (diff) | |
download | website-f0b208e0d7875ba91b9733b30d73b0ac20c10070.tar.gz |
update
Diffstat (limited to 'build')
-rwxr-xr-x | build | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -72,7 +72,7 @@ blog_index() { printf '* %s - [%s](%s)\n' \ "$(date --date="$postdate" +%b\ %d\ %Y)" \ "$(gettitle "$post")" \ - "$(printf "$post" | sed 's#src/blog/##;s/.md/.html/')" + "${postdate}.html" done >> src/blog/index.md } @@ -90,6 +90,16 @@ site_index() { done } +docs_index() ( + cp templates/docs-index src/docs.md + find src/docs ! -name .git ! -name README | sort | while read -r file; do + case "$file" in src/docs) continue; esac + [ -d "$file" ] && printf '### %s\n' "${file#src/docs/}" && continue + filedest=${file#src} filedest=${filedest%.*}.html + printf '[%s](%s)\n' "$(gettitle "$file")" "$filedest" + done >> src/docs.md +) + genrss() { find "$1" -type f ! -name index.md | sort -r | while read -r post ; do postdate="${post##*/}" ; postdate="${postdate%.*}" @@ -118,7 +128,7 @@ main() { rm -rf docs; mkdir -p docs # Generate the indexes for blog and the wiki - site_index; blog_index + site_index; blog_index; docs_index # Generate rss feeds genrss index news index.html > src/news.xml |