home · contact · privacy
Add page URL title template field. master
authorChristian Heller <c.heller@plomlompom.de>
Thu, 26 Jan 2017 00:27:04 +0000 (01:27 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 26 Jan 2017 00:27:04 +0000 (01:27 +0100)
processor/default.html.do
processor/metadata/article.tmpl.do
test/test_files/bar baz.html.ignoring
test/test_files/foo.html.ignoring
test/test_files/te&quot;st.html.ignoring

index 8e88dbb86ca4bbbcf55e1dfb250a417289e9b912..f0d43a39dca9970f2a9838bff0ddda2f53d0d114 100644 (file)
@@ -33,6 +33,7 @@ title_html=$(cat "$intermediate_file" | head -1)
 title_plaintext=`echo "$title_html" | html2text`
 title_html=$(printf "%s" "$title_html" | prep_sed)
 title_plaintext=$(escape_html "$title_plaintext" | prep_sed)
+title_url=$(escape_html "${1%.html}" | prep_sed)
 body=$(cat "$intermediate_file" | sed 1d | prep_sed)
 datetime_created_unix=$(get_creation_date_from_meta_file_seconds "$meta_file")
 date_created=$(date -u "+%Y-%m-%d" -d "@${datetime_created_unix}")
@@ -52,4 +53,5 @@ sed 's/%DATE_UPDATED%/'"$date_updated"'/g' | \
 sed 's/%BODY%/'"$body"'/g' | \
 sed 's/%LINKBACKS%/'"$replies"'/g' | \
 sed 's/%CAPTCHA%/'"$captcha"'/g' | \
+sed 's/%TITLE_URL%/'"$title_url"'/g' | \
 tr '\a' '%'
index 406878c67eec2820c5014347118b72c26111ee5c..ea81edee4476f93dc6e1e33edc5262233e615f46 100644 (file)
@@ -27,6 +27,7 @@ Links back:
 <ul>%LINKBACKS%
 </ul>
 Captcha: %CAPTCHA%
+Title in URL: %TITLE_URL%
 </footer>
 </article>
 EOF
index 76598b581055640571c538c39085f29c817cedde..bf4a6c929c82f359016c73c01b67f9997876bc6e 100644 (file)
@@ -26,5 +26,6 @@ Links back:
 <ul>
 </ul>
 Captcha: apple
+Title in URL: bar baz
 </footer>
 </article>
\ No newline at end of file
index bc19030b2cd0b25d959a137b6c38b84bdffe2ea7..cfbd635af062b210601dd5c927e15bad5cad3de2 100644 (file)
@@ -29,5 +29,6 @@ Links back:
 <li><a href="http://example.com/some$()wh%20at&#x27;da&amp;quot;ngerusURL">http://example.com/some$()wh%20at&#x27;da&amp;quot;ngerusURL</a></li>
 </ul>
 Captcha: apple
+Title in URL: foo
 </footer>
 </article>
\ No newline at end of file
index 55cc1de3b8deaf03c564a513985e54d7fb3197cf..03921370266da016b6f6b8465b865de8c1c244ae 100644 (file)
@@ -25,5 +25,6 @@ Links back:
 <ul>
 </ul>
 Captcha: apple
+Title in URL: te&amp;quot;st
 </footer>
 </article>
\ No newline at end of file