Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
merged master
  • Loading branch information
Roberto Alsina committed Jun 23, 2017
2 parents a7f1fb6 + f9f3c54 commit f563501
Show file tree
Hide file tree
Showing 196 changed files with 776 additions and 1,620 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -11,7 +11,6 @@ addons:
- language-pack-en-base
- language-pack-pl-base
python:
- '2.7'
- '3.3'
- '3.4'
- '3.5'
Expand Down
25 changes: 25 additions & 0 deletions CHANGES.txt
Expand Up @@ -5,7 +5,32 @@ Features
--------

* Add support for extended metadata in galleries
* Use ``PRETTY_URLS`` by default on all sites (Issue #1838)
* Feed link generation is completely refactored (Issue #2844)

Bugfixes
--------

* Fix crash when compiling empty ``.html`` posts (Issue #2851)
* Make failures to get source commit hash non-fatal in
``github_deploy`` (Issue #2847)
* Less cryptic error when guessing format from extension in ``new_post``
fails
* Use Jupyter name more consistently in docs
* Support CODE_COLOR_SCHEME in Jupyter notebooks (Issue #2093)
* Language was not passed to title and link generation for page indexes

Removed features
----------------

* Drop Python 2 support
* Remove ``nikola install_theme`` — use ``nikola theme`` instead
* Drop insecure post encryption feature
* Stop supporting all deprecated config options
* Drop annotations support (annotateit.org closed down in March 2017)
* Remove taxonomy option ``also_create_classifications_from_other_languages``
(Issue #2785)
>>>>>>> master

New in v7.8.8
=============
Expand Down
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at info@getnikola.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -43,7 +43,7 @@ It has many features, but here are some of the nicer ones:
* Syntax highlighting for almost any programming language or markup
* Multilingual sites, `translated to 50 languages.`__
* Doesn't reinvent wheels, leverages existing tools.
* Python 2.7, 3.3, 3.4, 3.5 and 3.6 compatible.
* Python 3.3+ compatible.

.. _Nikola Handbook: https://getnikola.com/handbook.html#why-static
__ https://users.getnikola.com/
Expand Down
1 change: 0 additions & 1 deletion appveyor.yml
Expand Up @@ -2,7 +2,6 @@
build: false
environment:
matrix:
- PYTHON: "C:/Python27"
- PYTHON: "C:/Python36"
init:
- "ECHO %PYTHON%"
Expand Down
23 changes: 12 additions & 11 deletions docs/creating-a-theme.txt
Expand Up @@ -17,7 +17,7 @@ create themes. Since I **suck** at designing websites, I asked for opinions on t
and got some feedback. Since this is **Not So Hard™**, I will try to make time to port a few
and see what happens.

If you are looking for a reference, check out `Theming reference <theming.html>`_ and `Template variables <https://getnikola.com/template-variables.html>`_.
If you are looking for a reference, check out :doc:`Theming reference <theming>` and `Template variables <https://getnikola.com/template-variables.html>`_.

Today’s theme is `Lanyon <https://github.com/poole/lanyon>`__ which is written by `@mdo <https://twitter.com/mdo>`__
and released under a MIT license, which is liberal enough.
Expand Down Expand Up @@ -176,7 +176,7 @@ see something fairly similar:
<meta name="viewport" content="width=device-width">
<title>My Nikola Site | My Nikola Site</title>

<link href="assets/css/rst.css" rel="stylesheet" type="text/css">
<link href="assets/css/html4css1.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 @@ -199,10 +199,11 @@ 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/rst.css`` and ``assets/css/code.css`` to function properly.
We will also add themes for IPython Notebook (``assets/css/ipython.min.css``
Nikola **requires** ``assets/css/html4css1.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.
There’s also ``assets/css/nikola_rst.css``, which adds Bootstrap 3-style reST notes etc.

But how do I tell **our** lanyon theme to use those CSS files instead of whatever it’s using now?
By giving our theme its own base_helper.tmpl.
Expand All @@ -226,7 +227,8 @@ 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/rst.css" rel="stylesheet" type="text/css">
<link href="/assets/css/html4css1.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">
%if has_custom_css:
Expand All @@ -247,7 +249,8 @@ 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/rst.css" rel="stylesheet" type="text/css">
<link href="/assets/css/html4css1.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">
<link href="/assets/css/code.css" rel="stylesheet" type="text/css">
Expand Down Expand Up @@ -326,7 +329,6 @@ all the interesting stuff:
<%namespace name="base" file="base_helper.tmpl" import="*"/>
<%namespace name="header" file="base_header.tmpl" import="*"/>
<%namespace name="footer" file="base_footer.tmpl" import="*"/>
<%namespace name="annotations" file="annotation_helper.tmpl"/>
${set_locale(lang)}
${base.html_headstart()}
<%block name="extra_head">
Expand Down Expand Up @@ -362,7 +364,6 @@ So, first, lets change that base template to be more lanyon-like:
<%namespace name="base" file="base_helper.tmpl" import="*"/>
<%namespace name="header" file="base_header.tmpl" import="*"/>
<%namespace name="footer" file="base_footer.tmpl" import="*"/>
<%namespace name="annotations" file="annotation_helper.tmpl"/>
${set_locale(lang)}
${base.html_headstart()}
<%block name="extra_head">
Expand Down Expand Up @@ -401,7 +402,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 ``rst.css`` which specifies
We are loading ``html4css1.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 @@ -505,7 +506,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 ``rst.css``. By
The sidebar looks bad because of yet more CSS conflicts with ``html4css1.css``. By
adding some extra styling in ``lanyon.css``, it will look better.

.. code:: css
Expand Down Expand Up @@ -815,7 +816,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=rst.css,code.css,poole.css,lanyon.css,custom.css
assets/css/all.css=html4css1.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
41 changes: 13 additions & 28 deletions docs/manual.txt
Expand Up @@ -78,7 +78,7 @@ Nikola can't do:
* Twitter
* Facebook
* An Issue tracker
* Anything with forms, really (except for `comments <#comments-and-annotations>`_!)
* Anything with forms, really (except for `comments`_!)

Keep in mind that "static" doesn't mean **boring**. You can have animations, slides
or whatever fancy CSS3/HTML5 thingie you like. It only means all that HTML is
Expand Down Expand Up @@ -136,7 +136,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
a Python 2.7/3.3 or newer under Linux, Windows, or OS X and can find a server
Python 3.3 or newer under Linux, Windows, or OS X 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.
Expand Down Expand Up @@ -227,7 +227,7 @@ easier to keep it in a single location.
The contents of your post have to be written (by default) in `reStructuredText <http://docutils.sf.net>`__
but you can use a lot of different markups using the ``-f`` option.

Currently, Nikola supports reStructuredText, Markdown, Jupyter (IPython) Notebooks, HTML as input,
Currently, Nikola supports reStructuredText, Markdown, Jupyter Notebooks, HTML as input,
can also use Pandoc for conversion, and has support for BBCode, CreoleWiki, txt2tags, Textile
and more via plugins — for more details, read the `input format documentation
<#multiple-input-formats>`__.
Expand Down Expand Up @@ -326,9 +326,6 @@ author
Author of the post, will be used in the RSS feed and possibly in the post
display (theme-dependent)

annotations / noannotations
Override the value of the ``ANNOTATIONS`` option for this specific post or page.

enclosure
Add an enclosure to this post when it's used in RSS. See `more information about enclosures <http://en.wikipedia.org/wiki/RSS_enclosure>`__

Expand Down Expand Up @@ -1035,7 +1032,7 @@ Nikola supports multiple input formats. Out of the box, we have compilers avail

* reStructuredText (default and pre-configured)
* `Markdown`_
* `Jupyter/IPython Notebook`_
* `Jupyter Notebook`_
* `HTML`_
* `PHP`_
* anything `Pandoc`_ supports (including Textile, DocBook, LaTeX, MediaWiki,
Expand Down Expand Up @@ -1093,12 +1090,12 @@ config option:
Nikola comes with some Markdown Extensions built-in and enabled by default,
namely a gist directive, a podcast directive, and ``~~strikethrough~~`` support.

Jupyter/IPython Notebook
````````````````````````
Jupyter Notebook
````````````````

To use Jupyter Notebooks (previously known as IPython Notebooks) as posts/pages,
make sure ``ipynb`` is in your ``COMPILERS`` and that the ``.ipynb`` extension
is defined in ``POSTS`` and ``PAGES``.
To use Jupyter Notebooks as posts/pages, make sure ``ipynb`` is in your
``COMPILERS`` and that the ``.ipynb`` extension is defined in ``POSTS`` and
``PAGES``.

The ``-f`` argument to ``new_post`` should be used in the ``ipynb@KERNEL`` format.
It defaults to Python in the version used by Nikola if not specified.
Expand Down Expand Up @@ -1411,7 +1408,7 @@ CSS tweaking
for minimal disruption of the provided CSS files.

If you feel tempted to touch other files in assets, you probably will be better off
with a `custom theme <theming.html>`__.
with a :doc:`custom theme <theming>`.

If you want to use LESS_ or Sass_ for your custom CSS, or the theme you use
contains LESS or Sass code that you want to override, you will need to install
Expand All @@ -1425,7 +1422,7 @@ CSS tweaking

Template tweaking and creating themes
If you really want to change the pages radically, you will want to do a
`custom theme <theming.html>`__.
:doc:`custom theme <theming>`.

Navigation Links
The ``NAVIGATION_LINKS`` option lets you define what links go in a sidebar or menu
Expand Down Expand Up @@ -1718,8 +1715,8 @@ GitLab also offers rebuild automation if you want to use Nikola with GitLab
Pages. Check out the example `Nikola site on GitLab
<https://gitlab.com/pages/nikola>`_.

Comments and Annotations
------------------------
Comments
--------

While Nikola creates static sites, there is a minimum level of user interaction you
are probably expecting: comments.
Expand Down Expand Up @@ -1799,18 +1796,6 @@ You can disable comments for a post by adding a "nocomments" metadata field to i
You need jQuery, but not because Facebook wants it (see Issue
#639).

An alternative or complement to comments are annotations. Nikola integrates
the annotation service provided by `AnnotateIt. <http://annotateit.org/>`_
To use it, set the ``ANNOTATIONS`` option to True. This is specially useful
if you want feedback on specific parts of your writing.

You can enable or disable annotations for specific posts or pages using the
``annotations`` and ``noannotations`` metadata.

Annotations require jQuery and are therefore not supported in the base theme.
You can check bootstrap theme's ``base.html`` for details on how to handle them in
custom themes.

Images and Galleries
--------------------

Expand Down
1 change: 0 additions & 1 deletion docs/sphinx/requirements-docs.txt
@@ -1,3 +1,2 @@
-r ../../requirements-extras.txt
doit
pyparsing>=2.0.2
3 changes: 1 addition & 2 deletions docs/template-variables.rst
Expand Up @@ -39,7 +39,6 @@ Name Type Descript
================================== ================================== ================================================================================
``_link`` function ``Nikola.link`` function
``abs_link`` function ``Nikola.abs_link`` function
``annotations`` bool ``ANNOTATIONS`` setting
``author_pages_generated`` bool False
``blog_author`` TranslatableSetting<str> ``BLOG_AUTHOR`` setting
``blog_description`` TranslatableSetting<str> ``BLOG_DESCRIPTION`` setting
Expand Down Expand Up @@ -78,7 +77,7 @@ Name Type Descript
``meta_generator_tag`` bool ``META_GENERATOR_TAG`` setting
``momentjs_locales`` defaultdict<str, str> dictionary of available Moment.js locales
``navigation_links`` TranslatableSetting ``NAVIGATION_LINKS`` setting
``needs_ipython_css`` bool whether or not IPython CSS is needed by this site
``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
Expand Down
7 changes: 2 additions & 5 deletions docs/theming.txt
Expand Up @@ -19,7 +19,7 @@ Theming Nikola
.. class:: lead

This document is a reference about themes. If you want a tutorial, please read
`Creating a Theme <creating-a-theme.html>`_. If you’re looking for a ready-made
:doc:`Creating a Theme <creating-a-theme>`. If you’re looking for a ready-made
theme for your site, check out the `Themes Index <https://themes.getnikola.com/>`_.

The Structure
Expand Down Expand Up @@ -78,7 +78,7 @@ bundles

.. code:: text

assets/css/all.css=bootstrap.css,rst.css,code.css,colorbox.css,custom.css
assets/css/all.css=bootstrap.css,html4css1.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 Expand Up @@ -195,9 +195,6 @@ These are the templates that come with the included themes:
Template used to render the multipost indexes. The posts are in a ``posts`` variable.
Some functionality is in the ``index_helper.tmpl`` helper template.

``annotation_helper.tmpl`` (internal)
Code for the optional annotations feature.

``archive_navigation_helper.tmpl``
Code that implements archive navigation (previous/up/next). Included by
archive templates.
Expand Down
7 changes: 5 additions & 2 deletions nikola/__init__.py
Expand Up @@ -26,11 +26,14 @@

"""Nikola -- a modular, fast, simple, static website generator."""

from __future__ import absolute_import
import os
import sys

__version__ = '7.8.8'
__version__ = '8.0.0.dev0'
DEBUG = bool(os.getenv('NIKOLA_DEBUG'))

if sys.version_info[0] == 2:
raise Exception("Nikola does not support Python 2.")

from .nikola import Nikola # NOQA
from . import plugins # NOQA

0 comments on commit f563501

Please sign in to comment.