[patch] readmore flavour setting

Hauke Fath <[email protected]> Fri, 29 May 2015 14:24:39 +0200
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
Hi,

taking the readmore plugin for a spin, I noticed that the text on the
"More..." page is always rendered in the vanilla html flavour. The
following patch, modelled after other plugins, fixes that and makes it use
the current flavour, if set:


--- Pyblosxom/plugins/readmore.py.orig	2013-07-31 00:53:58.000000000 +0000
+++ Pyblosxom/plugins/readmore.py
@@ -209,7 +209,11 @@ def cb_story(args):
     # otherwise we replace the breakpoint with the template
     base_url = config["base_url"]
     file_path = entry["file_path"]
-    flavour = config.get("default_flavour", "html")
+
+    # Set and use current (or default) flavour for full entry
+    flavour = data.get(
+        "flavour", config.get("default_flavour", "html"))
+
     url = '%s/%s.%s' % (base_url, file_path, flavour)

     link = (template % {"url": url,


(see also
<http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/www/py-blosxom/patches/patch-Pyblosx
om_plugins_readmore.py>). Please apply.

Cheerio,
hauke


--
"It's never straight up and down"     (DEVO)



------------------------------------------------------------------------------