mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge branch 'master' of https://github.com/getpelican/pelican
This commit is contained in:
commit
8735350245
113 changed files with 887 additions and 361 deletions
|
|
@ -8,6 +8,8 @@ before_install:
|
|||
- sudo locale-gen fr_FR.UTF-8 tr_TR.UTF-8
|
||||
install:
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then ln -s /usr/share/asciidoc/asciidocapi.py ~/virtualenv/python2.7/lib/python2.7/site-packages/; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install typogrify ; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then pip install git+https://github.com/dmdm/typogrify.git@py3k#egg=typogrify; fi
|
||||
- pip install mock nose nose-cov Markdown
|
||||
- pip install .
|
||||
script: nosetests -sv --with-coverage --cover-package=pelican pelican
|
||||
|
|
|
|||
30
bumpr.rc
Normal file
30
bumpr.rc
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
[bumpr]
|
||||
file = pelican/__init__.py
|
||||
vcs = git
|
||||
clean =
|
||||
python setup.py clean
|
||||
rm -rf *egg-info build dist
|
||||
tests = python -m unittest discover
|
||||
publish = python setup.py sdist register upload
|
||||
files = README.rst
|
||||
|
||||
[bump]
|
||||
unsuffix = true
|
||||
message = Bump version {version}
|
||||
|
||||
[prepare]
|
||||
part = patch
|
||||
suffix = dev
|
||||
message = Prepare version {version} for next development cycle
|
||||
|
||||
[changelog]
|
||||
file = docs/changelog.rst
|
||||
separator = =
|
||||
bump = {version} ({date:%Y-%m-%d})
|
||||
prepare = Next release
|
||||
|
||||
[readthedoc]
|
||||
url = http://docs.getpelican.com/{tag}
|
||||
|
||||
[commands]
|
||||
bump = sed -i "" "s/last_stable\s*=.*/last_stable = '{version}'/" docs/conf.py
|
||||
|
|
@ -6,3 +6,6 @@ Markdown
|
|||
BeautifulSoup4
|
||||
lxml
|
||||
typogrify
|
||||
|
||||
# To perform release
|
||||
bumpr==0.2.0
|
||||
|
|
|
|||
|
|
@ -1,15 +1,35 @@
|
|||
Release history
|
||||
###############
|
||||
|
||||
3.3 (XXXX-XX-XX)
|
||||
================
|
||||
Next release
|
||||
============
|
||||
|
||||
- Nothing yet
|
||||
|
||||
3.3.0 (2013-09-24)
|
||||
==================
|
||||
|
||||
* Drop Python 3.2 support in favor of Python 3.3
|
||||
* Add ``Fabfile`` so Fabric can be used for workflow automation instead of Make
|
||||
* ``OUTPUT_RETENTION`` setting can be used to preserve metadata (e.g., VCS
|
||||
data such as ``.hg`` and ``.git``) from being removed from output directory
|
||||
* Tumblr import
|
||||
* Improve logic and consistency when cleaning output folder
|
||||
* Improve documentation versioning and release automation
|
||||
* Improve pagination flexibility
|
||||
* Rename signals for better consistency (some plugins may need to be updated)
|
||||
* Move metadata extraction from generators to readers; metadata extraction no
|
||||
longer article-specific
|
||||
* Deprecate ``FILES_TO_COPY`` in favor of ``STATIC_PATHS`` and
|
||||
``EXTRA_PATH_METADATA``
|
||||
* Add support for |tag| and |category| relative links.
|
||||
* Summaries in Markdown posts no longer include footnotes
|
||||
* Remove unnecessary whitespace in output via ``lstrip_blocks`` Jinja parameter
|
||||
* Move PDF generation from core to plugin
|
||||
* Replace ``MARKUP`` setting with ``READERS``
|
||||
* Add warning if img tag is missing ``alt`` attribute
|
||||
* Add support for ``{}`` in relative links syntax, besides ``||``
|
||||
* Add support for ``{tag}`` and ``{category}`` relative links
|
||||
* Add a ``content_written`` signal
|
||||
|
||||
3.2.1 and 3.2.2
|
||||
===============
|
||||
|
|
|
|||
16
docs/conf.py
16
docs/conf.py
|
|
@ -4,18 +4,26 @@ import sys, os
|
|||
|
||||
sys.path.append(os.path.abspath(os.pardir))
|
||||
|
||||
from pelican import __version__, __major__
|
||||
from pelican import __version__
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
templates_path = ['_templates']
|
||||
extensions = ['sphinx.ext.autodoc',]
|
||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.ifconfig', 'sphinx.ext.extlinks']
|
||||
source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
project = 'Pelican'
|
||||
copyright = '2010, Alexis Metaireau and contributors'
|
||||
exclude_patterns = ['_build']
|
||||
version = __version__
|
||||
release = __major__
|
||||
release = __version__
|
||||
version = '.'.join(release.split('.')[:1])
|
||||
last_stable = '3.2.2'
|
||||
rst_prolog = '''
|
||||
.. |last_stable| replace:: :pelican-doc:`{0}`
|
||||
'''.format(last_stable)
|
||||
|
||||
extlinks = {
|
||||
'pelican-doc': ('http://docs.getpelican.com/%s/', '')
|
||||
}
|
||||
|
||||
# -- Options for HTML output ---------------------------------------------------
|
||||
|
||||
|
|
|
|||
21
docs/faq.rst
21
docs/faq.rst
|
|
@ -23,8 +23,8 @@ How can I help?
|
|||
There are several ways to help out. First, you can report any Pelican
|
||||
suggestions or problems you might have via IRC or the `issue tracker
|
||||
<https://github.com/getpelican/pelican/issues>`_. If submitting an issue
|
||||
report, please check the existing issue list first in order to avoid submitting
|
||||
a duplicate issue.
|
||||
report, please first check the existing issue list (both open and closed) in
|
||||
order to avoid submitting a duplicate issue.
|
||||
|
||||
If you want to contribute, please fork `the git repository
|
||||
<https://github.com/getpelican/pelican/>`_, create a new feature branch, make
|
||||
|
|
@ -49,7 +49,7 @@ themes to style code syntax highlighting via CSS. Specifically, you can
|
|||
customize the appearance of your syntax highlighting via the ``.highlight pre``
|
||||
class in your theme's CSS file. To see how various styles can be used to render
|
||||
Django code, for example, use the style selector drop-down at top-right on the
|
||||
`Pygments project demo site <http://pygments.org/demo/15101/>`_.
|
||||
`Pygments project demo site <http://pygments.org/demo/>`_.
|
||||
|
||||
You can use the following example commands to generate a starting CSS file from
|
||||
a Pygments built-in style (in this case, "monokai") and then copy the generated
|
||||
|
|
@ -96,7 +96,8 @@ This metadata can then be accessed in templates such as ``article.html`` via::
|
|||
Last modified: {{ article.modified }}
|
||||
{% endif %}
|
||||
|
||||
If you want to include metadata in templates outside the article context (e.g., ``base.html``), the ``if`` statement should instead be:
|
||||
If you want to include metadata in templates outside the article context (e.g.,
|
||||
``base.html``), the ``if`` statement should instead be::
|
||||
|
||||
{% if article and article.modified %}
|
||||
|
||||
|
|
@ -191,3 +192,15 @@ Older themes that referenced the old setting names may not link properly.
|
|||
In order to rectify this, please update your theme for compatibility by changing
|
||||
the relevant values in your template files. For an example of complete feed
|
||||
headers and usage please check out the ``simple`` theme.
|
||||
|
||||
Is Pelican only suitable for blogs?
|
||||
===================================
|
||||
|
||||
No. Pelican can be easily configured to create and maintain any type of static site.
|
||||
This may require a little customization of your theme and Pelican configuration.
|
||||
For example, if you are building a launch site for your product and do not need
|
||||
tags on your site, you could remove the relevant HTML code from your theme.
|
||||
You can also disable generation of tag-related pages via::
|
||||
|
||||
TAGS_SAVE_AS = ''
|
||||
TAG_SAVE_AS = ''
|
||||
|
|
|
|||
|
|
@ -83,15 +83,20 @@ Viewing the generated files
|
|||
---------------------------
|
||||
|
||||
The files generated by Pelican are static files, so you don't actually need
|
||||
anything special to view them. You can either use your browser to open the
|
||||
files on your disk::
|
||||
anything special to view them. You can use your browser to open the generated
|
||||
HTML files directly::
|
||||
|
||||
firefox output/index.html
|
||||
|
||||
Or run a simple web server using Python::
|
||||
Because the above method may have trouble locating your CSS and other linked
|
||||
assets, running a simple web server using Python will often provide a more
|
||||
reliable previewing experience::
|
||||
|
||||
cd output && python -m SimpleHTTPServer
|
||||
|
||||
Once the ``SimpleHTTPServer`` has been started, you can preview your site at
|
||||
http://localhost:8000/
|
||||
|
||||
Upgrading
|
||||
---------
|
||||
|
||||
|
|
@ -390,6 +395,8 @@ If you want to exclude any pages from being linked to or listed in the menu
|
|||
then add a ``status: hidden`` attribute to its metadata. This is useful for
|
||||
things like making error pages that fit the generated theme of your site.
|
||||
|
||||
.. _ref-linking-to-internal-content:
|
||||
|
||||
Linking to internal content
|
||||
---------------------------
|
||||
|
||||
|
|
@ -400,7 +407,7 @@ and images that may be sitting alongside the current post (instead of having
|
|||
to determine where those resources will be placed after site generation).
|
||||
|
||||
To link to internal content (files in the ``content`` directory), use the
|
||||
following syntax: ``|filename|path/to/file``::
|
||||
following syntax: ``{filename}path/to/file``::
|
||||
|
||||
|
||||
website/
|
||||
|
|
@ -421,8 +428,8 @@ In this example, ``article1.rst`` could look like::
|
|||
|
||||
See below intra-site link examples in reStructuredText format.
|
||||
|
||||
`a link relative to content root <|filename|/cat/article2.rst>`_
|
||||
`a link relative to current file <|filename|cat/article2.rst>`_
|
||||
`a link relative to content root <{filename}/cat/article2.rst>`_
|
||||
`a link relative to current file <{filename}cat/article2.rst>`_
|
||||
|
||||
and ``article2.md``::
|
||||
|
||||
|
|
@ -431,8 +438,8 @@ and ``article2.md``::
|
|||
|
||||
See below intra-site link examples in Markdown format.
|
||||
|
||||
[a link relative to content root](|filename|/article1.md)
|
||||
[a link relative to current file](|filename|../article1.md)
|
||||
[a link relative to content root]({filename}/article1.md)
|
||||
[a link relative to current file]({filename}../article1.md)
|
||||
|
||||
Embedding non-article or non-page content is slightly different in that the
|
||||
directories need to be specified in ``pelicanconf.py`` file. The ``images``
|
||||
|
|
@ -447,21 +454,27 @@ manually::
|
|||
|
||||
And ``image-test.md`` would include::
|
||||
|
||||

|
||||

|
||||
|
||||
Any content can be linked in this way. What happens is that the ``images``
|
||||
directory gets copied to ``output/static/`` upon publishing. This is
|
||||
because ``images`` is in the ``settings["STATIC_PATHS"]`` list by default. If
|
||||
you want to have another directory, say ``pdfs`` you would need to add the
|
||||
following to ``pelicanconf.py``::
|
||||
directory gets copied to ``output/`` during site generation because Pelican
|
||||
includes ``images`` in the ``STATIC_PATHS`` setting's list by default. If
|
||||
you want to have another directory, say ``pdfs``, copied from your content to
|
||||
your output during site generation, you would need to add the following to
|
||||
your settings file::
|
||||
|
||||
STATIC_PATHS = ['images', 'pdfs']
|
||||
|
||||
And then the ``pdfs`` directory would also be copied to ``output/static/``.
|
||||
After the above line has been added, subsequent site generation should copy the
|
||||
``content/pdfs/`` directory to ``output/pdfs/``.
|
||||
|
||||
You can also link to categories or tags, using the `|tag|tagname` and
|
||||
`|category|foobar` syntax.
|
||||
You can also link to categories or tags, using the ``{tag}tagname`` and
|
||||
``{category}foobar`` syntax.
|
||||
|
||||
For backward compatibility, Pelican also supports bars (``||``) in addition to
|
||||
curly braces (``{}``). For example: ``|filename|an_article.rst``,
|
||||
``|tag|tagname``, ``|category|foobar``. The syntax was changed from ``||`` to
|
||||
``{}`` to avoid collision with Markdown extensions or reST directives.
|
||||
|
||||
Importing an existing blog
|
||||
--------------------------
|
||||
|
|
@ -524,6 +537,9 @@ which posts are translations::
|
|||
|
||||
That's true, foobar is still alive!
|
||||
|
||||
|
||||
.. _internal_pygments_options:
|
||||
|
||||
Syntax highlighting
|
||||
-------------------
|
||||
|
||||
|
|
@ -547,13 +563,72 @@ indenting both the identifier and code::
|
|||
The specified identifier (e.g. ``python``, ``ruby``) should be one that
|
||||
appears on the `list of available lexers <http://pygments.org/docs/lexers/>`_.
|
||||
|
||||
When using reStructuredText the following options are available in the
|
||||
code-block directive:
|
||||
|
||||
============= ============ =========================================
|
||||
Option Valid values Description
|
||||
============= ============ =========================================
|
||||
anchorlinenos N/A If present wrap line numbers in <a> tags.
|
||||
classprefix string String to prepend to token class names
|
||||
hl_lines numbers List of lines to be highlighted.
|
||||
lineanchors string Wrap each line in an anchor using this
|
||||
string and -linenumber.
|
||||
linenos string If present or set to "table" output line
|
||||
numbers in a table, if set to
|
||||
"inline" output them inline. "none" means
|
||||
do not output the line numbers for this
|
||||
table.
|
||||
linenospecial number If set every nth line will be given the
|
||||
'special' css class.
|
||||
linenostart number Line number for the first line.
|
||||
linenostep number Print every nth line number.
|
||||
lineseparator string String to print between lines of code,
|
||||
'\n' by default.
|
||||
linespans string Wrap each line in a span using this and
|
||||
-linenumber.
|
||||
nobackground N/A If set do not output background color for
|
||||
the wrapping element
|
||||
nowrap N/A If set do not wrap the tokens at all.
|
||||
tagsfile string ctags file to use for name definitions.
|
||||
tagurlformat string format for the ctag links.
|
||||
============= ============ =========================================
|
||||
|
||||
Note that, depending on the version, your Pygments module might not have
|
||||
all of these options available. Refer to the *HtmlFormatter* section of the
|
||||
`Pygments documentation <http://pygments.org/docs/formatters/>`_ for more
|
||||
details on each of the options.
|
||||
|
||||
For example, the following code block enables line numbers, starting at 153,
|
||||
and prefixes the Pygments CSS classes with *pgcss* to make the names
|
||||
more unique and avoid possible CSS conflicts::
|
||||
|
||||
.. code-block:: identifier
|
||||
:classprefix: pgcss
|
||||
:linenos: table
|
||||
:linenostart: 153
|
||||
|
||||
<indented code block goes here>
|
||||
|
||||
It is also possible to specify the ``PYGMENTS_RST_OPTIONS`` variable in your
|
||||
Pelican settings file to include options that will be automatically applied to
|
||||
every code block.
|
||||
|
||||
For example, if you want to have line numbers displayed for every code block
|
||||
and a CSS prefix you would set this variable to::
|
||||
|
||||
PYGMENTS_RST_OPTIONS = {'classprefix': 'pgcss', 'linenos': 'table'}
|
||||
|
||||
If specified, settings for individual code blocks will override the defaults in
|
||||
your settings file.
|
||||
|
||||
Publishing drafts
|
||||
-----------------
|
||||
|
||||
If you want to publish an article as a draft (for friends to review before
|
||||
publishing, for example), you can add a ``status: draft`` attribute to its
|
||||
publishing, for example), you can add a ``Status: draft`` attribute to its
|
||||
metadata. That article will then be output to the ``drafts`` folder and not
|
||||
listed on the index page nor on any category page.
|
||||
listed on the index page nor on any category or tag page.
|
||||
|
||||
.. _virtualenv: http://www.virtualenv.org/
|
||||
.. _W3C ISO 8601: http://www.w3.org/TR/NOTE-datetime
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
Pelican
|
||||
=======
|
||||
Pelican |release|
|
||||
=================
|
||||
|
||||
|
||||
.. ifconfig:: release.endswith('.dev')
|
||||
|
||||
.. warning::
|
||||
|
||||
This documentation is for the version of Pelican currently under development.
|
||||
Were you looking for version |last_stable| documentation?
|
||||
|
||||
|
||||
Pelican is a static site generator, written in Python_.
|
||||
|
||||
|
|
@ -12,7 +21,7 @@ Pelican is a static site generator, written in Python_.
|
|||
Features
|
||||
--------
|
||||
|
||||
Pelican currently supports:
|
||||
Pelican |version| currently supports:
|
||||
|
||||
* Articles (e.g., blog posts) and pages (e.g., "About", "Projects", "Contact")
|
||||
* Comments, via an external service (Disqus). (Please note that while
|
||||
|
|
@ -42,9 +51,13 @@ If you want to see new features in Pelican, don't hesitate to offer suggestions,
|
|||
clone the repository, etc. There are many ways to :doc:`contribute<contribute>`.
|
||||
That's open source, dude!
|
||||
|
||||
Send a message to "authors at getpelican dot com" with any requests/feedback! You
|
||||
can also join the team at `#pelican on Freenode`_ (or if you don't have an IRC
|
||||
client handy, use the webchat_ for quick feedback.
|
||||
Send a message to "authors at getpelican dot com" with any requests/feedback.
|
||||
For a more immediate response, you can also join the team via IRC at
|
||||
`#pelican on Freenode`_ — if you don't have an IRC client handy, use the
|
||||
webchat_ for quick feedback. If you ask a question via IRC and don't get an
|
||||
immediate response, don't leave the channel! It may take a few hours because
|
||||
of time zone differences, but f you are patient and remain in the channel,
|
||||
someone will almost always respond to your inquiry.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
|
|
|||
|
|
@ -135,15 +135,15 @@ shared in the documentation somewhere, so here they are!
|
|||
How to create a new reader
|
||||
--------------------------
|
||||
|
||||
One thing you might want is to add the support for your very own input
|
||||
format. While it might make sense to add this feature in pelican core, we
|
||||
wisely chose to avoid this situation, and have the different readers defined in
|
||||
plugins.
|
||||
One thing you might want is to add support for your very own input format.
|
||||
While it might make sense to add this feature in Pelican core, we
|
||||
wisely chose to avoid this situation and instead have the different readers
|
||||
defined via plugins.
|
||||
|
||||
The rationale behind this choice is mainly that plugins are really easy to
|
||||
write and don't slow down pelican itself when they're not active.
|
||||
write and don't slow down Pelican itself when they're not active.
|
||||
|
||||
No more talking, here is the example::
|
||||
No more talking — here is an example::
|
||||
|
||||
from pelican import signals
|
||||
from pelican.readers import BaseReader
|
||||
|
|
@ -153,7 +153,7 @@ No more talking, here is the example::
|
|||
enabled = True # Yeah, you probably want that :-)
|
||||
|
||||
# The list of file extensions you want this reader to match with.
|
||||
# In the case multiple readers use the same extensions, the latest will
|
||||
# If multiple readers were to use the same extension, the latest will
|
||||
# win (so the one you're defining here, most probably).
|
||||
file_extensions = ['yeah']
|
||||
|
||||
|
|
@ -173,7 +173,7 @@ No more talking, here is the example::
|
|||
def add_reader(readers):
|
||||
readers.reader_classes['yeah'] = NewReader
|
||||
|
||||
# this is how pelican works.
|
||||
# This is how pelican works.
|
||||
def register():
|
||||
signals.readers_init.connect(add_reader)
|
||||
|
||||
|
|
|
|||
|
|
@ -84,10 +84,10 @@ Setting name (default value) What doe
|
|||
here or a single string representing one locale.
|
||||
When providing a list, all the locales will be tried
|
||||
until one works.
|
||||
`READERS` (``{}``) A dict of file extensions / Reader classes to overwrite or
|
||||
add file readers. for instance, to avoid processing .html files:
|
||||
``READERS = {'html': None}``. Or to add a custom reader for the
|
||||
`foo` extension: ``READERS = {'foo': FooReader}``
|
||||
`READERS` (``{}``) A dictionary of file extensions / Reader classes for Pelican to
|
||||
process or ignore. For example, to avoid processing .html files,
|
||||
set: ``READERS = {'html': None}``. To add a custom reader for the
|
||||
`foo` extension, set: ``READERS = {'foo': FooReader}``
|
||||
`IGNORE_FILES` (``['.#*']``) A list of file globbing patterns to match against the
|
||||
source files to be ignored by the processor. For example,
|
||||
the default ``['.#*']`` will ignore emacs lock files.
|
||||
|
|
@ -106,11 +106,9 @@ Setting name (default value) What doe
|
|||
`PAGE_EXCLUDES` (``()``) A list of directories to exclude when looking for pages.
|
||||
`ARTICLE_DIR` (``''``) Directory to look at for articles, relative to `PATH`.
|
||||
`ARTICLE_EXCLUDES`: (``('pages',)``) A list of directories to exclude when looking for articles.
|
||||
`PDF_GENERATOR` (``False``) Set to ``True`` if you want PDF versions of your documents to be.
|
||||
generated. You will need to install ``rst2pdf``.
|
||||
`OUTPUT_SOURCES` (``False``) Set to True if you want to copy the articles and pages in their
|
||||
original format (e.g. Markdown or reStructuredText) to the
|
||||
specified OUTPUT_PATH.
|
||||
specified ``OUTPUT_PATH``.
|
||||
`OUTPUT_SOURCES_EXTENSION` (``.text``) Controls the extension that will be used by the SourcesGenerator.
|
||||
Defaults to ``.text``. If not a valid string the default value
|
||||
will be used.
|
||||
|
|
@ -144,7 +142,7 @@ Setting name (default value) What doe
|
|||
are not needed, set ``DIRECT_TEMPLATES = ('index', 'archives')``
|
||||
`PAGINATED_DIRECT_TEMPLATES` (``('index',)``) Provides the direct templates that should be paginated.
|
||||
`SUMMARY_MAX_LENGTH` (``50``) When creating a short summary of an article, this will
|
||||
be the default length in words of the text created.
|
||||
be the default length (measured in words) of the text created.
|
||||
This only applies if your content does not otherwise
|
||||
specify a summary. Setting to ``None`` will cause the summary
|
||||
to be a copy of the original content.
|
||||
|
|
@ -155,7 +153,15 @@ Setting name (default value) What doe
|
|||
`ASCIIDOC_OPTIONS` (``[]``) A list of options to pass to AsciiDoc. See the `manpage
|
||||
<http://www.methods.co.nz/asciidoc/manpage.html>`_
|
||||
`WITH_FUTURE_DATES` (``True``) If disabled, content with dates in the future will get a
|
||||
default status of draft.
|
||||
default status of ``draft``.
|
||||
`INTRASITE_LINK_REGEX` (``'[{|](?P<what>.*?)[|}]'``) Regular expression that is used to parse internal links.
|
||||
Default syntax of links to internal files, tags, etc., is
|
||||
to enclose the identifier, say ``filename``, in ``{}`` or ``||``.
|
||||
Identifier between ``{`` and ``}`` goes into the ``what`` capturing group.
|
||||
For details see :ref:`ref-linking-to-internal-content`.
|
||||
`PYGMENTS_RST_OPTIONS` (``[]``) A list of default Pygments settings for your reStructuredText
|
||||
code blocks. See :ref:`internal_pygments_options` for a list of
|
||||
supported options.
|
||||
===================================================================== =====================================================================
|
||||
|
||||
.. [#] Default is the system locale.
|
||||
|
|
@ -165,7 +171,7 @@ URL settings
|
|||
------------
|
||||
|
||||
The first thing to understand is that there are currently two supported methods
|
||||
for URL formation: *relative* and *absolute*. Document-relative URLs are useful
|
||||
for URL formation: *relative* and *absolute*. Relative URLs are useful
|
||||
when testing locally, and absolute URLs are reliable and most useful when
|
||||
publishing. One method of supporting both is to have one Pelican configuration
|
||||
file for local development and another for publishing. To see an example of this
|
||||
|
|
@ -173,16 +179,17 @@ type of setup, use the ``pelican-quickstart`` script as described at the top of
|
|||
the :doc:`Getting Started <getting_started>` page, which will produce two separate
|
||||
configuration files for local development and publishing, respectively.
|
||||
|
||||
You can customize the URLs and locations where files will be saved. The URLs and
|
||||
SAVE_AS variables use Python's format strings. These variables allow you to place
|
||||
your articles in a location such as ``{slug}/index.html`` and link to them as
|
||||
``{slug}`` for clean URLs. These settings give you the flexibility to place your
|
||||
articles and pages anywhere you want.
|
||||
You can customize the URLs and locations where files will be saved. The
|
||||
``*_URL`` and ``*_SAVE_AS`` variables use Python's format strings. These
|
||||
variables allow you to place your articles in a location such as
|
||||
``{slug}/index.html`` and link to them as ``{slug}`` for clean URLs. These
|
||||
settings give you the flexibility to place your articles and pages anywhere you
|
||||
want.
|
||||
|
||||
.. note::
|
||||
If you specify a datetime directive, it will be substituted using the
|
||||
If you specify a ``datetime`` directive, it will be substituted using the
|
||||
input files' date metadata attribute. If the date is not specified for a
|
||||
particular file, Pelican will rely on the file's mtime timestamp.
|
||||
particular file, Pelican will rely on the file's ``mtime`` timestamp.
|
||||
|
||||
Check the Python datetime documentation at http://bit.ly/cNcJUC for more
|
||||
information.
|
||||
|
|
@ -205,7 +212,7 @@ and the URL to this would be ``/posts/2011/Aug/07/sample-post/``.
|
|||
|
||||
Pelican can optionally create per-year, per-month, and per-day archives of your
|
||||
posts. These secondary archives are disabled by default but are automatically
|
||||
enabled if you supply format strings for their respective `_SAVE_AS` settings.
|
||||
enabled if you supply format strings for their respective ``_SAVE_AS`` settings.
|
||||
Period archives fit intuitively with the hierarchical model of web URLs and can
|
||||
make it easier for readers to navigate through the posts you've written over time.
|
||||
|
||||
|
|
@ -214,12 +221,12 @@ Example usage:
|
|||
* YEAR_ARCHIVE_SAVE_AS = ``'posts/{date:%Y}/index.html'``
|
||||
* MONTH_ARCHIVE_SAVE_AS = ``'posts/{date:%Y}/{date:%b}/index.html'``
|
||||
|
||||
With these settings, Pelican will create an archive of all your posts for the year
|
||||
at (for instance) 'posts/2011/index.html', and an archive of all your posts for
|
||||
the month at 'posts/2011/Aug/index.html'.
|
||||
With these settings, Pelican will create an archive of all your posts for the
|
||||
year at (for instance) ``posts/2011/index.html`` and an archive of all your
|
||||
posts for the month at ``posts/2011/Aug/index.html``.
|
||||
|
||||
.. note::
|
||||
Period archives work best when the final path segment is 'index.html'.
|
||||
Period archives work best when the final path segment is ``index.html``.
|
||||
This way a reader can remove a portion of your URL and automatically
|
||||
arrive at an appropriate archive of posts, without having to specify
|
||||
a page name.
|
||||
|
|
@ -271,7 +278,7 @@ Setting name (default value) What does it do?
|
|||
|
||||
If you do not want one or more of the default pages to be created (e.g.,
|
||||
you are the only author on your site and thus do not need an Authors page),
|
||||
set the corresponding ``*_SAVE_AS`` setting to ``False`` to prevent the
|
||||
set the corresponding ``*_SAVE_AS`` setting to ``None`` to prevent the
|
||||
relevant page from being generated.
|
||||
|
||||
Timezone
|
||||
|
|
@ -291,10 +298,11 @@ Have a look at `the wikipedia page`_ to get a list of valid timezone values.
|
|||
Date format and locale
|
||||
----------------------
|
||||
|
||||
If no DATE_FORMATS are set, Pelican will fall back to DEFAULT_DATE_FORMAT. If
|
||||
you need to maintain multiple languages with different date formats, you can
|
||||
set this dict using the language name (``lang`` metadata in your post content)
|
||||
as the key. Regarding available format codes, see `strftime document of python`_ :
|
||||
If no ``DATE_FORMATS`` are set, Pelican will fall back to
|
||||
``DEFAULT_DATE_FORMAT``. If you need to maintain multiple languages with
|
||||
different date formats, you can set the ``DATE_FORMATS`` dictionary using the
|
||||
language name (``lang`` metadata in your post content) as the key. Regarding
|
||||
available format codes, see `strftime document of python`_ :
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
|
|
@ -312,8 +320,8 @@ You can set locale to further control date format:
|
|||
)
|
||||
|
||||
Also, it is possible to set different locale settings for each language. If you
|
||||
put (locale, format) tuples in the dict, this will override the LOCALE setting
|
||||
above:
|
||||
put (locale, format) tuples in the dict, this will override the ``LOCALE``
|
||||
setting above:
|
||||
|
||||
.. parsed-literal::
|
||||
# On Unix/Linux
|
||||
|
|
@ -465,9 +473,9 @@ Pagination
|
|||
==========
|
||||
|
||||
The default behaviour of Pelican is to list all the article titles along
|
||||
with a short description on the index page. While it works pretty well
|
||||
for small-to-medium blogs, for sites with large quantity of articles it would
|
||||
be convenient to have a way to paginate the list.
|
||||
with a short description on the index page. While this works well for
|
||||
small-to-medium sites, sites with a large quantity of articles will probably
|
||||
benefit from paginating this list.
|
||||
|
||||
You can use the following settings to configure the pagination.
|
||||
|
||||
|
|
@ -475,8 +483,8 @@ You can use the following settings to configure the pagination.
|
|||
Setting name (default value) What does it do?
|
||||
================================================ =====================================================
|
||||
`DEFAULT_ORPHANS` (``0``) The minimum number of articles allowed on the
|
||||
last page. Use this when you don't want to
|
||||
have a last page with very few articles.
|
||||
last page. Use this when you don't want the last page
|
||||
to only contain a handful of articles.
|
||||
`DEFAULT_PAGINATION` (``False``) The maximum number of articles to include on a
|
||||
page, not including orphans. False to disable
|
||||
pagination.
|
||||
|
|
@ -526,7 +534,7 @@ Setting name (default value) What does it do?
|
|||
`TAG_CLOUD_MAX_ITEMS` (``100``) Maximum number of tags in the cloud.
|
||||
================================================ =====================================================
|
||||
|
||||
The default theme does not include a tag cloud, but it is pretty easy to add::
|
||||
The default theme does not include a tag cloud, but it is pretty easy to add one::
|
||||
|
||||
<ul class="tagcloud">
|
||||
{% for tag in tag_cloud %}
|
||||
|
|
@ -534,9 +542,10 @@ The default theme does not include a tag cloud, but it is pretty easy to add::
|
|||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
You should then also define CSS styles with appropriate classes (tag-0 to tag-N, where
|
||||
N matches `TAG_CLOUD_STEPS` -1), tag-0 being the most frequent, and define a ul.tagcloud
|
||||
class with appropriate list-style to create the cloud, for example::
|
||||
You should then also define CSS styles with appropriate classes (tag-0 to tag-N,
|
||||
where N matches ``TAG_CLOUD_STEPS`` -1), tag-0 being the most frequent, and
|
||||
define a ``ul.tagcloud`` class with appropriate list-style to create the cloud.
|
||||
For example::
|
||||
|
||||
ul.tagcloud {
|
||||
list-style: none;
|
||||
|
|
@ -603,7 +612,10 @@ Setting name (default value) What does it do?
|
|||
`THEME_STATIC_PATHS`. Default is `theme`.
|
||||
`THEME_STATIC_PATHS` (``['static']``) Static theme paths you want to copy. Default
|
||||
value is `static`, but if your theme has
|
||||
other static paths, you can put them here.
|
||||
other static paths, you can put them here. If files
|
||||
or directories with the same names are included in
|
||||
the paths defined in this settings, they will be
|
||||
progressively overwritten.
|
||||
`CSS_FILE` (``'main.css'``) Specify the CSS file you want to load.
|
||||
================================================ =====================================================
|
||||
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ To make your own theme, you must follow the following structure::
|
|||
└── tags.html // must list all the tags. Can be a tag cloud.
|
||||
|
||||
* `static` contains all the static assets, which will be copied to the output
|
||||
`theme` folder. I've put the CSS and image folders here, but they are
|
||||
just examples. Put what you need here.
|
||||
`theme` folder. The above filesystem layout includes CSS and image folders,
|
||||
but those are just examples. Put what you need here.
|
||||
|
||||
* `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
|
||||
you keep things organized while creating your theme.
|
||||
The template files listed above are mandatory; you can add your own templates
|
||||
if it helps you keep things organized while creating your theme.
|
||||
|
||||
Templates and variables
|
||||
=======================
|
||||
|
|
@ -44,8 +44,8 @@ The idea is to use a simple syntax that you can embed into your HTML pages.
|
|||
This document describes which templates should exist in a theme, and which
|
||||
variables will be passed to each template at generation time.
|
||||
|
||||
All templates will receive the variables defined in your settings file, if they
|
||||
are in all-caps. You can access them directly.
|
||||
All templates will receive the variables defined in your settings file, as long
|
||||
as they are in all-caps. You can access them directly.
|
||||
|
||||
Common variables
|
||||
----------------
|
||||
|
|
@ -58,19 +58,18 @@ Variable Description
|
|||
output_file The name of the file currently being generated. For
|
||||
instance, when Pelican is rendering the homepage,
|
||||
output_file will be "index.html".
|
||||
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
|
||||
access their attributes (e.g. title, summary, author
|
||||
etc.). Sometimes this is shadowed (for instance in
|
||||
the tags page). You will then find info about it
|
||||
in the `all_articles` variable.
|
||||
dates The same list of articles, but ordered by date,
|
||||
ascending
|
||||
ascending.
|
||||
tags A list of (tag, articles) tuples, containing all
|
||||
the tags.
|
||||
categories A list of (category, articles) tuples, containing
|
||||
all the categories.
|
||||
and the list of respective articles (values)
|
||||
all the categories and corresponding articles (values)
|
||||
pages The list of pages
|
||||
============= ===================================================
|
||||
|
||||
|
|
@ -91,9 +90,9 @@ __ http://jinja.pocoo.org/docs/templates/#sort
|
|||
Date Formatting
|
||||
---------------
|
||||
|
||||
Pelican formats the date with according to your settings and locale
|
||||
Pelican formats the date according to your settings and locale
|
||||
(``DATE_FORMATS``/``DEFAULT_DATE_FORMAT``) and provides a
|
||||
``locale_date`` attribute. On the other hand, ``date`` attribute will
|
||||
``locale_date`` attribute. On the other hand, the ``date`` attribute will
|
||||
be a `datetime`_ object. If you need custom formatting for a date
|
||||
different than your settings, use the Jinja filter ``strftime``
|
||||
that comes with Pelican. Usage is same as Python `strftime`_ format,
|
||||
|
|
|
|||
|
|
@ -15,16 +15,16 @@ Project Pages and User Pages.
|
|||
Project Pages
|
||||
-------------
|
||||
|
||||
To publish a Pelican site as Project Pages you need to *push* the content of
|
||||
To publish a Pelican site as a Project Page you need to *push* the content of
|
||||
the ``output`` dir generated by Pelican to a repository's ``gh-pages`` branch
|
||||
on GitHub.
|
||||
|
||||
The excellent `ghp-import <https://github.com/davisp/ghp-import>`_, which can
|
||||
be installed with ``easy_install`` or ``pip``, makes this process really easy.
|
||||
|
||||
For example, if the sources of your Pelican site are contained in a GitHub
|
||||
repository, and if you want to publish your Pelican site as Project Pages of
|
||||
this repository, you can then use the following::
|
||||
For example, if the source of your Pelican site is contained in a GitHub
|
||||
repository, and if you want to publish that Pelican site in the form of Project
|
||||
Pages to this repository, you can then use the following::
|
||||
|
||||
$ pelican content -o output -s pelicanconf.py
|
||||
$ ghp-import output
|
||||
|
|
@ -38,28 +38,28 @@ already exist). The ``git push origin gh-pages`` command updates the remote
|
|||
.. note::
|
||||
|
||||
The ``github`` target of the Makefile created by the ``pelican-quickstart``
|
||||
command publishes the Pelican site as Project Pages as described above.
|
||||
command publishes the Pelican site as Project Pages, as described above.
|
||||
|
||||
User Pages
|
||||
----------
|
||||
|
||||
To publish a Pelican site as User Pages you need to *push* the content of the
|
||||
``output`` dir generated by Pelican to the ``master`` branch of your
|
||||
``<username>.github.com`` repository on GitHub.
|
||||
To publish a Pelican site in the form of User Pages, you need to *push* the
|
||||
content of the ``output`` dir generated by Pelican to the ``master`` branch of
|
||||
your ``<username>.github.io`` repository on GitHub.
|
||||
|
||||
Again, you can take advantage of ``ghp-import``::
|
||||
|
||||
$ pelican content -o output -s pelicanconf.py
|
||||
$ ghp-import output
|
||||
$ git push git@github.com:elemoine/elemoine.github.com.git gh-pages:master
|
||||
$ git push git@github.com:elemoine/elemoine.github.io.git gh-pages:master
|
||||
|
||||
The ``git push`` command pushes the local ``gh-pages`` branch (freshly updated
|
||||
by the ``ghp-import`` command) to the ``elemoine.github.com`` repository's
|
||||
by the ``ghp-import`` command) to the ``elemoine.github.io`` repository's
|
||||
``master`` branch on GitHub.
|
||||
|
||||
.. note::
|
||||
|
||||
To publish your Pelican site as User Pages feel free to adjust the the
|
||||
To publish your Pelican site as User Pages, feel free to adjust the
|
||||
``github`` target of the Makefile.
|
||||
|
||||
Extra Tips
|
||||
|
|
@ -67,19 +67,30 @@ Extra Tips
|
|||
|
||||
Tip #1:
|
||||
|
||||
To automatically update your Pelican site on each commit you can create
|
||||
To automatically update your Pelican site on each commit, you can create
|
||||
a post-commit hook. For example, you can add the following to
|
||||
``.git/hooks/post-commit``::
|
||||
|
||||
pelican pelican content -o output -s pelicanconf.py && ghp-import output && git push origin gh-pages
|
||||
pelican content -o output -s pelicanconf.py && ghp-import output && git push origin gh-pages
|
||||
|
||||
Tip #2:
|
||||
|
||||
To use a `custom domain
|
||||
<https://help.github.com/articles/setting-up-a-custom-domain-with-pages>`_ with
|
||||
GitHub Pages you need to have a ``CNAME`` file at the root of your pages. For
|
||||
that you will add ``CNAME`` file to your ``content``, dir and use the
|
||||
``FILES_TO_COPY`` setting variable to tell Pelican to copy that file
|
||||
to the ``output`` dir. For example::
|
||||
GitHub Pages, you need to put the domain of your site (e.g.,
|
||||
``blog.example.com``) inside a ``CNAME`` file at the root of your site. To do
|
||||
this, create the ``content/extras/`` directory and add a ``CNAME`` file to it.
|
||||
Then use the ``STATIC_PATHS`` setting to tell Pelican to copy this file to your
|
||||
output directory. For example::
|
||||
|
||||
FILES_TO_COPY = (('extra/CNAME', 'CNAME'),)
|
||||
STATIC_PATHS = ['images', 'extra/CNAME']
|
||||
EXTRA_PATH_METADATA = {'extra/CNAME': {'path': 'CNAME'},}
|
||||
|
||||
How to add YouTube or Vimeo Videos
|
||||
==================================
|
||||
|
||||
The easiest way is to paste the embed code of the video from these sites
|
||||
directly into your source content.
|
||||
|
||||
Alternatively, you can also use Pelican plugins like ``liquid_tags``,
|
||||
``pelican_youtube``, or ``pelican_vimeo`` to embed videos in your content.
|
||||
|
|
|
|||
|
|
@ -22,10 +22,7 @@ from pelican.settings import read_settings
|
|||
from pelican.utils import clean_output_dir, folder_watcher, file_watcher
|
||||
from pelican.writers import Writer
|
||||
|
||||
__major__ = 3
|
||||
__minor__ = 2
|
||||
__micro__ = 0
|
||||
__version__ = "{0}.{1}.{2}".format(__major__, __minor__, __micro__)
|
||||
__version__ = "3.3.1.dev"
|
||||
|
||||
DEFAULT_CONFIG_NAME = 'pelicanconf.py'
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@ import os
|
|||
import re
|
||||
import sys
|
||||
|
||||
try:
|
||||
from urlparse import urlparse, urlunparse
|
||||
except ImportError:
|
||||
from urllib.parse import urlparse, urlunparse
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
|
|
@ -182,44 +187,48 @@ class Content(object):
|
|||
if not content:
|
||||
return content
|
||||
|
||||
hrefs = re.compile(r"""
|
||||
instrasite_link_regex = self.settings['INTRASITE_LINK_REGEX']
|
||||
regex = r"""
|
||||
(?P<markup><\s*[^\>]* # match tag with src and href attr
|
||||
(?:href|src)\s*=)
|
||||
|
||||
(?P<quote>["\']) # require value to be quoted
|
||||
(?P<path>\|(?P<what>.*?)\|(?P<value>.*?)) # the url value
|
||||
\2""", re.X)
|
||||
(?P<path>{0}(?P<value>.*?)) # the url value
|
||||
\2""".format(instrasite_link_regex)
|
||||
hrefs = re.compile(regex, re.X)
|
||||
|
||||
def replacer(m):
|
||||
what = m.group('what')
|
||||
value = m.group('value')
|
||||
value = urlparse(m.group('value'))
|
||||
path = value.path
|
||||
origin = m.group('path')
|
||||
|
||||
# we support only filename for now. the plan is to support
|
||||
# categories, tags, etc. in the future, but let's keep things
|
||||
# simple for now.
|
||||
|
||||
# XXX Put this in a different location.
|
||||
if what == 'filename':
|
||||
if value.startswith('/'):
|
||||
value = value[1:]
|
||||
if path.startswith('/'):
|
||||
path = path[1:]
|
||||
else:
|
||||
# relative to the source path of this content
|
||||
value = self.get_relative_source_path(
|
||||
os.path.join(self.relative_dir, value)
|
||||
path = self.get_relative_source_path(
|
||||
os.path.join(self.relative_dir, path)
|
||||
)
|
||||
|
||||
if value in self._context['filenames']:
|
||||
if path in self._context['filenames']:
|
||||
origin = '/'.join((siteurl,
|
||||
self._context['filenames'][value].url))
|
||||
origin = origin.replace('\\', '/') # Fow windows paths.
|
||||
self._context['filenames'][path].url))
|
||||
origin = origin.replace('\\', '/') # for Windows paths.
|
||||
else:
|
||||
logger.warning("Unable to find {fn}, skipping url"
|
||||
" replacement".format(fn=value))
|
||||
" replacement".format(fn=path))
|
||||
elif what == 'category':
|
||||
origin = Category(value, self.settings).url
|
||||
origin = Category(path, self.settings).url
|
||||
elif what == 'tag':
|
||||
origin = Tag(value, self.settings).url
|
||||
origin = Tag(path, self.settings).url
|
||||
|
||||
# keep all other parts, such as query, fragment, etc.
|
||||
parts = list(value)
|
||||
parts[2] = origin
|
||||
origin = urlunparse(parts)
|
||||
|
||||
return ''.join((m.group('markup'), m.group('quote'), origin,
|
||||
m.group('quote')))
|
||||
|
|
|
|||
|
|
@ -544,7 +544,7 @@ class StaticGenerator(Generator):
|
|||
"""Copy all the paths from source to destination"""
|
||||
for path in paths:
|
||||
copy(path, source, os.path.join(output_path, destination),
|
||||
final_path, overwrite=True)
|
||||
final_path)
|
||||
|
||||
def generate_context(self):
|
||||
self.staticfiles = []
|
||||
|
|
|
|||
|
|
@ -188,8 +188,9 @@ class MarkdownReader(BaseReader):
|
|||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(MarkdownReader, self).__init__(*args, **kwargs)
|
||||
self.extensions = self.settings['MD_EXTENSIONS']
|
||||
self.extensions.append('meta')
|
||||
self.extensions = list(self.settings['MD_EXTENSIONS'])
|
||||
if 'meta' not in self.extensions:
|
||||
self.extensions.append('meta')
|
||||
|
||||
def _parse_metadata(self, meta):
|
||||
"""Return the dict containing document metadata"""
|
||||
|
|
@ -405,11 +406,6 @@ class Readers(object):
|
|||
|
||||
self.readers[fmt] = reader_class(self.settings)
|
||||
|
||||
settings_key = '%s_EXTENSIONS' % fmt.upper()
|
||||
|
||||
if settings_key in self.settings:
|
||||
self.readers[fmt].extensions = self.settings[settings_key]
|
||||
|
||||
@property
|
||||
def extensions(self):
|
||||
return self.readers.keys()
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ from pygments.formatters import HtmlFormatter
|
|||
from pygments import highlight
|
||||
from pygments.lexers import get_lexer_by_name, TextLexer
|
||||
import re
|
||||
import six
|
||||
import pelican.settings as pys
|
||||
|
||||
|
||||
class Pygments(Directive):
|
||||
|
|
@ -41,9 +43,19 @@ class Pygments(Directive):
|
|||
# no lexer found - use the text one instead of an exception
|
||||
lexer = TextLexer()
|
||||
|
||||
# Fetch the defaults
|
||||
if pys.PYGMENTS_RST_OPTIONS is not None:
|
||||
for k, v in six.iteritems(pys.PYGMENTS_RST_OPTIONS):
|
||||
# Locally set options overrides the defaults
|
||||
if k not in self.options:
|
||||
self.options[k] = v
|
||||
|
||||
if ('linenos' in self.options and
|
||||
self.options['linenos'] not in ('table', 'inline')):
|
||||
self.options['linenos'] = 'table'
|
||||
if self.options['linenos'] == 'none':
|
||||
self.options.pop('linenos')
|
||||
else:
|
||||
self.options['linenos'] = 'table'
|
||||
|
||||
for flag in ('nowrap', 'nobackground', 'anchorlinenos'):
|
||||
if flag in self.options:
|
||||
|
|
|
|||
|
|
@ -108,11 +108,15 @@ DEFAULT_CONFIG = {
|
|||
'SUMMARY_MAX_LENGTH': 50,
|
||||
'PLUGIN_PATH': '',
|
||||
'PLUGINS': [],
|
||||
'PYGMENTS_RST_OPTIONS': {},
|
||||
'TEMPLATE_PAGES': {},
|
||||
'IGNORE_FILES': ['.#*'],
|
||||
'SLUG_SUBSTITUTIONS': (),
|
||||
'INTRASITE_LINK_REGEX': '[{|](?P<what>.*?)[|}]',
|
||||
}
|
||||
|
||||
PYGMENTS_RST_OPTIONS = None
|
||||
|
||||
|
||||
def read_settings(path=None, override=None):
|
||||
if path:
|
||||
|
|
@ -131,7 +135,14 @@ def read_settings(path=None, override=None):
|
|||
if override:
|
||||
local_settings.update(override)
|
||||
|
||||
return configure_settings(local_settings)
|
||||
parsed_settings = configure_settings(local_settings)
|
||||
# This is because there doesn't seem to be a way to pass extra
|
||||
# parameters to docutils directive handlers, so we have to have a
|
||||
# variable here that we'll import from within Pygments.run (see
|
||||
# rstdirectives.py) to see what the user defaults were.
|
||||
global PYGMENTS_RST_OPTIONS
|
||||
PYGMENTS_RST_OPTIONS = parsed_settings.get('PYGMENTS_RST_OPTIONS', None)
|
||||
return parsed_settings
|
||||
|
||||
|
||||
def get_settings_from_module(module=None, default_settings=DEFAULT_CONFIG):
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Article title
|
||||
#############
|
||||
|
||||
This is some content. With some stuff to "typogrify".
|
||||
THIS is some content. With some stuff to "typogrify"...
|
||||
|
||||
Now with added support for :abbr:`TLA (three letter acronym)`.
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>A markdown powered article</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>A Pelican Blog</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Article 1</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Article 2</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Article 3</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>A Pelican Blog - Alexis Métaireau</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>A Pelican Blog - Authors</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>A Pelican Blog</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>A Pelican Blog - bar</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>A Pelican Blog - cat1</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>A Pelican Blog - misc</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
@ -86,11 +86,11 @@
|
|||
<h2>Testing sourcecode directive</h2>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-more-sourcecode-directives">
|
||||
<h2>Testing more sourcecode directives</h2>
|
||||
<div class="highlight"><pre><span id="foo-8"><a name="foo-8"></a><span class="lineno special"> 8</span> <span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><span class="lineno special">10</span> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><span class="lineno"> </span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><span class="lineno special">12</span> <span class="testingk">except</span> <span class="testingne">ValueError ...</span></span></pre></div></div>
|
||||
</td></tr></table></div>
|
||||
<div class="section" id="testing-another-case">
|
||||
<h2>Testing another case</h2>
|
||||
<p>This will now have a line number in 'custom' since it's the default in
|
||||
pelican.conf, it ...</p></div>
|
||||
<a class="readmore" href="/unbelievable.html">read more</a>
|
||||
</div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>A Pelican Blog - yeah</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,14 @@ YEAH !</p>
|
|||
<h2>Testing sourcecode directive</h2>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>Lovely.</p>
|
||||
</td></tr></table></div>
|
||||
<div class="section" id="testing-another-case">
|
||||
<h2>Testing another case</h2>
|
||||
<p>This will now have a line number in 'custom' since it's the default in
|
||||
pelican.conf, it will have nothing in default.</p>
|
||||
<div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-more-sourcecode-directives">
|
||||
<h2>Testing more sourcecode directives</h2>
|
||||
|
|
@ -43,5 +50,12 @@ YEAH !</p>
|
|||
<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-overriding-config-defaults">
|
||||
<h2>Testing overriding config defaults</h2>
|
||||
<p>Even if the default is line numbers, we can override it here</p>
|
||||
<div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
</summary></entry><entry><title>The baz tag</title><link href="/tag/baz.html" rel="alternate"></link><updated>2010-03-14T00:00:00Z</updated><author><name></name></author><id>tag:,2010-03-14:tag/baz.html</id><summary type="html"><p>This article overrides the listening of the articles under the <em>baz</em> tag.</p>
|
||||
</summary></entry></feed>
|
||||
|
|
@ -32,7 +32,14 @@ YEAH !</p>
|
|||
<h2>Testing sourcecode directive</h2>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>Lovely.</p>
|
||||
</td></tr></table></div>
|
||||
<div class="section" id="testing-another-case">
|
||||
<h2>Testing another case</h2>
|
||||
<p>This will now have a line number in 'custom' since it's the default in
|
||||
pelican.conf, it will have nothing in default.</p>
|
||||
<div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-more-sourcecode-directives">
|
||||
<h2>Testing more sourcecode directives</h2>
|
||||
|
|
@ -44,5 +51,12 @@ YEAH !</p>
|
|||
<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-overriding-config-defaults">
|
||||
<h2>Testing overriding config defaults</h2>
|
||||
<p>Even if the default is line numbers, we can override it here</p>
|
||||
<div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
</summary></entry><entry><title>The baz tag</title><link href="/tag/baz.html" rel="alternate"></link><updated>2010-03-14T00:00:00Z</updated><author><name></name></author><id>tag:,2010-03-14:tag/baz.html</id><summary type="html"><p>This article overrides the listening of the articles under the <em>baz</em> tag.</p>
|
||||
</summary></entry></feed>
|
||||
|
|
@ -8,7 +8,14 @@
|
|||
<h2>Testing sourcecode directive</h2>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>Lovely.</p>
|
||||
</td></tr></table></div>
|
||||
<div class="section" id="testing-another-case">
|
||||
<h2>Testing another case</h2>
|
||||
<p>This will now have a line number in 'custom' since it's the default in
|
||||
pelican.conf, it will have nothing in default.</p>
|
||||
<div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-more-sourcecode-directives">
|
||||
<h2>Testing more sourcecode directives</h2>
|
||||
|
|
@ -20,5 +27,12 @@
|
|||
<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-overriding-config-defaults">
|
||||
<h2>Testing overriding config defaults</h2>
|
||||
<p>Even if the default is line numbers, we can override it here</p>
|
||||
<div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
</summary></entry><entry><title>The baz tag</title><link href="/tag/baz.html" rel="alternate"></link><updated>2010-03-14T00:00:00Z</updated><author><name></name></author><id>tag:,2010-03-14:tag/baz.html</id><summary type="html"><p>This article overrides the listening of the articles under the <em>baz</em> tag.</p>
|
||||
</summary></entry></feed>
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>FILENAME_METADATA example</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>A Pelican Blog</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
@ -219,11 +219,11 @@ YEAH !</p>
|
|||
<h2>Testing sourcecode directive</h2>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-more-sourcecode-directives">
|
||||
<h2>Testing more sourcecode directives</h2>
|
||||
<div class="highlight"><pre><span id="foo-8"><a name="foo-8"></a><span class="lineno special"> 8</span> <span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><span class="lineno special">10</span> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><span class="lineno"> </span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><span class="lineno special">12</span> <span class="testingk">except</span> <span class="testingne">ValueError ...</span></span></pre></div></div>
|
||||
</td></tr></table></div>
|
||||
<div class="section" id="testing-another-case">
|
||||
<h2>Testing another case</h2>
|
||||
<p>This will now have a line number in 'custom' since it's the default in
|
||||
pelican.conf, it ...</p></div>
|
||||
<a class="readmore" href="/unbelievable.html">read more</a>
|
||||
</div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Oh yeah !</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Override url/save_as</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>This is a test hidden page</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>This is a test page</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Deuxième article</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Second article</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>A Pelican Blog - bar</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>The baz tag</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>A Pelican Blog - foo</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>A Pelican Blog - foobar</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Oh Oh Oh</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>A Pelican Blog - yeah</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>A Pelican Blog - Tags</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>This is a super article !</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Unbelievable !</title>
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
|
|
@ -47,7 +47,14 @@
|
|||
<h2>Testing sourcecode directive</h2>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>Lovely.</p>
|
||||
</td></tr></table></div>
|
||||
<div class="section" id="testing-another-case">
|
||||
<h2>Testing another case</h2>
|
||||
<p>This will now have a line number in 'custom' since it's the default in
|
||||
pelican.conf, it will have nothing in default.</p>
|
||||
<div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-more-sourcecode-directives">
|
||||
<h2>Testing more sourcecode directives</h2>
|
||||
|
|
@ -58,6 +65,13 @@
|
|||
<h2>Testing even more sourcecode directives</h2>
|
||||
<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-overriding-config-defaults">
|
||||
<h2>Testing overriding config defaults</h2>
|
||||
<p>Even if the default is line numbers, we can override it here</p>
|
||||
<div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
|
||||
</div><!-- /.entry-content -->
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>A markdown powered article</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Article 1</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Article 2</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Article 3</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log - Alexis Métaireau</title>
|
||||
<link rel="stylesheet" href="../theme/css/main.css">
|
||||
<link rel="stylesheet" href="../theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log - Alexis Métaireau</title>
|
||||
<link rel="stylesheet" href="../theme/css/main.css">
|
||||
<link rel="stylesheet" href="../theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log - Alexis Métaireau</title>
|
||||
<link rel="stylesheet" href="../theme/css/main.css">
|
||||
<link rel="stylesheet" href="../theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
@ -55,11 +55,11 @@
|
|||
<h2>Testing sourcecode directive</h2>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-more-sourcecode-directives">
|
||||
<h2>Testing more sourcecode directives</h2>
|
||||
<div class="highlight"><pre><span id="foo-8"><a name="foo-8"></a><span class="lineno special"> 8</span> <span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><span class="lineno special">10</span> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><span class="lineno"> </span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><span class="lineno special">12</span> <span class="testingk">except</span> <span class="testingne">ValueError ...</span></span></pre></div></div>
|
||||
</td></tr></table></div>
|
||||
<div class="section" id="testing-another-case">
|
||||
<h2>Testing another case</h2>
|
||||
<p>This will now have a line number in 'custom' since it's the default in
|
||||
pelican.conf, it ...</p></div>
|
||||
<a class="readmore" href="../unbelievable.html">read more</a>
|
||||
<p>There are <a href="../unbelievable.html#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log - Authors</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log - bar</title>
|
||||
<link rel="stylesheet" href="../theme/css/main.css">
|
||||
<link rel="stylesheet" href="../theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log - cat1</title>
|
||||
<link rel="stylesheet" href="../theme/css/main.css">
|
||||
<link rel="stylesheet" href="../theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log - misc</title>
|
||||
<link rel="stylesheet" href="../theme/css/main.css">
|
||||
<link rel="stylesheet" href="../theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
@ -99,11 +99,11 @@
|
|||
<h2>Testing sourcecode directive</h2>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-more-sourcecode-directives">
|
||||
<h2>Testing more sourcecode directives</h2>
|
||||
<div class="highlight"><pre><span id="foo-8"><a name="foo-8"></a><span class="lineno special"> 8</span> <span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><span class="lineno special">10</span> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><span class="lineno"> </span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><span class="lineno special">12</span> <span class="testingk">except</span> <span class="testingne">ValueError ...</span></span></pre></div></div>
|
||||
</td></tr></table></div>
|
||||
<div class="section" id="testing-another-case">
|
||||
<h2>Testing another case</h2>
|
||||
<p>This will now have a line number in 'custom' since it's the default in
|
||||
pelican.conf, it ...</p></div>
|
||||
<a class="readmore" href="../unbelievable.html">read more</a>
|
||||
<p>There are <a href="../unbelievable.html#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log - yeah</title>
|
||||
<link rel="stylesheet" href="../theme/css/main.css">
|
||||
<link rel="stylesheet" href="../theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>A draft article</title>
|
||||
<link rel="stylesheet" href="../theme/css/main.css">
|
||||
<link rel="stylesheet" href="../theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,13 @@ YEAH !</p>
|
|||
<h2>Testing sourcecode directive</h2>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<div class="section" id="testing-another-case">
|
||||
<h2>Testing another case</h2>
|
||||
<p>This will now have a line number in 'custom' since it's the default in
|
||||
pelican.conf, it will have nothing in default.</p>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-more-sourcecode-directives">
|
||||
|
|
@ -43,5 +50,12 @@ YEAH !</p>
|
|||
<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-overriding-config-defaults">
|
||||
<h2>Testing overriding config defaults</h2>
|
||||
<p>Even if the default is line numbers, we can override it here</p>
|
||||
<div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
</summary></entry><entry><title>The baz tag</title><link href="http://blog.notmyidea.org/tag/baz.html" rel="alternate"></link><updated>2010-03-14T00:00:00+01:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2010-03-14:tag/baz.html</id><summary type="html"><p>This article overrides the listening of the articles under the <em>baz</em> tag.</p>
|
||||
</summary></entry></feed>
|
||||
|
|
@ -33,6 +33,13 @@ YEAH !</p>
|
|||
<h2>Testing sourcecode directive</h2>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<div class="section" id="testing-another-case">
|
||||
<h2>Testing another case</h2>
|
||||
<p>This will now have a line number in 'custom' since it's the default in
|
||||
pelican.conf, it will have nothing in default.</p>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-more-sourcecode-directives">
|
||||
|
|
@ -45,5 +52,12 @@ YEAH !</p>
|
|||
<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-overriding-config-defaults">
|
||||
<h2>Testing overriding config defaults</h2>
|
||||
<p>Even if the default is line numbers, we can override it here</p>
|
||||
<div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
</summary></entry><entry><title>The baz tag</title><link href="http://blog.notmyidea.org/tag/baz.html" rel="alternate"></link><updated>2010-03-14T00:00:00+01:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2010-03-14:tag/baz.html</id><summary type="html"><p>This article overrides the listening of the articles under the <em>baz</em> tag.</p>
|
||||
</summary></entry></feed>
|
||||
|
|
@ -33,6 +33,13 @@ YEAH !</p>
|
|||
<h2>Testing sourcecode directive</h2>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<div class="section" id="testing-another-case">
|
||||
<h2>Testing another case</h2>
|
||||
<p>This will now have a line number in 'custom' since it's the default in
|
||||
pelican.conf, it will have nothing in default.</p>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-more-sourcecode-directives">
|
||||
|
|
@ -45,5 +52,12 @@ YEAH !</p>
|
|||
<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-overriding-config-defaults">
|
||||
<h2>Testing overriding config defaults</h2>
|
||||
<p>Even if the default is line numbers, we can override it here</p>
|
||||
<div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexis Métaireau</dc:creator><pubDate>Fri, 15 Oct 2010 20:30:00 +0200</pubDate><guid>tag:blog.notmyidea.org,2010-10-15:unbelievable.html</guid></item><item><title>The baz tag</title><link>http://blog.notmyidea.org/tag/baz.html</link><description><p>This article overrides the listening of the articles under the <em>baz</em> tag.</p>
|
||||
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexis Métaireau</dc:creator><pubDate>Sun, 14 Mar 2010 00:00:00 +0100</pubDate><guid>tag:blog.notmyidea.org,2010-03-14:tag/baz.html</guid></item></channel></rss>
|
||||
|
|
@ -8,6 +8,13 @@
|
|||
<h2>Testing sourcecode directive</h2>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<div class="section" id="testing-another-case">
|
||||
<h2>Testing another case</h2>
|
||||
<p>This will now have a line number in 'custom' since it's the default in
|
||||
pelican.conf, it will have nothing in default.</p>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-more-sourcecode-directives">
|
||||
|
|
@ -20,5 +27,12 @@
|
|||
<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-overriding-config-defaults">
|
||||
<h2>Testing overriding config defaults</h2>
|
||||
<p>Even if the default is line numbers, we can override it here</p>
|
||||
<div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
</summary></entry><entry><title>The baz tag</title><link href="http://blog.notmyidea.org/tag/baz.html" rel="alternate"></link><updated>2010-03-14T00:00:00+01:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2010-03-14:tag/baz.html</id><summary type="html"><p>This article overrides the listening of the articles under the <em>baz</em> tag.</p>
|
||||
</summary></entry></feed>
|
||||
|
|
@ -8,6 +8,13 @@
|
|||
<h2>Testing sourcecode directive</h2>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<div class="section" id="testing-another-case">
|
||||
<h2>Testing another case</h2>
|
||||
<p>This will now have a line number in 'custom' since it's the default in
|
||||
pelican.conf, it will have nothing in default.</p>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-more-sourcecode-directives">
|
||||
|
|
@ -20,5 +27,12 @@
|
|||
<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-overriding-config-defaults">
|
||||
<h2>Testing overriding config defaults</h2>
|
||||
<p>Even if the default is line numbers, we can override it here</p>
|
||||
<div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexis Métaireau</dc:creator><pubDate>Fri, 15 Oct 2010 20:30:00 +0200</pubDate><guid>tag:blog.notmyidea.org,2010-10-15:unbelievable.html</guid></item><item><title>The baz tag</title><link>http://blog.notmyidea.org/tag/baz.html</link><description><p>This article overrides the listening of the articles under the <em>baz</em> tag.</p>
|
||||
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexis Métaireau</dc:creator><pubDate>Sun, 14 Mar 2010 00:00:00 +0100</pubDate><guid>tag:blog.notmyidea.org,2010-03-14:tag/baz.html</guid></item></channel></rss>
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>FILENAME_METADATA example</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
@ -55,11 +55,11 @@
|
|||
<h2>Testing sourcecode directive</h2>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-more-sourcecode-directives">
|
||||
<h2>Testing more sourcecode directives</h2>
|
||||
<div class="highlight"><pre><span id="foo-8"><a name="foo-8"></a><span class="lineno special"> 8</span> <span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><span class="lineno special">10</span> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><span class="lineno"> </span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><span class="lineno special">12</span> <span class="testingk">except</span> <span class="testingne">ValueError ...</span></span></pre></div></div>
|
||||
</td></tr></table></div>
|
||||
<div class="section" id="testing-another-case">
|
||||
<h2>Testing another case</h2>
|
||||
<p>This will now have a line number in 'custom' since it's the default in
|
||||
pelican.conf, it ...</p></div>
|
||||
<a class="readmore" href="./unbelievable.html">read more</a>
|
||||
<p>There are <a href="./unbelievable.html#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Trop bien !</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Oh yeah !</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Override url/save_as</title>
|
||||
<link rel="stylesheet" href="../theme/css/main.css">
|
||||
<link rel="stylesheet" href="../theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>This is a test hidden page</title>
|
||||
<link rel="stylesheet" href="../theme/css/main.css">
|
||||
<link rel="stylesheet" href="../theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>This is a test page</title>
|
||||
<link rel="stylesheet" href="../theme/css/main.css">
|
||||
<link rel="stylesheet" href="../theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Deuxième article</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Second article</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log - bar</title>
|
||||
<link rel="stylesheet" href="../theme/css/main.css">
|
||||
<link rel="stylesheet" href="../theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>The baz tag</title>
|
||||
<link rel="stylesheet" href="../theme/css/main.css">
|
||||
<link rel="stylesheet" href="../theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log - foo</title>
|
||||
<link rel="stylesheet" href="../theme/css/main.css">
|
||||
<link rel="stylesheet" href="../theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log - foobar</title>
|
||||
<link rel="stylesheet" href="../theme/css/main.css">
|
||||
<link rel="stylesheet" href="../theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Oh Oh Oh</title>
|
||||
<link rel="stylesheet" href="../theme/css/main.css">
|
||||
<link rel="stylesheet" href="../theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log - yeah</title>
|
||||
<link rel="stylesheet" href="../theme/css/main.css">
|
||||
<link rel="stylesheet" href="../theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Alexis' log - Tags</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>This is a super article !</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>Unbelievable !</title>
|
||||
<link rel="stylesheet" href="./theme/css/main.css">
|
||||
<link rel="stylesheet" href="./theme/css/main.css" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
|
||||
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS Feed" />
|
||||
|
||||
|
|
@ -54,6 +54,13 @@
|
|||
<h2>Testing sourcecode directive</h2>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<div class="section" id="testing-another-case">
|
||||
<h2>Testing another case</h2>
|
||||
<p>This will now have a line number in 'custom' since it's the default in
|
||||
pelican.conf, it will have nothing in default.</p>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-more-sourcecode-directives">
|
||||
|
|
@ -65,6 +72,13 @@
|
|||
<h2>Testing even more sourcecode directives</h2>
|
||||
<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
<div class="section" id="testing-overriding-config-defaults">
|
||||
<h2>Testing overriding config defaults</h2>
|
||||
<p>Even if the default is line numbers, we can override it here</p>
|
||||
<div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
|
||||
</pre></div>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
|
||||
</div><!-- /.entry-content -->
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import six
|
||||
from datetime import datetime
|
||||
from sys import platform
|
||||
|
||||
|
|
@ -192,17 +193,80 @@ class TestPage(unittest.TestCase):
|
|||
'<a href="|tag|tagname">link</a>')
|
||||
page = Page(**args)
|
||||
content = page.get_content('http://notmyidea.org')
|
||||
self.assertEquals(content, ('A simple test, with a '
|
||||
'<a href="tag/tagname.html">link</a>'))
|
||||
self.assertEqual(content, ('A simple test, with a '
|
||||
'<a href="tag/tagname.html">link</a>'))
|
||||
|
||||
# Category
|
||||
args['content'] = ('A simple test, with a '
|
||||
'<a href="|category|category">link</a>')
|
||||
page = Page(**args)
|
||||
content = page.get_content('http://notmyidea.org')
|
||||
self.assertEquals(content,
|
||||
('A simple test, with a '
|
||||
'<a href="category/category.html">link</a>'))
|
||||
self.assertEqual(content,
|
||||
('A simple test, with a '
|
||||
'<a href="category/category.html">link</a>'))
|
||||
|
||||
def test_intrasite_link(self):
|
||||
# type does not take unicode in PY2 and bytes in PY3, which in
|
||||
# combination with unicode literals leads to following insane line:
|
||||
cls_name = '_DummyArticle' if six.PY3 else b'_DummyArticle'
|
||||
article = type(cls_name, (object,), {'url': 'article.html'})
|
||||
|
||||
args = self.page_kwargs.copy()
|
||||
args['settings'] = get_settings()
|
||||
args['source_path'] = 'content'
|
||||
args['context']['filenames'] = {'article.rst': article}
|
||||
|
||||
# Classic intrasite link via filename
|
||||
args['content'] = (
|
||||
'A simple test, with a '
|
||||
'<a href="|filename|article.rst">link</a>'
|
||||
)
|
||||
content = Page(**args).get_content('http://notmyidea.org')
|
||||
self.assertEqual(
|
||||
content,
|
||||
'A simple test, with a '
|
||||
'<a href="http://notmyidea.org/article.html">link</a>'
|
||||
)
|
||||
|
||||
# fragment
|
||||
args['content'] = (
|
||||
'A simple test, with a '
|
||||
'<a href="|filename|article.rst#section-2">link</a>'
|
||||
)
|
||||
content = Page(**args).get_content('http://notmyidea.org')
|
||||
self.assertEqual(
|
||||
content,
|
||||
'A simple test, with a '
|
||||
'<a href="http://notmyidea.org/article.html#section-2">link</a>'
|
||||
)
|
||||
|
||||
# query
|
||||
args['content'] = (
|
||||
'A simple test, with a '
|
||||
'<a href="|filename|article.rst'
|
||||
'?utm_whatever=234&highlight=word">link</a>'
|
||||
)
|
||||
content = Page(**args).get_content('http://notmyidea.org')
|
||||
self.assertEqual(
|
||||
content,
|
||||
'A simple test, with a '
|
||||
'<a href="http://notmyidea.org/article.html'
|
||||
'?utm_whatever=234&highlight=word">link</a>'
|
||||
)
|
||||
|
||||
# combination
|
||||
args['content'] = (
|
||||
'A simple test, with a '
|
||||
'<a href="|filename|article.rst'
|
||||
'?utm_whatever=234&highlight=word#section-2">link</a>'
|
||||
)
|
||||
content = Page(**args).get_content('http://notmyidea.org')
|
||||
self.assertEqual(
|
||||
content,
|
||||
'A simple test, with a '
|
||||
'<a href="http://notmyidea.org/article.html'
|
||||
'?utm_whatever=234&highlight=word#section-2">link</a>'
|
||||
)
|
||||
|
||||
|
||||
class TestArticle(TestPage):
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@ from __future__ import unicode_literals
|
|||
|
||||
import os
|
||||
from codecs import open
|
||||
from mock import MagicMock
|
||||
try:
|
||||
from unittest.mock import MagicMock
|
||||
except ImportError:
|
||||
from mock import MagicMock
|
||||
from shutil import rmtree
|
||||
from tempfile import mkdtemp
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ from __future__ import unicode_literals, print_function
|
|||
import os
|
||||
import re
|
||||
|
||||
from pelican.tools.pelican_import import wp2fields, fields2pelican, decode_wp_content
|
||||
from pelican.tools.pelican_import import wp2fields, fields2pelican, decode_wp_content, build_header
|
||||
from pelican.tests.support import (unittest, temporary_folder, mute,
|
||||
skipIfNoExecutable)
|
||||
|
||||
|
|
@ -122,3 +122,18 @@ class TestWordpressXmlImporter(unittest.TestCase):
|
|||
sample_line = re.search(r'- This is a code sample', md).group(0)
|
||||
code_line = re.search(r'\s+a = \[1, 2, 3\]', md).group(0)
|
||||
self.assertTrue(sample_line.rindex('This') < code_line.rindex('a'))
|
||||
|
||||
|
||||
class TestBuildHeader(unittest.TestCase):
|
||||
def test_build_header(self):
|
||||
header = build_header('test', None, None, None, None, None)
|
||||
self.assertEqual(header, 'test\n####\n\n')
|
||||
|
||||
def test_build_header_with_east_asian_characters(self):
|
||||
header = build_header('これは広い幅の文字だけで構成されたタイトルです',
|
||||
None, None, None, None, None)
|
||||
|
||||
self.assertEqual(header,
|
||||
'これは広い幅の文字だけで構成されたタイトルです\n' +
|
||||
'##############################################\n\n')
|
||||
|
||||
|
|
|
|||
|
|
@ -92,3 +92,38 @@ class TestPelican(LoggedTestCase):
|
|||
mute(True)(pelican.run)()
|
||||
dcmp = dircmp(self.temp_path, os.path.join(OUTPUT_PATH, 'custom'))
|
||||
self.assertFilesEqual(recursiveDiff(dcmp))
|
||||
|
||||
def test_theme_static_paths_copy(self):
|
||||
# the same thing with a specified set of settings should work
|
||||
settings = read_settings(path=SAMPLE_CONFIG, override={
|
||||
'PATH': INPUT_PATH,
|
||||
'OUTPUT_PATH': self.temp_path,
|
||||
'THEME_STATIC_PATHS': [os.path.join(SAMPLES_PATH, 'very'),
|
||||
os.path.join(SAMPLES_PATH, 'kinda'),
|
||||
os.path.join(SAMPLES_PATH, 'theme_standard')]
|
||||
})
|
||||
pelican = Pelican(settings=settings)
|
||||
mute(True)(pelican.run)()
|
||||
theme_output = os.path.join(self.temp_path, 'theme')
|
||||
extra_path = os.path.join(theme_output, 'exciting', 'new', 'files')
|
||||
|
||||
for file in ['a_stylesheet', 'a_template']:
|
||||
self.assertTrue(os.path.exists(os.path.join(theme_output, file)))
|
||||
|
||||
for file in ['wow!', 'boom!', 'bap!', 'zap!']:
|
||||
self.assertTrue(os.path.exists(os.path.join(extra_path, file)))
|
||||
|
||||
def test_theme_static_paths_copy_single_file(self):
|
||||
# the same thing with a specified set of settings should work
|
||||
settings = read_settings(path=SAMPLE_CONFIG, override={
|
||||
'PATH': INPUT_PATH,
|
||||
'OUTPUT_PATH': self.temp_path,
|
||||
'THEME_STATIC_PATHS': [os.path.join(SAMPLES_PATH, 'theme_standard')]
|
||||
})
|
||||
|
||||
pelican = Pelican(settings=settings)
|
||||
mute(True)(pelican.run)()
|
||||
theme_output = os.path.join(self.temp_path, 'theme')
|
||||
|
||||
for file in ['a_stylesheet', 'a_template']:
|
||||
self.assertTrue(os.path.exists(os.path.join(theme_output, file)))
|
||||
|
|
|
|||
|
|
@ -104,8 +104,8 @@ class RstReaderTest(ReaderTest):
|
|||
# if nothing is specified in the settings, the content should be
|
||||
# unmodified
|
||||
page = self.read_file(path='article.rst')
|
||||
expected = ('<p>This is some content. With some stuff to '
|
||||
'"typogrify".</p>\n<p>Now with added '
|
||||
expected = ('<p>THIS is some content. With some stuff to '
|
||||
'"typogrify"...</p>\n<p>Now with added '
|
||||
'support for <abbr title="three letter acronym">'
|
||||
'TLA</abbr>.</p>\n')
|
||||
|
||||
|
|
@ -114,10 +114,11 @@ class RstReaderTest(ReaderTest):
|
|||
try:
|
||||
# otherwise, typogrify should be applied
|
||||
page = self.read_file(path='article.rst', TYPOGRIFY=True)
|
||||
expected = ('<p>This is some content. With some stuff to '
|
||||
'“typogrify”.</p>\n<p>Now with added '
|
||||
'support for <abbr title="three letter acronym">'
|
||||
'<span class="caps">TLA</span></abbr>.</p>\n')
|
||||
expected = (
|
||||
'<p><span class="caps">THIS</span> is some content. '
|
||||
'With some stuff to "typogrify"…</p>\n'
|
||||
'<p>Now with added support for <abbr title="three letter '
|
||||
'acronym"><span class="caps">TLA</span></abbr>.</p>\n')
|
||||
|
||||
self.assertEqual(page.content, expected)
|
||||
except ImportError:
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ DEFAULT_LANG }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
<title>{% block title %}{{ SITENAME }}{%endblock%}</title>
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/{{ CSS_FILE }}">
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/{{ CSS_FILE }}" />
|
||||
{% if FEED_ALL_ATOM %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" />
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,19 @@
|
|||
{% if PIWIK_URL and PIWIK_SITE_ID %}
|
||||
<script type="text/javascript">
|
||||
{% if PIWIK_SSL_URL %}
|
||||
var pkBaseURL = (("https:" == document.location.protocol) ? "https://{{ PIWIK_SSL_URL }}/" : "http://{{ PIWIK_URL }}/");
|
||||
{% else %}
|
||||
var pkBaseURL = (("https:" == document.location.protocol) ? "https://{{ PIWIK_URL }}/" : "http://{{ PIWIK_URL }}/");
|
||||
{% endif %}
|
||||
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script><script type="text/javascript">
|
||||
try {
|
||||
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", {{ PIWIK_SITE_ID }});
|
||||
piwikTracker.trackPageView();
|
||||
piwikTracker.enableLinkTracking();
|
||||
} catch( err ) {}
|
||||
</script><noscript><p><img src="http://{{ PIWIK_URL }}/piwik.php?idsite={{ PIWIK_SITE_ID }}" style="border:0" alt="" /></p></noscript>
|
||||
{% endif %}
|
||||
<script type="text/javascript">
|
||||
{% if PIWIK_SSL_URL %}
|
||||
var pkBaseURL = "{{ PIWIK_SSL_URL }}";
|
||||
{% else %}
|
||||
var pkBaseURL = "{{ PIWIK_URL }}";
|
||||
{% endif %}
|
||||
var _paq = _paq || [];
|
||||
_paq.push(["trackPageView"]);
|
||||
_paq.push(["enableLinkTracking"]);
|
||||
(function() {
|
||||
var u=(("https:" == document.location.protocol) ? "https" : "http")+"://"+pkBaseURL+"/";
|
||||
_paq.push(["setTrackerUrl", u+"piwik.php"]);
|
||||
_paq.push(["setSiteId", "{{ PIWIK_SITE_ID }}"]);
|
||||
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
|
||||
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,19 @@
|
|||
{% extends "base.html" %}
|
||||
{% block head %}
|
||||
{% for keyword in article.keywords %}
|
||||
<meta name="keywords" contents="{{keyword}}" />
|
||||
{% endfor %}
|
||||
|
||||
{% for description in article.description %}
|
||||
<meta name="description" contents="{{description}}" />
|
||||
{% endfor %}
|
||||
|
||||
{% for tag in article.tags %}
|
||||
<meta name="tags" contents="{{tag}}" />
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section id="content" class="body">
|
||||
<header>
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue