Navigation Menu

Skip to content

Commit

Permalink
Drop annotations support (annotateit.org closed down in March 2017)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jun 12, 2017
1 parent 5669526 commit 4dff674
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 60 deletions.
2 changes: 0 additions & 2 deletions docs/creating-a-theme.txt
Expand Up @@ -326,7 +326,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 +361,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
21 changes: 3 additions & 18 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 @@ -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 @@ -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/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
3 changes: 0 additions & 3 deletions docs/theming.txt
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: 0 additions & 7 deletions nikola/conf.py.in
Expand Up @@ -907,13 +907,6 @@ COMMENT_SYSTEM = ${COMMENT_SYSTEM}
# is in the manual.
COMMENT_SYSTEM_ID = ${COMMENT_SYSTEM_ID}

# Enable annotations using annotateit.org?
# If set to False, you can still enable them for individual posts and pages
# setting the "annotations" metadata.
# If set to True, you can disable them for individual posts and pages using
# the "noannotations" metadata.
# ANNOTATIONS = False

# Create index.html for page folders?
# WARNING: if a page would conflict with the index file (usually
# caused by setting slug to `index`), the PAGE_INDEX
Expand Down
5 changes: 0 additions & 5 deletions nikola/data/themes/bootstrap3-jinja/templates/base.tmpl
Expand Up @@ -83,11 +83,6 @@
</script>
<!-- end fancy dates -->
{% block extra_js %}{% endblock %}
{% if annotations and post and not post.meta('noannotations') %}
{{ notes.code() }}
{% elif not annotations and post and post.meta('annotations') %}
{{ notes.code() }}
{% endif %}
{{ body_end }}
{{ template_hooks['body_end']() }}
</body>
Expand Down
Expand Up @@ -130,11 +130,6 @@ lang="{{ lang }}">
<link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css">
<link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css">
{% endif %}
{% if annotations and post and not post.meta('noannotations') %}
{{ notes.css() }}
{% elif not annotations and post and post.meta('annotations') %}
{{ notes.css() }}
{% endif %}
{% endmacro %}

{% macro html_navigation_links() %}
Expand Down
5 changes: 0 additions & 5 deletions nikola/data/themes/bootstrap3/templates/base.tmpl
Expand Up @@ -83,11 +83,6 @@ ${base.late_load_js()}
</script>
<!-- end fancy dates -->
<%block name="extra_js"></%block>
% if annotations and post and not post.meta('noannotations'):
${notes.code()}
% elif not annotations and post and post.meta('annotations'):
${notes.code()}
% endif
${body_end}
${template_hooks['body_end']()}
</body>
Expand Down
5 changes: 0 additions & 5 deletions nikola/data/themes/bootstrap3/templates/base_helper.tmpl
Expand Up @@ -130,11 +130,6 @@ lang="${lang}">
<link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css">
<link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css">
% endif
% if annotations and post and not post.meta('noannotations'):
${notes.css()}
% elif not annotations and post and post.meta('annotations'):
${notes.css()}
% endif
</%def>

<%def name="html_navigation_links()">
Expand Down
2 changes: 0 additions & 2 deletions nikola/nikola.py
Expand Up @@ -438,7 +438,6 @@ def __init__(self, **config):

# This is the default config
self.config = {
'ANNOTATIONS': False,
'ARCHIVE_PATH': "",
'ARCHIVE_FILENAME': "archive.html",
'ARCHIVES_ARE_INDEXES': False,
Expand Down Expand Up @@ -1091,7 +1090,6 @@ def _set_global_context_from_config(self):
self._GLOBAL_CONTEXT['exists'] = self.file_exists
self._GLOBAL_CONTEXT['SLUG_AUTHOR_PATH'] = self.config['SLUG_AUTHOR_PATH']
self._GLOBAL_CONTEXT['SLUG_TAG_PATH'] = self.config['SLUG_TAG_PATH']
self._GLOBAL_CONTEXT['annotations'] = self.config['ANNOTATIONS']
self._GLOBAL_CONTEXT['index_display_post_count'] = self.config[
'INDEX_DISPLAY_POST_COUNT']
self._GLOBAL_CONTEXT['index_file'] = self.config['INDEX_FILE']
Expand Down
7 changes: 0 additions & 7 deletions tests/data/translated_titles/conf.py
Expand Up @@ -428,13 +428,6 @@
# is in the manual.
COMMENT_SYSTEM_ID = "nikolademo"

# Enable annotations using annotateit.org?
# If set to False, you can still enable them for individual posts and pages
# setting the "annotations" metadata.
# If set to True, you can disable them for individual posts and pages using
# the "noannotations" metadata.
# ANNOTATIONS = False

# Create index.html for page folders?
# PAGE_INDEX = False
# Enable comments on page pages?
Expand Down

0 comments on commit 4dff674

Please sign in to comment.