diff options
-rw-r--r-- | app/src/models.py | 4 | ||||
-rw-r--r-- | design/templates/details/src_entry.html | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/app/src/models.py b/app/src/models.py index 21e38b6..9b596b1 100644 --- a/app/src/models.py +++ b/app/src/models.py @@ -58,9 +58,11 @@ class Entry(models.Model): def get_next_published(self): return self.get_next_by_pub_date(status__exact=1) + 'codehilite(css_class=highlight,linenums=False,guess_lang=True,use_pygments=True)' + def save(self): md = image_url_replace(self.body_markdown) - self.body_html = markdown.markdown(md, extensions=['markdown.extensions.fenced_code', 'markdown.extensions.attr_list','extra'], safe_mode=False) + self.body_html = markdown.markdown(md, extensions=['markdown.extensions.codehilite(css_class=highlight,linenums=False)', 'markdown.extensions.fenced_code', 'markdown.extensions.attr_list','extra'], safe_mode=False) super(Entry, self).save() diff --git a/design/templates/details/src_entry.html b/design/templates/details/src_entry.html index ec923ed..3d64cf0 100644 --- a/design/templates/details/src_entry.html +++ b/design/templates/details/src_entry.html @@ -7,7 +7,7 @@ {% block bodyid %}class="src"{% endblock %} {% block metadescription %}{% autoescape on %}{{object.meta_description|striptags|safe}}{% endautoescape %}{% endblock %} {%block extrahead%} -<link rel="stylesheet" href="/media/src/prism.css" type="text/css" media="screen"/> +<link rel="stylesheet" href="/media/src/solarized.css" type="text/css" media="screen"/> {%endblock%} {% block primary %} <main role="main"> @@ -74,6 +74,5 @@ window.onload = function() { } </script> {% if object.has_code %} -<script src="/media/src/prism.js"></script> {%endif %} {% endblock %} |