<commit_before>Tips
####

Here are some tips about Pelican that you might find useful.

Publishing to GitHub
====================

`GitHub Pages <https://help.github.com/categories/20/articles>`_ offer an easy
and convenient way to publish Pelican sites. There are `two types of GitHub
Pages <https://help.github.com/articles/user-organization-and-project-pages>`_:
*Project Pages* and *User Pages*. Pelican sites can be published as both
Project Pages and User Pages.

Project Pages
-------------

To publish a Pelican site as Project Pages 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::

    $ pelican content -o output pelicanconf.py
    $ ghp-import output
    $ git push origin gh-pages

The ``ghp-import output`` command updates the local ``gh-pages`` branch with
the content of the ``output`` directory (creating the branch if it doesn't
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 created by the ``pelican-quickstart``
    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.

Again, you can take advantage of ``ghp-import``::

    $ pelican content -o output pelicanconf.py
    $ ghp-import output
    $ git push <EMAIL>:elemoine/elemoine.github.com.git gh-pages:master
<commit_msg>Missing -s flag added to command on tips doc page<commit_after>Tips
####

Here are some tips about Pelican that you might find useful.

Publishing to GitHub
====================

`GitHub Pages <https://help.github.com/categories/20/articles>`_ offer an easy
and convenient way to publish Pelican sites. There are `two types of GitHub
Pages <https://help.github.com/articles/user-organization-and-project-pages>`_:
*Project Pages* and *User Pages*. Pelican sites can be published as both
Project Pages and User Pages.

Project Pages
-------------

To publish a Pelican site as Project Pages 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::

    $ pelican content -o output -s pelicanconf.py
    $ ghp-import output
    $ git push origin gh-pages

The ``ghp-import output`` command updates the local ``gh-pages`` branch with
the content of the ``output`` directory (creating the branch if it doesn't
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 created by the ``pelican-quickstart``
    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.

Again, you can take advantage of ``ghp-import``::

    $ pelican content -o output pelicanconf.py
    $ ghp-import output
    $ git push <EMAIL>:elemoine/elemoine.github.com.git gh-pages:master

{'fraction_non_alphanumeric': 0.1086796164248832, 'fraction_numerical': 0.0009835259404966806, 'mean_word_length': 4.028430160692213, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '173632', 'n_tokens_mistral': 1167, 'n_tokens_neox': 1084, 'n_words': 530}