Make sure feed.xml doesnt show up as a post

This commit is contained in:
Arya Kiran 2022-09-09 18:02:54 +05:30
parent 92f679acd1
commit dcaad8d30a
No known key found for this signature in database
GPG Key ID: 3A6EA2D0EE314EEF
2 changed files with 2 additions and 3 deletions

View File

@ -15,7 +15,7 @@ HTML_LANG="en_US" # Your document (HTML) language setting
TOC=true
SYNTAX=true
POSTS_DIR="posts/"
POSTS=$(find $POSTS_DIR -type f)
POSTS=$(find $POSTS_DIR -type f -name *.md)
WEB_HTML="blog/"
OUTPUT="_output/"
TIME=$(date +"%T %Z")

View File

@ -33,7 +33,6 @@ rm $POSTS_DIR*.html
# Remove the default blog index to avoid pulling into the XML feed
rm $OUTPUT$WEB_HTML/index.html
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>
<?xml-stylesheet href=\"rss.xsl\" type=\"text/xsl\"?>
<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>
<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_TITLE=$(sed -n 's|^<h1 class="title">\([^<]*\)</h1>$|\1|p' $file)