aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2022-08-05 01:00:19 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2022-08-05 01:00:19 -0400
commit393aa58f2c5afd51f92fd9bd4b6dfd0dc90cea41 (patch)
treea61de275324558358abc0c85f85827649a159512 /docs
parent942e313727d1ad886a1024c24fe4a9e8e2e0bb3e (diff)
New upstream version 8.2.3.upstream/8.2.3
Diffstat (limited to 'docs')
-rw-r--r--docs/extending.rst2
-rw-r--r--docs/man/nikola.1.gzbin1783 -> 1787 bytes
-rw-r--r--docs/man/nikola.rst2
-rw-r--r--docs/manual.rst29
-rw-r--r--docs/social_buttons.rst2
-rw-r--r--docs/sphinx/conf.py6
-rw-r--r--docs/support.rst2
-rw-r--r--docs/template-variables.rst27
-rw-r--r--docs/theming.rst56
9 files changed, 73 insertions, 53 deletions
diff --git a/docs/extending.rst b/docs/extending.rst
index 395d839..eead796 100644
--- a/docs/extending.rst
+++ b/docs/extending.rst
@@ -6,7 +6,7 @@
.. description:
.. author: The Nikola Team
-:Version: 8.2.0
+:Version: 8.2.3
:Author: Roberto Alsina <ralsina@netmanagers.com.ar>
.. class:: alert alert-primary float-md-right
diff --git a/docs/man/nikola.1.gz b/docs/man/nikola.1.gz
index c6b9ec8..c850b70 100644
--- a/docs/man/nikola.1.gz
+++ b/docs/man/nikola.1.gz
Binary files differ
diff --git a/docs/man/nikola.rst b/docs/man/nikola.rst
index 470fe48..7290887 100644
--- a/docs/man/nikola.rst
+++ b/docs/man/nikola.rst
@@ -6,7 +6,7 @@ Nikola
A Static Site and Blog Generator
--------------------------------
-:Version: Nikola 8.2.0
+:Version: Nikola 8.2.3
:Manual section: 1
:Manual group: User Commands
diff --git a/docs/manual.rst b/docs/manual.rst
index f4ab0f0..1ca7a72 100644
--- a/docs/manual.rst
+++ b/docs/manual.rst
@@ -7,7 +7,7 @@
.. has_math: true
.. author: The Nikola Team
-:Version: 8.2.0
+:Version: 8.2.3
.. class:: alert alert-primary float-md-right
@@ -134,7 +134,7 @@ Obsolescence
You may say those are long term issues, or that they won't matter for years. Well,
I believe things should work forever, or as close to it as we can make them.
Nikola's static output and its input files will work as long as you can install
- Python 3.5 or newer under Linux, Windows, or macOS and can find a server
+ Python 3.7 or newer under Linux, Windows, or macOS and can find a server
that sends files over HTTP. That's probably 10 or 15 years at least.
Also, static sites are easily handled by the Internet Archive.
@@ -2089,8 +2089,11 @@ The ``conf.py`` options affecting images and gallery pages are these:
If you add a reST file in ``galleries/gallery_name/index.txt`` its contents will be
converted to HTML and inserted above the images in the gallery page. The
-format is the same as for posts. You can use the ``title`` and ``previewimage``
-metadata fields to change how the gallery is shown.
+format is the same as for posts. You can use the ``title``, ``previewimage``, and
+``status`` metadata fields to change how the gallery is shown.
+
+If the ``status`` is ``private``, ``draft``, or ``publish_later``, the
+gallery will not appear in the index, the RSS feeds, nor in the sitemap.
If you add some image filenames in ``galleries/gallery_name/exclude.meta``, they
will be excluded in the gallery page.
@@ -2619,13 +2622,14 @@ Once you have that, all you need to do is:
.. youtube:: 8N_tupPBtWQ
-Supported options: ``height``, ``width``, ``align`` (one of ``left``,
+Supported options: ``height``, ``width``, ``start_at``, ``align`` (one of ``left``,
``center``, ``right``) — all are optional. Example:
.. code:: restructuredtext
.. youtube:: 8N_tupPBtWQ
:align: center
+ :start_at: 4
Vimeo
~~~~~
@@ -2690,6 +2694,21 @@ for ``code`` directive are provided: ``code-block`` and ``sourcecode``:
print("Our virtues and our failings are inseparable")
+Certain lines might be highlighted via the ``emphasize-lines`` directive:
+
+.. code:: restructuredtext
+
+ .. code-block:: python
+ :emphasize-lines: 3,5
+
+ def some_function():
+ interesting = False
+ print('This line is highlighted.')
+ print('This one is not...')
+ print('...but this one is.')
+
+Line ranges are also supported, such as ``:emphasize-lines: 1-3,5-9,15``.
+
Listing
~~~~~~~
diff --git a/docs/social_buttons.rst b/docs/social_buttons.rst
index f1bfc08..f093a70 100644
--- a/docs/social_buttons.rst
+++ b/docs/social_buttons.rst
@@ -6,7 +6,7 @@
.. description:
.. author: The Nikola Team
-:Version: 8.2.0
+:Version: 8.2.3
.. class:: alert alert-primary float-md-right
diff --git a/docs/sphinx/conf.py b/docs/sphinx/conf.py
index 15c1ac0..51b3483 100644
--- a/docs/sphinx/conf.py
+++ b/docs/sphinx/conf.py
@@ -48,16 +48,16 @@ master_doc = 'index'
# General information about the project.
project = 'Nikola'
-copyright = '2012-2021, The Nikola Contributors'
+copyright = '2012-2022, The Nikola Contributors'
# The version info for the project yo're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
-version = '8.2.0'
+version = '8.2.3'
# The full version, including alpha/beta/rc tags.
-release = '8.2.0'
+release = '8.2.3'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/docs/support.rst b/docs/support.rst
index d25a4d4..e895bac 100644
--- a/docs/support.rst
+++ b/docs/support.rst
@@ -4,7 +4,7 @@
.. description: Get help using Nikola, or contact us.
.. author: The Nikola Team
-:Version: 8.2.0
+:Version: 8.2.3
.. class:: alert alert-primary float-md-right
diff --git a/docs/template-variables.rst b/docs/template-variables.rst
index aeb254a..63210c1 100644
--- a/docs/template-variables.rst
+++ b/docs/template-variables.rst
@@ -3,7 +3,7 @@
.. date: 2017-04-13 12:00:00
.. author: The Nikola Team
-:Version: 8.2.0
+:Version: 8.2.3
:Author: Chris Warrick <chris@getnikola.com>
Variables available in templates are listed below.
@@ -84,14 +84,6 @@ Name Type Descript
``navigation_links`` TranslatableSetting ``NAVIGATION_LINKS`` setting
``navigation_alt_links`` TranslatableSetting ``NAVIGATION_ALT_LINKS`` setting
``needs_ipython_css`` bool whether or not Jupyter CSS is needed by this site
-``posts_sections`` bool ``POSTS_SECTIONS`` setting
-``posts_section_are_indexes`` bool ``POSTS_SECTIONS_ARE_INDEXES`` setting
-``posts_sections_are_indexes`` bool ``POSTS_SECTIONS_ARE_INDEXES`` setting
-``posts_section_colors`` TranslatableSetting ``POSTS_SECTION_COLORS`` setting
-``posts_section_descriptions`` Tss ``POSTS_SECTION_DESCRIPTIONS`` setting
-``posts_section_from_meta`` bool ``POSTS_SECTION_FROM_META`` setting
-``posts_section_name`` TranslatableSetting[str] ``POSTS_SECTION_NAME`` setting
-``posts_section_title`` TranslatableSetting[str] ``POSTS_SECTION_TITLE`` setting
``rel_link`` function ``Nikola.rel_link`` function
``rss_link`` str ``RSS_LINK`` setting
``search_form`` TranslatableSetting[str] ``SEARCH_FORM`` setting
@@ -205,7 +197,6 @@ Taxonomy Variable Value
``category`` ``overview_page_hierarchy_variable_name`` ``cat_hierarchy``
``index`` ``overview_page_variable_name`` unavailable (None)
``page_index_folder`` ``overview_page_variable_name`` ``page_folder``
-``section_index`` ``overview_page_variable_name`` ``sections``
``tag`` ``overview_page_variable_name`` ``tags``
``tag`` ``overview_page_items_variable_name`` ``items``
====================== ========================================== ===================
@@ -224,7 +215,6 @@ Taxonomy Has hierarchy List (one classification) template
``category`` yes tag.tmpl tagindex.tmpl tags.tmpl (with tags) n/a ``CATEGORY_PAGES_ARE_INDEXES`` n/a
``index`` no n/a index.tmpl n/a n/a yes no
``page_index_folder`` yes list.tmpl n/a n/a n/a no no
-``section_index`` no list.tmpl sectionindex.tmpl n/a n/a ``POSTS_SECTIONS_ARE_INDEXES`` no
``tag`` no tag.tmpl tagindex.tmpl tags.tmpl (with categories) n/a ``TAG_PAGES_ARE_INDEXES`` no
====================== ================== ================================== ====================================== ============================================== ====================================== ============================== ==============================
@@ -391,19 +381,6 @@ Name Type Description
``source_link`` str Link to the source file
================== ========== ========================================
-Variables available in sections
--------------------------------
-
-.. class:: table table-bordered table-striped
-
-=================== =========== ===========================================================================
-Name Type Description
-=================== =========== ===========================================================================
-``section`` str Section name (internal)
-``kind`` str Always ``"section"``
-``other_languages`` list[tuple] List of tuples ``(lang, section, name)`` of same section in other languages
-=================== =========== ===========================================================================
-
Variables available in tag pages
--------------------------------
@@ -477,7 +454,7 @@ Post object attributes
This list only includes variables that make sense for templates. Some function signatures have been shortened to save space, ``?`` means the argument has default value.
-More docs: `nikola.post.Post on ReadTheDocs <https://nikola.readthedocs.io/en/latest/nikola/#nikola.post.Post>`_. Check out the source of the Post class as well.
+More docs: `nikola.post.Post on ReadTheDocs <https://nikola.readthedocs.io/en/latest/nikola.html#nikola.post.Post>`_. Check out the source of the Post class as well.
=================================================================== ========== =============================================================
Name Type Description
diff --git a/docs/theming.rst b/docs/theming.rst
index 957e68e..ff10d28 100644
--- a/docs/theming.rst
+++ b/docs/theming.rst
@@ -6,7 +6,7 @@
.. description:
.. author: The Nikola Team
-:Version: 8.2.0
+:Version: 8.2.3
:Author: Roberto Alsina <ralsina@netmanagers.com.ar>
.. class:: alert alert-primary float-md-right
@@ -284,10 +284,6 @@ These are the templates that come with the included themes:
``post_list_directive.tmpl``
Template used by the ``post_list`` reStructuredText directive.
-``sectionindex.tmpl``
- Used to display section indexes, if ``POST_SECTIONS_ARE_INDEXES`` is True.
- By default, it just inherits ``index.tmpl``, with added feeds.
-
``page.tmpl``
Used for pages that are not part of a blog, usually a cleaner, less
intrusive layout than ``post.tmpl``, but same parameters.
@@ -309,20 +305,50 @@ Variables available in templates
The full, complete list of variables available in templates is maintained in a separate
document: `Template variables <https://getnikola.com/template-variables.html>`_
-Customizing themes to user color preference and section colors
---------------------------------------------------------------
+Customizing themes to user color preference, colorizing category names
+----------------------------------------------------------------------
The user’s preference for theme color is exposed in templates as
``theme_color`` set in the ``THEME_COLOR`` option.
-Each section has an assigned color that is either set by the user or auto
-selected by adjusting the hue of the user’s ``THEME_COLOR``. The color is
-exposed in templates through ``post.section_color(lang)``. The function that
-generates the colors from strings and any given color (by section name and
-theme color for sections) is exposed through the
-``colorize_str_from_base_color(string, hex_color)`` function
+This theme color is exposed to the browser in default themes — some browsers
+might use this color in the user interface (eg. Chrome on Android in light mode
+displays the toolbar in this color).
+
+Nikola also comes with support for auto-generating colors similar to a base
+color. This can be used with ``theme_color`` and eg. category names. This
+feature is exposed to templates as two functions: ``colorize_str(string,
+hex_color, presets)`` and ``colorize_str_from_base_color(string, hex_color)``.
+If you want to display the category name in the color, first define a list of
+overrides in your ``conf.py`` file:
+
+.. code:: python
+
+ # end of conf.py
+ GLOBAL_CONTEXT = {
+ "category_colors": {
+ "Blue": "#0000FF"
+ }
+ }
+
+With that definition, you can now use ``colorize_str`` in your templates like this:
+
+.. code:: html+mako
+
+ <!-- Mako -->
+ <span style="background-color: ${colorize_str(post.meta('category'), theme_color, category_colors)}">${post.meta('category')}</span>
+
+.. code:: html+jinja
+
+ <!-- Jinja2 -->
+ <span style="background-color: {{ colorize_str(post.meta('category'), theme_color, category_colors) }}">{{ post.meta('category') }}</span>
+
+Note that the category named “Blue” will be displyed in #0000FF due to the
+override specified in your config; other categories will have an auto-generated
+color visually similar to your theme color.
+
-Hex color values, like that returned by the theme or section color can be
+Hex color values, like that returned by the theme or string colorization can be
altered in the HSL colorspace through the function
``color_hsl_adjust_hex(hex_string, adjust_h, adjust_s, adjust_l)``.
Adjustments are given in values between 1.0 and -1.0. For example, the theme
@@ -427,12 +453,10 @@ List of page kinds provided by default plugins:
* index, archive_page
* index, author_page
* index, main_index
-* index, section_page
* index, tag_page
* list
* list, archive_page
* list, author_page
-* list, section_page
* list, tag_page
* list, tags_page
* post_page