Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' into ipynb-basic-template
  • Loading branch information
ralsina committed Apr 15, 2018
2 parents f86790e + 987f186 commit bb7fe3f
Show file tree
Hide file tree
Showing 292 changed files with 47,098 additions and 46,118 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
@@ -1,5 +1,5 @@
before_install:
- pip install --upgrade pip wheel
- pip install --upgrade-strategy eager -U pip wheel
language: python
cache:
- apt
Expand Down Expand Up @@ -27,7 +27,7 @@ matrix:
- pip3 install virtualenv
- python3 -m virtualenv nikola-tests-venv
- source nikola-tests-venv/bin/activate
- pip install --upgrade pip wheel
- pip install --upgrade-strategy eager -U pip wheel
- python: '3.6'
env: NMODE=flake8
env:
Expand All @@ -36,7 +36,7 @@ env:
global:
secure: GqUDW0j4Ay8pS9tS/g5JBYGtgBG0g0oD2g4X9JXgVchiFj3GIRL+dwiXpgx3LELy7nCWF3EzClFxxMdVqqxizQ/I8xqiA0XL/rf5z/y+9d9nmKOxV8SV73n0eCgsHWkbdSLJ6MKs6s0Trlz9jLu/P+Bhfu2ttqkOH8WttfEf3VE=
install:
- if [[ $NMODE == 'nikola' ]]; then pip install -Ur requirements-tests.txt; if [[ "$?" == '1' ]]; then cat /home/travis/.pip/pip.log; false; fi; fi
- if [[ $NMODE == 'nikola' ]]; then pip install --upgrade-strategy eager -Ur requirements-tests.txt; if [[ "$?" == '1' ]]; then cat /home/travis/.pip/pip.log; false; fi; fi
- if [[ $NMODE == 'nikola' ]]; then pip install .; fi
- if [[ $NMODE == 'flake8' ]]; then pip install flake8 pydocstyle; fi
script:
Expand Down
8 changes: 8 additions & 0 deletions CHANGES.txt
Expand Up @@ -6,6 +6,12 @@ Features

* Use basic ipynb template by default for slightly better appearance
and behavior
* Fixing behavior of RSS_PATH to do what the documentation
says it does (Issue #3024)
* Add support for fragments in path handlers (Issue #3032)
* Explain index.html conflicts better (Issue #3022)
* Recognize both TEASER_END and (new) END_TEASER (Issue #3010)
* New MARKDOWN_EXTENSION_CONFIGS setting (Issue #2970)
* Replace ``flowr.js`` with ``justified-layout.js`` by Flickr
(does not require jQuery!)
* ``bootblog4`` is the new default theme (Issue #2964)
Expand Down Expand Up @@ -40,6 +46,8 @@ Features
Bugfixes
--------

* Don’t silence syntax errors and other exceptions that occur while
reading metadata
* Use documented dateutil API for time zone list (Issue #3006)
* Handle trailing slash redirects with query strings correctly in
``nikola serve`` (Issue #3000)
Expand Down
2 changes: 1 addition & 1 deletion docs/extending.rst
Expand Up @@ -526,7 +526,7 @@ Here's the relevant code from the tag plugin.
# In set_site
site.register_path_handler('tag_rss', self.tag_rss_path)
# And these always take name and lang as arguments and returl a list of
# And these always take name and lang as arguments and return a list of
# path elements.
def tag_rss_path(self, name, lang):
return [_f for _f in [self.site.config['TRANSLATIONS'][lang],
Expand Down
24 changes: 18 additions & 6 deletions docs/manual.rst
Expand Up @@ -681,6 +681,12 @@ options. The exact mechanism is explained above the config options in the

If you have ``PRETTY_URLS`` enabled, that would be ``output/posts/foo/bar/index.html``.


.. warning::

Removing the ``.rst`` entries is not recommended. Some features (eg.
shortcodes) may not work properly if you do that.

The ``new_post`` command
~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -737,7 +743,8 @@ Teasers
You may not want to show the complete content of your posts either on your
index page or in RSS feeds, but to display instead only the beginning of them.

If it's the case, you only need to add a "magical comment" in your post.
If it's the case, you only need to add a "magical comment" ``TEASER_END`` or
``END_TEASER`` in your post.

In reStructuredText:

Expand Down Expand Up @@ -771,7 +778,7 @@ compatible with both WordPress and Nikola posts:
.. code:: python
import re
TEASER_REGEXP = re.compile('<!--\s*(more|TEASER_END)(:(.+))?\s*-->', re.IGNORECASE)
TEASER_REGEXP = re.compile('<!--\s*(more|TEASER_END|END_TEASER)(:(.+))?\s*-->', re.IGNORECASE)
Or you can completely customize the link using the ``READ_MORE_LINK`` option.

Expand Down Expand Up @@ -1177,6 +1184,12 @@ Example of a paired shortcode (note that we don't have a highlight shortcode yet
Built-in shortcodes
~~~~~~~~~~~~~~~~~~~

.. warning::

Some of the shortcodes are implemented as bindings to reST directives. In
order to use them, you need at least one entry for ``*.rst`` in
POSTS/PAGES.

chart
Create charts via PyGal. This is similar to the `chart directive <#chart>`__ except the syntax is adapted to
shortcodes. This is an example:
Expand Down Expand Up @@ -1228,7 +1241,7 @@ media
{{% raw %}}{{% media url="https://www.youtube.com/watch?v=Nck6BZga7TQ" %}}{{% /raw %}}
post-list
Will show a list of posts, see the `Post List directive for details <#post-list>`__
Will show a list of posts, see the `Post List directive for details <#post-list>`__.

raw
Passes the content along, mostly used so I can write this damn section and you can see the shortcodes instead
Expand Down Expand Up @@ -1317,7 +1330,7 @@ In that case, the template engine used will be your theme's and the arguments yo
as well as the global context from your ``conf.py``, are available to the template you
are creating.

You can use anything defined in your confguration's ``GLOBAL_CONTEXT`` as
You can use anything defined in your configuration's ``GLOBAL_CONTEXT`` as
variables in your shortcode template, with a caveat: Because of an unfortunate
implementation detail (a name conflict), ``data`` is called ``global_data``
when used in a shortcode.
Expand Down Expand Up @@ -1771,7 +1784,7 @@ to one of "disqus", "intensedebate", "livefyre", "moot", "facebook", "isso" or "
* For isso, it is the URL of isso (must be world-accessible, encoded with
Punycode (if using Internationalized Domain Names) and **have a trailing slash**,
default ``http://localhost:8080/``)
* For commento it's the URL of the commento instance as required by the ``serverUrl``
* For commento it's the URL of the commento instance as required by the ``serverUrl``
parameter in commento's documentation.

To use comments in a visible site, you should register with the service and
Expand Down Expand Up @@ -2618,7 +2631,6 @@ Using shortcode syntax (for other compilers):
{{% raw %}}{{% post-list stop=5 %}}{{% /post-list %}}{{% /raw %}}
The following options are recognized:

* ``start`` : integer
Expand Down
9 changes: 7 additions & 2 deletions docs/path_handlers.rst
Expand Up @@ -2,8 +2,13 @@
.. slug: path-handlers
.. author: The Nikola Team
Nikola supports special links with the syntax ``link://kind/name``. In the templates you can also use ``_link(kind, name)``.
You can also add query strings (``?key=value``) for extra arguments, or pass keyword arguments to ``_link`` in templates (support and behavior depends on path handlers themselves)
.. DO NOT EDIT, this file is auto-generated by scripts/document_path_handlers.py
Nikola supports special links with the syntax ``link://kind/name``. In
templates you can also use ``_link(kind, name)``. You can add query strings
(``?key=value``) for extra arguments, or pass keyword arguments to ``_link`` in
templates (support and behavior depends on path handlers themselves). Fragments
(``#anchor``) will be appended to the transformed link.

Here are the descriptions for all the supported kinds.

Expand Down
1 change: 0 additions & 1 deletion docs/template-variables.rst
Expand Up @@ -252,7 +252,6 @@ Name Type Description
``kind`` str The classification name
``items`` list? List of items for ``list.tmpl`` *(title, permalink, None)*
``posts`` list<Post>? List of items for other templates
``kind`` str The classification name
``permalink`` str Permanent link to page
``other_languages`` list<tuple> List of triples ``(other_lang, other_classification, title)``
=================== ============== =============================================================
Expand Down
5 changes: 5 additions & 0 deletions nikola/conf.py.in
Expand Up @@ -1006,6 +1006,11 @@ PRETTY_URLS = ${PRETTY_URLS}
# The default is ['fenced_code', 'codehilite']
MARKDOWN_EXTENSIONS = ['markdown.extensions.fenced_code', 'markdown.extensions.codehilite', 'markdown.extensions.extra']

# Options to be passed to markdown extensions (See https://python-markdown.github.io/reference/)
# Default is {} (no config at all)
# MARKDOWN_EXTENSION_CONFIGS = {}


# Extra options to pass to the pandoc command.
# by default, it's empty, is a list of strings, for example
# ['-F', 'pandoc-citeproc', '--bibliography=/Users/foo/references.bib']
Expand Down

0 comments on commit bb7fe3f

Please sign in to comment.