2011-01-19 16:22:15 +01:00
|
|
|
Frequently Asked Questions (FAQ)
|
|
|
|
|
################################
|
|
|
|
|
|
2012-03-06 06:13:17 -08:00
|
|
|
Here is a summary of the frequently asked questions for Pelican.
|
2011-01-19 16:22:15 +01:00
|
|
|
|
2012-08-01 18:20:12 -07:00
|
|
|
What's the best way to communicate a problem, question, or suggestion?
|
|
|
|
|
======================================================================
|
|
|
|
|
|
|
|
|
|
If you have a problem, question, or suggestion, please start by striking up a
|
|
|
|
|
conversation on `#pelican on Freenode <irc://irc.freenode.net/pelican>`_.
|
|
|
|
|
Those who don't have an IRC client handy can jump in immediately via
|
|
|
|
|
`IRC webchat <http://webchat.freenode.net/?channels=pelican&uio=d4>`_. Because
|
|
|
|
|
of differing time zones, you may not get an immediate response to your question,
|
|
|
|
|
but please be patient and stay logged into IRC — someone will almost always
|
|
|
|
|
respond.
|
|
|
|
|
|
|
|
|
|
If you are unable to resolve your issue or if you have a feature request, please
|
|
|
|
|
refer to the `issue tracker <https://github.com/getpelican/pelican/issues>`_.
|
|
|
|
|
|
|
|
|
|
How can I help?
|
|
|
|
|
================
|
|
|
|
|
|
|
|
|
|
There are several ways to help out. First, you can use Pelican and report any
|
|
|
|
|
suggestions or problems you might have via IRC or the issue tracker.
|
|
|
|
|
|
|
|
|
|
If you want to contribute, please fork `the git repository
|
|
|
|
|
<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
|
2012-08-04 11:15:44 -07:00
|
|
|
as possible. Please refer to the :doc:`How to Contribute <contribute>` section
|
|
|
|
|
for more details.
|
2012-08-01 18:20:12 -07:00
|
|
|
|
|
|
|
|
You can also contribute by creating themes and improving the documentation.
|
|
|
|
|
|
2012-03-06 06:13:17 -08:00
|
|
|
Is it mandatory to have a configuration file?
|
|
|
|
|
=============================================
|
2011-01-19 16:22:15 +01:00
|
|
|
|
2012-03-06 06:13:17 -08:00
|
|
|
No, it's not. Configuration files are just an easy way to configure Pelican.
|
|
|
|
|
For basic operations, it's possible to specify options while invoking Pelican
|
2012-07-01 10:52:39 -07:00
|
|
|
via the command line. See ``pelican --help`` for more information.
|
2011-01-19 16:22:15 +01:00
|
|
|
|
2012-03-06 06:13:17 -08:00
|
|
|
I'm creating my own theme. How do I use Pygments for syntax highlighting?
|
|
|
|
|
=========================================================================
|
2011-01-19 16:22:15 +01:00
|
|
|
|
2012-03-06 06:13:17 -08:00
|
|
|
Pygments adds some classes to the generated content. These classes are used by
|
|
|
|
|
themes to style code syntax highlighting via CSS. Specifically, you can
|
2012-07-01 10:52:39 -07:00
|
|
|
customize the appearance of your syntax highlighting via the ``.codehilite pre``
|
2012-03-06 06:13:17 -08:00
|
|
|
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
|
|
|
|
|
<http://pygments.org/demo/15101/>`_.
|
2011-01-19 16:22:15 +01:00
|
|
|
|
2012-03-06 06:13:17 -08:00
|
|
|
How do I create my own theme?
|
2011-01-19 16:22:15 +01:00
|
|
|
==============================
|
|
|
|
|
|
2012-03-06 06:13:17 -08:00
|
|
|
Please refer to :ref:`theming-pelican`.
|
2011-01-19 16:22:15 +01:00
|
|
|
|
2012-03-06 06:13:17 -08:00
|
|
|
I want to use Markdown, but I got an error.
|
|
|
|
|
===========================================
|
2011-11-27 18:00:29 +01:00
|
|
|
|
2012-03-06 06:13:17 -08:00
|
|
|
Markdown is not a hard dependency for Pelican, so you will need to explicitly
|
|
|
|
|
install it. You can do so by typing::
|
2011-11-27 18:00:29 +01:00
|
|
|
|
|
|
|
|
$ (sudo) pip install markdown
|
|
|
|
|
|
2012-03-06 06:13:17 -08:00
|
|
|
In case you don't have pip installed, consider installing it via::
|
2011-11-27 18:00:29 +01:00
|
|
|
|
|
|
|
|
$ (sudo) easy_install pip
|
2012-07-07 12:15:35 -07:00
|
|
|
|
2012-08-08 10:21:29 -07:00
|
|
|
Can I use arbitrary meta-data in my templates?
|
|
|
|
|
==============================================
|
|
|
|
|
|
|
|
|
|
Yes. For example, to include a modified date in a Markdown post, one could
|
2012-08-08 10:27:45 -07:00
|
|
|
include the following at the top of the article::
|
2012-08-08 10:21:29 -07:00
|
|
|
|
|
|
|
|
Modified: 2012-08-08
|
|
|
|
|
|
2012-08-08 10:27:45 -07:00
|
|
|
That meta-data can then be accessed in the template::
|
2012-08-08 10:21:29 -07:00
|
|
|
|
|
|
|
|
{% if article.modified %}
|
2012-08-08 10:27:45 -07:00
|
|
|
Last modified: {{ article.modified}}
|
2012-08-08 10:21:29 -07:00
|
|
|
{% endif %}
|
|
|
|
|
|
2012-08-01 18:20:12 -07:00
|
|
|
How do I assign custom templates on a per-page basis?
|
2012-07-07 12:15:35 -07:00
|
|
|
=====================================================
|
|
|
|
|
|
|
|
|
|
It's as simple as adding an extra line of metadata to any pages or articles you
|
2012-08-01 18:20:12 -07:00
|
|
|
want to have its own template.
|
2012-07-07 12:15:35 -07:00
|
|
|
|
|
|
|
|
:template: template_name
|
|
|
|
|
|
|
|
|
|
Then just make sure to have the template installed in to your theme as
|
2012-07-14 17:05:04 -07:00
|
|
|
``template_name.html``.
|
|
|
|
|
|
|
|
|
|
What if I want to disable feed generation?
|
|
|
|
|
==========================================
|
|
|
|
|
|
2012-07-16 09:35:05 -07:00
|
|
|
To disable all feed generation set ``FEED_ATOM`` and ``FEED_RSS`` to ``None`` in
|
2012-07-14 17:05:04 -07:00
|
|
|
your settings. Please note ``None`` and ``''`` are not the same thing. The
|
2012-08-01 18:20:12 -07:00
|
|
|
word ``None`` should not be surrounded by quotes.
|
2012-07-14 17:05:04 -07:00
|
|
|
|
2012-08-01 18:20:12 -07:00
|
|
|
I'm getting a warning about feeds generated without SITEURL being set properly
|
2012-07-14 17:05:04 -07:00
|
|
|
==============================================================================
|
|
|
|
|
|
2012-08-01 18:20:12 -07:00
|
|
|
`RSS and Atom feeds require all URLs and links in them to be absolute
|
|
|
|
|
<http://validator.w3.org/feed/docs/rss2.html#comments>`_.
|
|
|
|
|
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
|
|
|
|
|
default Makefile provided by the `pelican-quickstart` bootstrap script to test
|
|
|
|
|
build your site, it's normal to see this warning since ``SITEURL`` is
|
|
|
|
|
deliberately left undefined. If configured properly no other ``make`` commands
|
|
|
|
|
should result in this warning.
|
2012-07-14 17:05:04 -07:00
|
|
|
|
2012-08-01 18:20:12 -07:00
|
|
|
Feeds are still generated when this warning is displayed but may not validate.
|
2012-07-16 13:47:39 -07:00
|
|
|
|
2012-08-01 18:20:12 -07:00
|
|
|
My feeds are broken since I upgraded to Pelican 3.0
|
|
|
|
|
===================================================
|
2012-07-16 13:47:39 -07:00
|
|
|
|
2012-08-01 18:20:12 -07:00
|
|
|
Starting in 3.0, some of the FEED setting names were changed to more explicitly
|
|
|
|
|
refer to the Atom feeds they inherently represent (much like the FEED_RSS
|
|
|
|
|
setting names). Here is an exact list of the renamed setting names::
|
2012-07-16 13:47:39 -07:00
|
|
|
|
|
|
|
|
FEED -> FEED_ATOM
|
|
|
|
|
TAG_FEED -> TAG_FEED_ATOM
|
|
|
|
|
CATEGORY_FEED -> CATEGORY_FEED_ATOM
|
|
|
|
|
|
2012-08-01 18:20:12 -07:00
|
|
|
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+
|
|
|
|
|
by changing the relevant values in your template files. For an example of
|
|
|
|
|
complete feed headers and usage please check out the ``simple`` theme.
|