Skip to content

Commit

Permalink
fix: added meta robots: noindex, nofollow to changelog, forms and pag…
Browse files Browse the repository at this point in the history
…e revisions

This was brought up in #133. Removing the changelog and forms from
search indices makes sense in general. Adding the meta tag to pages with
a specific revision helps to make sure that traffic coming from search
enginges is directed to the most recent version of a page.
  • Loading branch information
redimp committed Aug 29, 2024
1 parent a716b9c commit 0f95755
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions otterwiki/templates/changelog.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{# vim: set et ts=8 sts=4 sw=4 ai: #}
{% extends "wiki.html" %}
{%block head %}
{{ super() }}
<meta name="robots" content="noindex, nofollow"/>
{% endblock %}
{% block content %}
<div class="w-full mw-full p-0 clearfix">
<h2 class="float-left">Changelog</h2>
Expand Down
4 changes: 4 additions & 0 deletions otterwiki/templates/form.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{# vim: set et ts=8 sts=4 sw=4 ai: #}
{% extends "wiki.html" %}
{%block head %}
{{ super() }}
<meta name="robots" content="noindex, nofollow"/>
{% endblock %}
{% block content %}
<div class="col-sm-12 col-md-12 col-lg-10">
<div class="card">
Expand Down
6 changes: 6 additions & 0 deletions otterwiki/templates/page.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{#- vim: set et ts=8 sts=4 sw=4 ai: -#}
{% extends "wiki.html" %}
{%block head %}
{{ super() }}
{%-if revision %}
<meta name="robots" content="noindex"/>
{%-endif%}
{% endblock %}
{% block js %}
{{ super() }}
<script src="{{ url_for("static", filename="js/polyfill.e6.min.js") | debug_unixtime }}"></script>
Expand Down

0 comments on commit 0f95755

Please sign in to comment.