Skip to content

Commit

Permalink
Merge branch 'master' into listing-shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Jul 24, 2017
2 parents 96b79b4 + 35f9b00 commit ca6c934
Show file tree
Hide file tree
Showing 18 changed files with 513 additions and 380 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Expand Up @@ -5,6 +5,9 @@ Features
--------

* New ``listings`` shortcode similar to the reStructuredText listings directive (Issue #2868)
* Switch to reStructuredText’s new HTML 5 renderer (Issue #2874)
* Deprecate ``html4css1.css`` in favor of ``rst_base.css`` (Issue
#2874)
* Add support for ``MetadataExtractor`` plugins that allow custom,
extensible metadata extraction from posts (Issue #2830)
* Support YAML and TOML metadata in 2-file posts (via Issue #2830)
Expand Down
14 changes: 7 additions & 7 deletions docs/creating-a-theme.txt
Expand Up @@ -177,7 +177,7 @@ see something fairly similar:
<meta name="viewport" content="width=device-width">
<title>My Nikola Site | My Nikola Site</title>

<link href="assets/css/html4css1.css" rel="stylesheet" type="text/css">
<link href="assets/css/rst_base.css" rel="stylesheet" type="text/css">
<link href="assets/css/code.css" rel="stylesheet" type="text/css">
<link href="assets/css/theme.css" rel="stylesheet" type="text/css">

Expand All @@ -200,7 +200,7 @@ in a particular way, using a setting called ``CODE_COLOR_SCHEME`` where you can
what color scheme the syntax highlighter uses. You can use your own ``assets/css/code.css`` if you
don’t like the provided ones.

Nikola **requires** ``assets/css/html4css1.css`` and ``assets/css/code.css`` to function properly.
Nikola **requires** ``assets/css/rst_base.css`` and ``assets/css/code.css`` to function properly.
We will also add themes for Jupyter (``assets/css/ipython.min.css``
and ``assets/css/nikola_ipython.css``) into the template; note that they are
activated only if you configured your ``POSTS``/``PAGES`` with ipynb support.
Expand Down Expand Up @@ -228,7 +228,7 @@ The part we want to change is this:
<link href="/assets/css/all-nocdn.css" rel="stylesheet" type="text/css">
%endif
%else:
<link href="/assets/css/html4css1.css" rel="stylesheet" type="text/css">
<link href="/assets/css/rst_base.css" rel="stylesheet" type="text/css">
<link href="/assets/css/nikola_rst.css" rel="stylesheet" type="text/css">
<link href="/assets/css/code.css" rel="stylesheet" type="text/css">
<link href="/assets/css/theme.css" rel="stylesheet" type="text/css">
Expand All @@ -250,7 +250,7 @@ And we will change it so it uses the lanyon styles instead of theme.css (again,
%if use_bundles:
<link href="/assets/css/all.css" rel="stylesheet" type="text/css">
%else:
<link href="/assets/css/html4css1.css" rel="stylesheet" type="text/css">
<link href="/assets/css/rst_base.css" rel="stylesheet" type="text/css">
<link href="/assets/css/nikola_rst.css" rel="stylesheet" type="text/css">
<link href="/assets/css/poole.css" rel="stylesheet" type="text/css">
<link href="/assets/css/lanyon.css" rel="stylesheet" type="text/css">
Expand Down Expand Up @@ -403,7 +403,7 @@ So, first, lets change that base template to be more lanyon-like:
And that’s after I exposed the sidebar by clicking on an invisible widget!

One problem, which causes that yellow color in the sidebar is a CSS conflict.
We are loading ``html4css1.css`` which specifies
We are loading ``rst_base.css`` which specifies
the background color of ``div.sidebar`` which is more specific than
``lanyon.css``, which specifies for ``.sidebar`` alone.

Expand Down Expand Up @@ -507,7 +507,7 @@ and at the bottom a label for the sidebar toggle. Easy to do in ``base.tmpl``

Getting there!

The sidebar looks bad because of yet more CSS conflicts with ``html4css1.css``. By
The sidebar looks bad because of yet more CSS conflicts with ``rst_base.css``. By
adding some extra styling in ``lanyon.css``, it will look better.

.. code:: css
Expand Down Expand Up @@ -817,7 +817,7 @@ which makes sites load faster. To do that, your theme needs a ``bundles`` file w

For the Lanyon theme, it should be like this::

assets/css/all.css=html4css1.css,nikola_rst.css,code.css,poole.css,lanyon.css,custom.css
assets/css/all.css=rst_base.css,nikola_rst.css,code.css,poole.css,lanyon.css,custom.css

**Note:** Some themes also support the ``USE_CDN`` option meaning that in some cases it will load one bundle with all CSS and in other will load some CSS files
from a CDN and others from a bundle. This is complicated and probably not worth the effort.
Expand Down
6 changes: 3 additions & 3 deletions docs/manual.txt
Expand Up @@ -598,7 +598,7 @@ default set to:

TRANSLATIONS_PATTERN = "{path}.{lang}.{ext}"

.. note:: Considered languages
.. admonition:: Considered languages

Nikola will only look for translation of input files for languages
specified in the TRANSLATIONS variable.
Expand Down Expand Up @@ -669,7 +669,7 @@ options. The exact mechanism is explained above the config options in the
("pages/*.html", "pages", "story.tmpl"),
)

.. note:: POSTS and PAGES are not flat!
.. admonition:: POSTS and PAGES are not flat!

Even if the syntax may suggest you can't, you can create any directory structure you want
inside ``posts/`` or ``pages/`` and it will be reflected in the output. For example,
Expand Down Expand Up @@ -1155,7 +1155,7 @@ Example of a paired shortcode (note that we don't have a highlight shortcode yet

{{% raw %}}{{% highlight python %}} A bunch of code here {{% /highlight %}}{{% /raw %}}

.. note:: Shortcodes and reStructuredText
.. admonition:: Shortcodes and reStructuredText

In reStructuredText shortcodes may fail because docutils turns URL into links and everything breaks.
For some shortcodes there are alternative docutils directives (example, you can use the media
Expand Down
2 changes: 1 addition & 1 deletion docs/theming.txt
Expand Up @@ -78,7 +78,7 @@ bundles

.. code:: text

assets/css/all.css=bootstrap.css,html4css1.css,nikola_rst.css,code.css,colorbox.css,custom.css
assets/css/all.css=bootstrap.css,rst_base.css,nikola_rst.css,code.css,colorbox.css,custom.css

This creates a file called "assets/css/all.css" in your output that is the
combination of all the other file paths, relative to the output file.
Expand Down
2 changes: 1 addition & 1 deletion nikola/data/themes/base-jinja/templates/base_helper.tmpl
Expand Up @@ -85,7 +85,7 @@ lang="{{ lang }}">
{% endif %}
{% else %}
<link href="/assets/css/baguetteBox.min.css" rel="stylesheet" type="text/css">
<link href="/assets/css/html4css1.css" rel="stylesheet" type="text/css">
<link href="/assets/css/rst_base.css" rel="stylesheet" type="text/css">
<link href="/assets/css/nikola_rst.css" rel="stylesheet" type="text/css">
<link href="/assets/css/code.css" rel="stylesheet" type="text/css">
<link href="/assets/css/theme.css" rel="stylesheet" type="text/css">
Expand Down

0 comments on commit ca6c934

Please sign in to comment.