Make sure feed.xml doesnt show up as a post
This commit is contained in:
parent
92f679acd1
commit
dcaad8d30a
|
@ -15,7 +15,7 @@ HTML_LANG="en_US" # Your document (HTML) language setting
|
||||||
TOC=true
|
TOC=true
|
||||||
SYNTAX=true
|
SYNTAX=true
|
||||||
POSTS_DIR="posts/"
|
POSTS_DIR="posts/"
|
||||||
POSTS=$(find $POSTS_DIR -type f)
|
POSTS=$(find $POSTS_DIR -type f -name *.md)
|
||||||
WEB_HTML="blog/"
|
WEB_HTML="blog/"
|
||||||
OUTPUT="_output/"
|
OUTPUT="_output/"
|
||||||
TIME=$(date +"%T %Z")
|
TIME=$(date +"%T %Z")
|
||||||
|
|
3
pblog.sh
3
pblog.sh
|
@ -33,7 +33,6 @@ rm $POSTS_DIR*.html
|
||||||
|
|
||||||
# Remove the default blog index to avoid pulling into the XML feed
|
# Remove the default blog index to avoid pulling into the XML feed
|
||||||
rm $OUTPUT$WEB_HTML/index.html
|
rm $OUTPUT$WEB_HTML/index.html
|
||||||
|
|
||||||
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>
|
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>
|
||||||
<?xml-stylesheet href=\"rss.xsl\" type=\"text/xsl\"?>
|
<?xml-stylesheet href=\"rss.xsl\" type=\"text/xsl\"?>
|
||||||
<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">
|
<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">
|
||||||
|
@ -45,7 +44,7 @@ echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>
|
||||||
<ttl>$TTL</ttl>
|
<ttl>$TTL</ttl>
|
||||||
<atom:link href=\"https://vern.cc/blog/feed.xml\" rel=\"self\" type=\"application/rss+xml\" />";
|
<atom:link href=\"https://vern.cc/blog/feed.xml\" rel=\"self\" type=\"application/rss+xml\" />";
|
||||||
|
|
||||||
for file in $OUTPUT$WEB_HTML*; do
|
for file in $OUTPUT$WEB_HTML*.html; do
|
||||||
|
|
||||||
POST_DATE=$(sed -n 's|^<p class="date">\([^<]*\)</p>$|\1|p' $file)
|
POST_DATE=$(sed -n 's|^<p class="date">\([^<]*\)</p>$|\1|p' $file)
|
||||||
POST_TITLE=$(sed -n 's|^<h1 class="title">\([^<]*\)</h1>$|\1|p' $file)
|
POST_TITLE=$(sed -n 's|^<h1 class="title">\([^<]*\)</h1>$|\1|p' $file)
|
||||||
|
|
Loading…
Reference in New Issue