forked from kageru/mdb
change comments for rss feed and switch rsync to quitet output
This commit is contained in:
parent
ab3b9a2f19
commit
3e7021845c
@ -49,10 +49,8 @@ html_entry() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
rss_entry() {
|
rss_entry() {
|
||||||
# The content is the output minus the first line
|
# this is made to represent what heise.de has done with
|
||||||
# (which would otherwise be a redundant title in most rss readers)
|
# their rss/atom feeds and doesn't need any escaping
|
||||||
# and with escaped html.
|
|
||||||
# The sed expression is stolen from https://stackoverflow.com/questions/12873682/12873723#12873723
|
|
||||||
output_rss " <entry>
|
output_rss " <entry>
|
||||||
<title type=\"text\">$1</title>
|
<title type=\"text\">$1</title>
|
||||||
<published>$(date --iso-8601=seconds -d $4)</published>
|
<published>$(date --iso-8601=seconds -d $4)</published>
|
||||||
@ -66,7 +64,6 @@ $(grep -h '^<p>' "dist/$2" | head -n 1 | sed 's/<p>//;s/<\/p>//;/<!--/d;s/^/
|
|||||||
$(pandoc $3 | sed '/<!--/d;s/^/ /')]]>
|
$(pandoc $3 | sed '/<!--/d;s/^/ /')]]>
|
||||||
</content>
|
</content>
|
||||||
</entry>"
|
</entry>"
|
||||||
# $(tail -n+2 "$2" | sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/"/\"/g; s/'"'"'/\'/g')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
create_entry() {
|
create_entry() {
|
||||||
@ -100,7 +97,7 @@ has_updates() {
|
|||||||
|
|
||||||
cd /home/lucy/blog-content/
|
cd /home/lucy/blog-content/
|
||||||
rm -R dist/*
|
rm -R dist/*
|
||||||
rsync --delete -avxt static/ dist/
|
rsync -q --delete -avxt static/ dist/
|
||||||
add_header
|
add_header
|
||||||
ls -lr src/posts/*.md | tail -n+1 | while read f; do create_entry $f; done
|
ls -lr src/posts/*.md | tail -n+1 | while read f; do create_entry $f; done
|
||||||
ls -l src/*.md | tail -n+1 | while read f; do convert_static $f; done
|
ls -l src/*.md | tail -n+1 | while read f; do convert_static $f; done
|
||||||
|
Loading…
Reference in New Issue
Block a user