1
0
Fork 0
forked from github/pelican

Eliminate extraneous whitespace

This commit is contained in:
Justin Mayer 2012-09-10 20:50:45 -07:00 committed by Alexis Métaireau
commit 9dcf4e5438
10 changed files with 27 additions and 27 deletions

View file

@ -23,7 +23,7 @@ different projects.
To create a virtual environment, use the following syntax:: To create a virtual environment, use the following syntax::
$ mkvirtualenv pelican $ mkvirtualenv pelican
To clone the Pelican source:: To clone the Pelican source::
@ -65,5 +65,5 @@ Try to respect what is described in the `PEP8 specification
<http://www.python.org/dev/peps/pep-0008/>`_ when providing patches. This can be <http://www.python.org/dev/peps/pep-0008/>`_ when providing patches. This can be
eased via the `pep8 <http://pypi.python.org/pypi/pep8>`_ or `flake8 eased via the `pep8 <http://pypi.python.org/pypi/pep8>`_ or `flake8
<http://pypi.python.org/pypi/flake8/>`_ tools, the latter of which in <http://pypi.python.org/pypi/flake8/>`_ tools, the latter of which in
particular will give you some useful hints about ways in which the particular will give you some useful hints about ways in which the
code/formatting can be improved. code/formatting can be improved.

View file

@ -26,7 +26,7 @@ suggestions or problems you might have via IRC or the issue tracker.
If you want to contribute, please fork `the git repository If you want to contribute, please fork `the git repository
<https://github.com/getpelican/pelican/>`_, create a new feature branch, make <https://github.com/getpelican/pelican/>`_, create a new feature branch, make
your changes, and issue a pull request. Someone will review your changes as soon your changes, and issue a pull request. Someone will review your changes as soon
as possible. Please refer to the :doc:`How to Contribute <contribute>` section as possible. Please refer to the :doc:`How to Contribute <contribute>` section
for more details. for more details.
You can also contribute by creating themes and improving the documentation. You can also contribute by creating themes and improving the documentation.
@ -43,7 +43,7 @@ I'm creating my own theme. How do I use Pygments for syntax highlighting?
Pygments adds some classes to the generated content. These classes are used by Pygments adds some classes to the generated content. These classes are used by
themes to style code syntax highlighting via CSS. Specifically, you can themes to style code syntax highlighting via CSS. Specifically, you can
customize the appearance of your syntax highlighting via the ``.codehilite pre`` customize the appearance of your syntax highlighting via the ``.codehilite pre``
class in your theme's CSS file. To see how various styles can be used to render class in your theme's CSS file. To see how various styles can be used to render
Django code, for example, you can use the demo `on the project website Django code, for example, you can use the demo `on the project website
<http://pygments.org/demo/15101/>`_. <http://pygments.org/demo/15101/>`_.
@ -105,7 +105,7 @@ I'm getting a warning about feeds generated without SITEURL being set properly
In order to properly generate all URLs properly in Pelican you will need to set In order to properly generate all URLs properly in Pelican you will need to set
``SITEURL`` to the full path of your blog. When using ``make html`` and the ``SITEURL`` to the full path of your blog. When using ``make html`` and the
default Makefile provided by the `pelican-quickstart` bootstrap script to test default Makefile provided by the `pelican-quickstart` bootstrap script to test
build your site, it's normal to see this warning since ``SITEURL`` is build your site, it's normal to see this warning since ``SITEURL`` is
deliberately left undefined. If configured properly no other ``make`` commands deliberately left undefined. If configured properly no other ``make`` commands
should result in this warning. should result in this warning.
@ -124,5 +124,5 @@ setting names). Here is an exact list of the renamed setting names::
Older 2.x themes that referenced the old setting names may not link properly. Older 2.x themes that referenced the old setting names may not link properly.
In order to rectify this, please update your theme for compatibility with 3.0+ In order to rectify this, please update your theme for compatibility with 3.0+
by changing the relevant values in your template files. For an example of by changing the relevant values in your template files. For an example of
complete feed headers and usage please check out the ``simple`` theme. complete feed headers and usage please check out the ``simple`` theme.

View file

@ -31,7 +31,7 @@ BeatifulSoup can be installed like any other Python package::
$ pip install BeautifulSoup $ pip install BeautifulSoup
For pandoc, install a package for your operating system from the For pandoc, install a package for your operating system from the
`pandoc site <http://johnmacfarlane.net/pandoc/installing.html>`_. `pandoc site <http://johnmacfarlane.net/pandoc/installing.html>`_.

View file

@ -3,7 +3,7 @@ Pelican
Pelican is a static site generator, written in Python_. Pelican is a static site generator, written in Python_.
* Write your weblog entries directly with your editor of choice (vim!) * Write your weblog entries directly with your editor of choice (vim!)
in reStructuredText_ or Markdown_ in reStructuredText_ or Markdown_
* Includes a simple CLI tool to (re)generate the weblog * Includes a simple CLI tool to (re)generate the weblog
* Easy to interface with DVCSes and web hooks * Easy to interface with DVCSes and web hooks
@ -79,4 +79,4 @@ A French version of the documentation is available at :doc:`fr/index`.
.. _`Pelican documentation`: http://docs.getpelican.com/latest/ .. _`Pelican documentation`: http://docs.getpelican.com/latest/
.. _`Pelican's internals`: http://docs.getpelican.com/en/latest/internals.html .. _`Pelican's internals`: http://docs.getpelican.com/en/latest/internals.html
.. _`#pelican on Freenode`: irc://irc.freenode.net/pelican .. _`#pelican on Freenode`: irc://irc.freenode.net/pelican
.. _webchat: http://webchat.freenode.net/?channels=pelican&uio=d4 .. _webchat: http://webchat.freenode.net/?channels=pelican&uio=d4

View file

@ -52,7 +52,7 @@ Take a look at the Markdown reader::
text = open(filename) text = open(filename)
md = Markdown(extensions = ['meta', 'codehilite']) md = Markdown(extensions = ['meta', 'codehilite'])
content = md.convert(text) content = md.convert(text)
metadata = {} metadata = {}
for name, value in md.Meta.items(): for name, value in md.Meta.items():
if name in _METADATA_FIELDS: if name in _METADATA_FIELDS:
@ -81,7 +81,7 @@ both; only the existing ones will be called.
context is shared between all generators, and will be passed to the context is shared between all generators, and will be passed to the
templates. For instance, the ``PageGenerator`` ``generate_context`` method templates. For instance, the ``PageGenerator`` ``generate_context`` method
finds all the pages, transforms them into objects, and populates the context finds all the pages, transforms them into objects, and populates the context
with them. Be careful *not* to output anything using this context at this with them. Be careful *not* to output anything using this context at this
stage, as it is likely to change by the effect of other generators. stage, as it is likely to change by the effect of other generators.
* ``generate_output`` is then called. And guess what is it made for? Oh, * ``generate_output`` is then called. And guess what is it made for? Oh,

View file

@ -64,7 +64,7 @@ In this example, we can see there are three themes available: ``notmyidea``, ``s
Note that you can combine the ``--list`` option with the ``-v`` or ``--verbose`` option to get more verbose output, like this: Note that you can combine the ``--list`` option with the ``-v`` or ``--verbose`` option to get more verbose output, like this:
.. code-block:: console .. code-block:: console
$ pelican-themes -v -l $ pelican-themes -v -l
/usr/local/lib/python2.6/dist-packages/pelican-2.6.0-py2.6.egg/pelican/themes/notmyidea /usr/local/lib/python2.6/dist-packages/pelican-2.6.0-py2.6.egg/pelican/themes/notmyidea
/usr/local/lib/python2.6/dist-packages/pelican-2.6.0-py2.6.egg/pelican/themes/two-column (symbolic link to `/home/skami/Dev/Python/pelican-themes/two-column') /usr/local/lib/python2.6/dist-packages/pelican-2.6.0-py2.6.egg/pelican/themes/two-column (symbolic link to `/home/skami/Dev/Python/pelican-themes/two-column')
@ -118,7 +118,7 @@ Creating symbolic links
To symbolically link a theme, you can use the ``-s`` or ``--symlink``, which works exactly as the ``--install`` option: To symbolically link a theme, you can use the ``-s`` or ``--symlink``, which works exactly as the ``--install`` option:
.. code-block:: console .. code-block:: console
# pelican-themes --symlink ~/Dev/Python/pelican-themes/two-column # pelican-themes --symlink ~/Dev/Python/pelican-themes/two-column
In this example, the ``two-column`` theme is now symbolically linked to the Pelican themes path, so we can use it, but we can also modify it without having to reinstall it after each modification. In this example, the ``two-column`` theme is now symbolically linked to the Pelican themes path, so we can use it, but we can also modify it without having to reinstall it after each modification.
@ -130,11 +130,11 @@ This is useful for theme development:
$ sudo pelican-themes -s ~/Dev/Python/pelican-themes/two-column $ sudo pelican-themes -s ~/Dev/Python/pelican-themes/two-column
$ pelican ~/Blog/content -o /tmp/out -t two-column $ pelican ~/Blog/content -o /tmp/out -t two-column
$ firefox /tmp/out/index.html $ firefox /tmp/out/index.html
$ vim ~/Dev/Pelican/pelican-themes/two-coumn/static/css/main.css $ vim ~/Dev/Pelican/pelican-themes/two-coumn/static/css/main.css
$ pelican ~/Blog/content -o /tmp/out -t two-column $ pelican ~/Blog/content -o /tmp/out -t two-column
$ cp /tmp/bg.png ~/Dev/Pelican/pelican-themes/two-coumn/static/img/bg.png $ cp /tmp/bg.png ~/Dev/Pelican/pelican-themes/two-coumn/static/img/bg.png
$ pelican ~/Blog/content -o /tmp/out -t two-column $ pelican ~/Blog/content -o /tmp/out -t two-column
$ vim ~/Dev/Pelican/pelican-themes/two-coumn/templates/index.html $ vim ~/Dev/Pelican/pelican-themes/two-coumn/templates/index.html
$ pelican ~/Blog/content -o /tmp/out -t two-column $ pelican ~/Blog/content -o /tmp/out -t two-column
@ -152,7 +152,7 @@ The ``--install``, ``--remove`` and ``--symlink`` option are not mutually exclus
--symlink ~/Dev/Python/pelican-themes/two-column \ --symlink ~/Dev/Python/pelican-themes/two-column \
--verbose --verbose
In this example, the theme ``notmyidea-cms`` is replaced by the theme ``notmyidea-cms-fr`` In this example, the theme ``notmyidea-cms`` is replaced by the theme ``notmyidea-cms-fr``

View file

@ -16,7 +16,7 @@ To load plugins, you have to specify them in your settings file. You have two
ways to do so. ways to do so.
Either by specifying strings with the path to the callables:: Either by specifying strings with the path to the callables::
PLUGINS = ['pelican.plugins.gravatar',] PLUGINS = ['pelican.plugins.gravatar',]
Or by importing them and adding them to the list:: Or by importing them and adding them to the list::

View file

@ -4,7 +4,7 @@ Some history about Pelican
.. warning:: .. warning::
This page comes from a report the original author (Alexis Métaireau) wrote This page comes from a report the original author (Alexis Métaireau) wrote
right after writing Pelican, in December 2010. The information may not be right after writing Pelican, in December 2010. The information may not be
up-to-date. up-to-date.
Pelican is a simple static blog generator. It parses markup files Pelican is a simple static blog generator. It parses markup files
@ -113,7 +113,7 @@ concepts. Here is what happens when calling the ``generate_context``
method: method:
* Read the folder “path”, looking for restructured text files, load * Read the folder “path”, looking for restructured text files, load
each of them, and construct a content object (``Article``) with it. To do so, each of them, and construct a content object (``Article``) with it. To do so,
use ``Reader`` objects. use ``Reader`` objects.
* Update the ``context`` with all those articles. * Update the ``context`` with all those articles.

View file

@ -35,7 +35,7 @@ To make your own theme, you must follow the following structure::
* `templates` contains all the templates that will be used to generate the content. * `templates` contains all the templates that will be used to generate the content.
I've just put the mandatory templates here; you can define your own if it helps I've just put the mandatory templates here; you can define your own if it helps
you keep things organized while creating your theme. you keep things organized while creating your theme.
Templates and variables Templates and variables
======================= =======================
@ -44,7 +44,7 @@ This document describes which templates should exist in a theme, and which
variables will be passed to each template at generation time. variables will be passed to each template at generation time.
All templates will receive the variables defined in your settings file, if they All templates will receive the variables defined in your settings file, if they
are in all-caps. You can access them directly. are in all-caps. You can access them directly.
Common variables Common variables
---------------- ----------------
@ -55,14 +55,14 @@ All of these settings will be available to all templates.
Variable Description Variable Description
============= =================================================== ============= ===================================================
articles The list of articles, ordered descending by date articles The list of articles, ordered descending by date
All the elements are `Article` objects, so you can All the elements are `Article` objects, so you can
access their attributes (e.g. title, summary, author access their attributes (e.g. title, summary, author
etc.) etc.)
dates The same list of articles, but ordered by date, dates The same list of articles, but ordered by date,
ascending ascending
tags A key-value dict containing the tags (the keys) and tags A key-value dict containing the tags (the keys) and
the list of respective articles (the values) the list of respective articles (the values)
categories A key-value dict containing the categories (keys) categories A key-value dict containing the categories (keys)
and the list of respective articles (values) and the list of respective articles (values)
pages The list of pages pages The list of pages
============= =================================================== ============= ===================================================
@ -182,7 +182,7 @@ dates Articles related to this tag, but ordered by date,
ascending ascending
articles_paginator A paginator object for the list of articles articles_paginator A paginator object for the list of articles
articles_page The current page of articles articles_page The current page of articles
dates_paginator A paginator object for the list of articles, dates_paginator A paginator object for the list of articles,
ordered by date, ascending ordered by date, ascending
dates_page The current page of articles, ordered by date, dates_page The current page of articles, ordered by date,
ascending ascending

View file

@ -12,11 +12,11 @@ file generator, we can take advantage of this.
User Pages User Pages
---------- ----------
GitHub allows you to create user pages in the form of ``username.github.com``. GitHub allows you to create user pages in the form of ``username.github.com``.
Whatever is created in the master branch will be published. For this purpose, Whatever is created in the master branch will be published. For this purpose,
just the output generated by Pelican needs to pushed to GitHub. just the output generated by Pelican needs to pushed to GitHub.
So given a repository containing your articles, just run Pelican over the posts So given a repository containing your articles, just run Pelican over the posts
and deploy the master branch to GitHub:: and deploy the master branch to GitHub::
$ pelican -s pelican.conf.py ./path/to/posts -o /path/to/output $ pelican -s pelican.conf.py ./path/to/posts -o /path/to/output
@ -35,7 +35,7 @@ really easy, which can be installed via::
$ pip install ghp-import $ pip install ghp-import
Then, given a repository containing your articles, you would simply run Then, given a repository containing your articles, you would simply run
Pelican and upload the output to GitHub:: Pelican and upload the output to GitHub::
$ pelican -s pelican.conf.py . $ pelican -s pelican.conf.py .