From 70bcddf21067405f0912da48498b544b21f38c00 Mon Sep 17 00:00:00 2001 From: Amolith Date: Tue, 19 Sep 2023 14:27:59 -0400 Subject: [PATCH] Remove downloading posts as files because broken --- justfile | 97 ++++++++++---------- themes/secluded/layouts/_default/single.html | 1 - 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/justfile b/justfile index eb2bfbe..c34d34d 100644 --- a/justfile +++ b/justfile @@ -1,5 +1,6 @@ # Build everything then deploy -default: site (docs "pdf") (docs "epub") (docs "txt") images deploy +# default: site (docs "pdf") (docs "epub") (docs "txt") images deploy +default: site images deploy # Deploy website deploy: @@ -12,53 +13,53 @@ site: # Building website ... hugo --quiet -# Build documents of filetype ext -docs ext: - #!/usr/bin/env bash - - echo -e '\033[1m# Checking whether there are new {{uppercase(ext)}}s to generate ...\033[0m' - - export WEBROOT=public - - published=$(grep -ilr --include \*.md "draft: false" content) - - todo="" - - # Iterate through all non-drafts - for path in $published - do - filename=$(basename "$path") - name=$(echo "${filename%.*}") - # Check whether target doc is newer than Markdown file - if [ "$path" -nt "public/$name/$name.{{ext}}" ] - then - todo+="$path " - fi - done - - if [ -z "$todo" ] - then - echo "No {{uppercase(ext)}}s to generate" - exit 0 - else - for path in $todo - do - filename=$(basename "$path") - name=$(echo "${filename%.*}") - echo "Generating $name.{{ext}}" - - if [ "{{ext}}" == "pdf" ] - then - pandoc --quiet -f markdown -t pdf --lua-filter=pandoc_config/images.lua --pdf-engine=xelatex -V 'linkcolor:blue' --listings -H pandoc_config/styles.tex $path -o public/$name/$name.pdf - elif [ "{{ext}}" == "epub" ] - then - pandoc --quiet -f markdown -t epub3 --lua-filter=pandoc_config/images.lua --pdf-engine=xelatex -V 'linkcolor:blue' --listings -H pandoc_config/styles.tex $path -o public/$name/$name.epub - elif [ "{{ext}}" == "txt" ] - then - pandoc --quiet -f markdown -t plain --lua-filter=pandoc_config/images.lua $path -o public/$name/$name.txt - fi - done - fi +## Build documents of filetype ext +#docs ext: +# #!/usr/bin/env bash +# +# echo -e '\033[1m# Checking whether there are new {{uppercase(ext)}}s to generate ...\033[0m' +# +# export WEBROOT=public +# +# published=$(grep -ilr --include \*.md "draft: false" content) +# +# todo="" +# +# # Iterate through all non-drafts +# for path in $published +# do +# filename=$(basename "$path") +# name=$(echo "${filename%.*}") +# # Check whether target doc is newer than Markdown file +# if [ "$path" -nt "public/$name/$name.{{ext}}" ] +# then +# todo+="$path " +# fi +# done +# +# if [ -z "$todo" ] +# then +# echo "No {{uppercase(ext)}}s to generate" +# exit 0 +# else +# for path in $todo +# do +# filename=$(basename "$path") +# name=$(echo "${filename%.*}") +# echo "Generating $name.{{ext}}" +# +# if [ "{{ext}}" == "pdf" ] +# then +# pandoc --quiet -f markdown -t pdf --lua-filter=pandoc_config/images.lua --pdf-engine=xelatex -V 'linkcolor:blue' --listings -H pandoc_config/styles.tex $path -o public/$name/$name.pdf +# elif [ "{{ext}}" == "epub" ] +# then +# pandoc --quiet -f markdown -t epub3 --lua-filter=pandoc_config/images.lua --pdf-engine=xelatex -V 'linkcolor:blue' --listings -H pandoc_config/styles.tex $path -o public/$name/$name.epub +# elif [ "{{ext}}" == "txt" ] +# then +# pandoc --quiet -f markdown -t plain --lua-filter=pandoc_config/images.lua $path -o public/$name/$name.txt +# fi +# done +# fi # Generate cover images images: diff --git a/themes/secluded/layouts/_default/single.html b/themes/secluded/layouts/_default/single.html index 904d414..7b15aeb 100644 --- a/themes/secluded/layouts/_default/single.html +++ b/themes/secluded/layouts/_default/single.html @@ -4,7 +4,6 @@

{{ .Title | markdownify }}

Reading Time: {{ .ReadingTime }} minutes | Published: {{ dateFormat "2006-01-02" .Date }} | Last Edited: {{ dateFormat "2006-01-02" .Lastmod }}

-

Download this post as: PDF, EPUB, or plaintext

{{- if .Params.tags }}

{{ $title := .Title }}