diff options
author | Carlos Fenollosa <carlos.fenollosa@gmail.com> | 2014-02-25 08:27:00 +0100 |
---|---|---|
committer | Carlos Fenollosa <carlos.fenollosa@gmail.com> | 2014-02-25 08:27:00 +0100 |
commit | fbc9d355deb89ad3f1c8c4ff98408f69623dc83f (patch) | |
tree | 560b8af23ad02181b3cb0a543425c29bf8508fa4 /bb.sh | |
parent | 75eeeba4bc452d88be130d292b09ba6cd310b4a6 (diff) | |
parent | 0c2c0dca7c488486d6ffd33d911940b5a3810466 (diff) |
Merge pull request #28 from Lex-2008/relative-urls
Use relative URLs for links between pages
Diffstat (limited to 'bb.sh')
-rwxr-xr-x | bb.sh | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -368,7 +368,7 @@ create_html_page() { # one blog entry if [[ "$index" == "no" ]]; then echo '<!-- entry begin -->' >> "$filename" # marks the beginning of the whole post - echo '<h3><a class="ablack" href="'$global_url/$file_url'">' >> "$filename" + echo '<h3><a class="ablack" href="'$file_url'">' >> "$filename" # remove possible <p>'s on the title because of markdown conversion echo "$(echo "$title" | sed 's/<\/*p>//g')" >> "$filename" echo '</a></h3>' >> "$filename" @@ -534,14 +534,14 @@ all_posts() { echo -n "." # Title title="$(awk '/<h3><a class="ablack" href=".+">/, /<\/a><\/h3>/{if (!/<h3><a class="ablack" href=".+">/ && !/<\/a><\/h3>/) print}' $i)" - echo -n '<li><a href="'$global_url/$i'">'$title'</a> —' >> "$contentfile" + echo -n '<li><a href="'$i'">'$title'</a> —' >> "$contentfile" # Date date="$(LC_ALL=$date_locale date -r "$i" +"$date_format")" echo " $date</li>" >> "$contentfile" done echo "" echo "</ul>" >> "$contentfile" - echo '<div id="all_posts"><a href="'$global_url'">'$template_archive_index_page'</a></div>' >> "$contentfile" + echo '<div id="all_posts"><a href="'./'">'$template_archive_index_page'</a></div>' >> "$contentfile" create_html_page "$contentfile" "$archive_index.tmp" yes "$global_title — All posts" mv "$archive_index.tmp" "$archive_index" |