главная|main page

состояние|status

блог|blog

файлы|files

программы|software

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Shpakovsky <alexey@shpakovsky.ru>2014-02-26 23:22:26 +0100
committerAlexey Shpakovsky <alexey@shpakovsky.ru>2014-03-01 09:59:17 +0100
commitcf6bdb027b461cca071212e7bb7e5f188a9d7a89 (patch)
treec7b54cd5aa20b717cdd0a4db451b9f8477032cfd
parent7e7d1a8688fa73db93566524907c8b0c93fbdfd1 (diff)
"Read more..." link for articles which were cut
-rwxr-xr-xbb.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/bb.sh b/bb.sh
index cffa105..5d92e74 100755
--- a/bb.sh
+++ b/bb.sh
@@ -175,6 +175,8 @@ global_variables() {
# Localization and i18n
# "Comments?" (used in twitter link after every post)
template_comments="Comments?"
+ # "Read more..." (link under cut article on index page)
+ template_read_more="Read more..."
# "View more posts" (used on bottom of index page as link to archive)
template_archive="View more posts"
# "All posts" (title of archive page)
@@ -657,7 +659,7 @@ rebuild_index() {
for i in $(ls -t *.html); do # sort by date, newest first
is_boilerplate_file "$i" && continue;
if [[ "$n" -ge "$number_of_index_articles" ]]; then break; fi
- get_html_file_content 'entry' 'entry' 'cut' <$i >> "$contentfile"
+ get_html_file_content 'entry' 'entry' 'cut' <$i | sed "s|<.-- text cut -->|<p class=\"readmore\"><a href=\"$i\">$template_read_more</a></p>|" >> "$contentfile"
echo -n "."
n=$(( $n + 1 ))
done