Fix Pelican rendering and unit tests on Windows.

* Fix {filename} links on Windows.
  Otherwise '{filename}/foo/bar.jpg' doesn't work
* Clean up relative Posix path handling in contents.
* Use Posix paths in readers
* Environment for Popen must be strs, not unicodes.
* Ignore Git CRLF warnings.
* Replace CRLFs with LFs in inputs on Windows.
* Fix importer tests
* Fix test_contents
* Fix one last backslash in paginated output
* Skip the remaining failing locale tests on Windows.
* Document the use of forward slashes on Windows.
* Add some Fabric and ghp-import notes
This commit is contained in:
George V. Reilly 2015-01-02 23:45:44 -08:00
commit 4c25610cd8
14 changed files with 104 additions and 52 deletions

View file

@ -157,6 +157,9 @@ the other content will be placed after site generation).
To link to internal content (files in the ``content`` directory), use the
following syntax for the link target: ``{filename}path/to/file``
Note: forward slashes, ``/``,
are the required path separator in the ``{filename}`` directive
on all operating systems, including Windows.
For example, a Pelican project might be structured like this::

View file

@ -100,6 +100,18 @@ separately. Use the following command to install Fabric, prefixing with
pip install Fabric
.. note:: Installing PyCrypto on Windows
Fabric depends upon PyCrypto_, which is tricky to install
if your system doesn't have a C compiler.
For Windows users, before installing Fabric, use
``easy_install http://www.voidspace.org.uk/downloads/pycrypto26/pycrypto-2.6.win32-py2.7.exe``
per this `StackOverflow suggestion <http://stackoverflow.com/a/11405769/6364>`_
You're more likely to have success
with the Win32 versions of Python 2.7 and PyCrypto,
than with the Win64—\
even if your operating system is a 64-bit version of Windows.
Take a moment to open the ``fabfile.py`` file that was generated in your
project root. You will see a number of commands, any one of which can be
renamed, removed, and/or customized to your liking. Using the out-of-the-box
@ -179,3 +191,4 @@ executables, such as ``python3``, you can set the ``PY`` and ``PELICAN``
environment variables, respectively, to override the default executable names.)
.. _Fabric: http://fabfile.org/
.. _PyCrypto: http://pycrypto.org

View file

@ -36,9 +36,15 @@ already exist). The ``git push origin gh-pages`` command updates the remote
``gh-pages`` branch, effectively publishing the Pelican site.
.. note::
The ``github`` target of the Makefile (and the ``gh_pages`` task of the Fabfile)
created by the ``pelican-quickstart`` command
publishes the Pelican site as Project Pages, as described above.
The ``github`` target of the Makefile created by the ``pelican-quickstart``
command publishes the Pelican site as Project Pages, as described above.
.. note:: ghp-import on Windows
Until `ghp-import Pull Request #25 <https://github.com/davisp/ghp-import/pull/25>`_
is accepted, you will need to install a custom build of ghp-import:
``pip install https://github.com/chevah/ghp-import/archive/win-support.zip``
User Pages
----------
@ -86,6 +92,12 @@ output directory. For example::
STATIC_PATHS = ['images', 'extra/CNAME']
EXTRA_PATH_METADATA = {'extra/CNAME': {'path': 'CNAME'},}
Note: use forward slashes, ``/``, even on Windows.
.. hint::
You can also use the ``EXTRA_PATH_METADATA`` mechanism
to place a ``favicon.ico`` or ``robots.txt`` at the root of any site.
How to add YouTube or Vimeo Videos
==================================