Skip to content

Commit

Permalink
Add ROOT_URL to table of content
Browse files Browse the repository at this point in the history
  • Loading branch information
NilsIrl committed Jun 10, 2020
1 parent 24eb857 commit afe0210
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/globals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ function post_markdown {
[[ "${PREFER_SHORT_POSTS}" == "yes" ]] && \
LINK="/p/${ID}.html" || \
LINK="/posts/$(get_title "${METADATA_DIR}/${ID}/headers" | title_to_post_url)${TITLE_SEPARATOR_CHAR}${ID}.html"
sed "s|\(<a href=['\"]\)\(#.*\)|\1${LINK}\2|" "${TMP1}" > "${TMP2}"
sed "s|\(<a href=['\"]\)\(#.*\)|\1${ROOT_URL}${LINK}\2|" "${TMP1}" > "${TMP2}"
else
cat "${TMP1}" > "${TMP2}"
fi
Expand Down

0 comments on commit afe0210

Please sign in to comment.