From: nodiscc Date: Thu, 30 Aug 2018 17:36:22 +0000 (+0200) Subject: add "noindex, nofollow" HTML robots meta-tag to documentation pages X-Git-Tag: v0.10.3~2^2~16^2~1 X-Git-Url: https://git.immae.eu/?p=github%2Fshaarli%2FShaarli.git;a=commitdiff_plain;h=2b4f391559586af734d5d5cb5886aa78c4f9557d;hp=f28b73b21f705102f8536cd16ea28122aa870e49 add "noindex, nofollow" HTML robots meta-tag to documentation pages - Customize the "readthedocs" mkdocs theme: https://www.mkdocs.org/user-guide/styling-your-docs/#customizing-a-theme - Adds a '' HTML tag on each page - Do not include robots directive on readthedocs.org, only in local builds --- diff --git a/doc/custom_theme/main.html b/doc/custom_theme/main.html new file mode 100644 index 00000000..69b398f6 --- /dev/null +++ b/doc/custom_theme/main.html @@ -0,0 +1,25 @@ +{% extends "base.html" %} + +{# +The entry point for the ReadTheDocs Theme. + +Any theme customisations should override this file to redefine blocks defined in +the various templates. The custom theme should only need to define a main.html +which `{% extends "base.html" %}` and defines various blocks which will replace +the blocks defined in base.html and its included child templates. +#} + +{%- block site_meta %} + + + + +{%- if 'media.readthedocs.org' not in config.extra_css[0] %} + +{%- endif %} + +{% if page and page.is_homepage %}{% endif %} +{% if config.site_author %}{% endif %} +{% if config.site_favicon %} +{% else %}{% endif %} +{%- endblock %} diff --git a/mkdocs.yml b/mkdocs.yml index 941fce3a..248fdbfe 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,7 +2,9 @@ site_name: Shaarli Documentation repo_url: https://github.com/shaarli/Shaarli edit_uri: edit/master/doc/md site_description: The personal, minimalist, super-fast, database free, bookmarking service -theme: readthedocs +theme: + name: readthedocs + custom_dir: doc/custom_theme/ docs_dir: doc/md site_dir: doc/html # Disable strict mode until ReadTheDocs provides up-to-date MkDocs settings: