removed .html at end of posts urls
This patch removes the ugly urls that were generated previously, now you can generate nice urls that don't end with the fileformat, so it looks kinda nice!
This commit is contained in:
parent
883f94892c
commit
b1858ac38f
4
blop
4
blop
|
@ -20,7 +20,7 @@ max_posts="10" # number of posts to list on the blog index, posts beyond this wi
|
|||
group_by_date=false # whether to group the main listing on the blog's index by dates
|
||||
date_format="%B %-d, %Y"
|
||||
short_date_format="%B, %Y" # format for date grouping in the archive and optionally on the index (see group_by_date above)
|
||||
listing_format="<a href=\"posts/<!--title-nospaces-->./\"><!--title--></a> by <!--author--> on <!--date-->" # rejig this and/or remove elements to taste. You may need to change delimeter when sed is used on this later if any of the fields contain slashes
|
||||
listing_format="<a href=\"posts/<!--title-nospaces-->/\"><!--title--></a> by <!--author--> on <!--date-->" # rejig this and/or remove elements to taste. You may need to change delimeter when sed is used on this later if any of the fields contain slashes
|
||||
|
||||
#######################
|
||||
|
||||
|
@ -147,7 +147,7 @@ for file in $(ls -t1 "$blogdir/markdown/"*.md); do
|
|||
archivelist="$archivelist<li>$listitem</li>\n"
|
||||
old_short_date=$short_date
|
||||
|
||||
sed -e "/<!--post-->/r $temp/post" -e '/<!--post-->/d' -e "s/<!--author-->/$author/g" -e "s/<!--date-->/$date/g" -e "s/<!--title-->/$title/g" "$blogdir/post_template.html" > "$blogdir/posts/$title_nospaces.html"
|
||||
sed -e "/<!--post-->/r $temp/post" -e '/<!--post-->/d' -e "s/<!--author-->/$author/g" -e "s/<!--date-->/$date/g" -e "s/<!--title-->/$title/g" "$blogdir/post_template.html" > "$blogdir/posts/$title_nospaces/index.html"
|
||||
# prepare rss
|
||||
echo -e "<item>\n<title>$title</title>\n<guid>$url/posts/$title_nospaces/</guid>\n<pubDate>$rssdate</pubDate><description><![CDATA[$(cat $temp/post)]]></description>\n</item>\n\n" >> $temp/rss
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue