Owen Nelson avatar Owen Nelson committed 7ed0e51

more details about the non-existent management command (refs #3)

Comments (0)

Files changed (1)

 This package provides 2 options for this setting.
 + ``mdown.forms.WmdWidget`` *Activates the WMD rich text editor.*
 + ``mdown.forms.PlainWidget`` *Use a plain Textarea (no rich text editor).*
 + ``mdown.filters.codehilite`` *Renders the content using markdown with the 
   codehilite extension enabled.*
-   Extra Steps
-   -----------
+Extra Steps
-   Pygments Styles
-   ^^^^^^^^^^^^^^^
+Pygments Styles
-   Updating Theme Templates
-   ^^^^^^^^^^^^^^^^^^^^^^^^
+Using the management command ``pygments_styles`` you can generate css to 
+colorize code blocks parsed by the codehilite filter.
+**Note:** this requires pygments to be installed (use ``pip install pygments``
+or ``easy_install pygments`` to use this feature).
+Invoke the command with no args to see a usage message and list of available color schemes on your system.::
+    user@home:~/mysite$ ./manage.py pygments_styles
+    Usage: ./manage.py pygments_styles <scheme_name>
+    Available color schemes:
+      borland
+      bw
+      colorful
+      default
+      ... [ snip ] ...
+Invoking with the scheme's name as an argument will print the css to stdout, which you can 
+redirect to a file like so: ::
+    user@home:~/mysite$ ./manage.py pygment_styles colorful > site_media/css/pygments.css
+Once you've got a css file generated, simply add it to your site's base template to get your code "pretty" printed.
+Updating Theme Templates
+Themes that were based on the default theme and were created prior to 
+Mezzanine's 0.11.3 release will most likely not have the ``richtext_filter``
+applied to *rich content*. To correct this, you simply have to update the 
+templates for these content types so that the filter is used.
+For example, in the default theme, the 
+``templates/blog/blog_post_detail.html`` had a line that  was updated from:::
+    {{ blog_post.content|safe }}
+    {{ blog_post.content|richtext_filter|safe }}
+Just ensure that the ``safe`` filter comes after the ``richtext_filter``.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.