Skip to content

Commit 1ea5e7d

Browse files
committed
Add alternate links to crawlable Markdown versions of pages
1 parent a5e79e2 commit 1ea5e7d

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

docs/overrides/main.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% extends "base.html" %}
2+
3+
{% block extrahead %}
4+
{{ super() }}
5+
{%- if page -%}
6+
<link rel="alternate" type="text/markdown; charset=utf-8" href="{{ page.canonical_url }}index.md">
7+
{%- endif -%}
8+
{% endblock %}

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ theme:
1212
primary: indigo
1313
logo: images/logo.svg
1414
favicon: images/favicon.png
15+
custom_dir: docs/overrides
1516
markdown_extensions:
1617
- codehilite
1718
- admonition

0 commit comments

Comments
 (0)