mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge branch 'dynamic_nosetupfools' of https://github.com/JNRowe/pelican
This commit is contained in:
commit
0f45b5ab1b
3 changed files with 38 additions and 15 deletions
|
|
@ -23,13 +23,14 @@ At this time, pelican is dependent of the following python packages:
|
|||
|
||||
* feedgenerator, to generate the ATOM feeds.
|
||||
* jinja2, for templating support.
|
||||
* pygments, to have syntactic colorization
|
||||
* docutils and Markdown
|
||||
|
||||
If you're not using python 2.7, you will also need `argparse`.
|
||||
|
||||
All those dependencies will be processed automatically if you install pelican
|
||||
using setuptools/distribute or pip.
|
||||
Optionally:
|
||||
|
||||
* docutils, for reST support
|
||||
* pygments, to have syntactic colorization with resT input
|
||||
* Markdown, for Markdown as an input format
|
||||
|
||||
Writing articles using pelican
|
||||
==============================
|
||||
|
|
|
|||
|
|
@ -40,7 +40,8 @@ method, that is returning an HTML content and some metadata.
|
|||
|
||||
Take a look to the Markdown reader::
|
||||
|
||||
class MarkdownReader(object):
|
||||
class MarkdownReader(Reader):
|
||||
enabled = bool(Markdown)
|
||||
|
||||
def read(self, filename):
|
||||
"""Parse content and metadata of markdown files"""
|
||||
|
|
@ -59,6 +60,12 @@ Take a look to the Markdown reader::
|
|||
|
||||
Simple isn't it ?
|
||||
|
||||
If your new reader requires additional Python dependencies then you should wrap
|
||||
their `imports` statements in `try...except`. Then inside the reader's class
|
||||
set the `enabled` class attribute to mark import success or failure. This makes
|
||||
it possible for users to continue using their favourite markup method without
|
||||
needing to install modules for all the additional formats they don't use.
|
||||
|
||||
How to implement a new generator ?
|
||||
==================================
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue