posativ / acrylamid

(unmaintained) static blog generator in python with incremental rendering ⛺
http://posativ.org/acrylamid/
Other
277 stars 40 forks source link

Added non-href option to summarize filter #226

Closed ckoepp closed 9 years ago

ckoepp commented 9 years ago

I came across an issue with the summarize filter while creating a theme.

Sometimes the continue link is not needed directly after the summarized version of an article but somewhere else. In the current version the must be a %s present when using the standard filter. Just using a simple string results in an exception. This is problematic when someone likes to just append plain text like &hellip without any link.

Therefore I simply added a new method to centralize the link-insert action and checked whether or not a %s is present in the options['link'] parameter.

This request also adds a sentence to the documentation to explain the now optional %s within the SUMMARIZE_LINK configuration parameter.

Sorry for the typo in the commit message - hope this is isn't too bad :smile:

posativ commented 9 years ago

Yup, I like the change. Thanks for the patch!