Skip to content

Commit 18455b3

Browse files
committed
Switched to giscus for comments and added blog template
1 parent a8c5da8 commit 18455b3

File tree

5 files changed

+60
-10
lines changed

5 files changed

+60
-10
lines changed

docs/blog/2021/excluding-content-from-search.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
template: overrides/main.html
2+
template: overrides/blog.html
33
description: >
44
Three new simple ways to exclude dedicated parts of a document from the search
55
index, allowing for more fine-grained control

docs/blog/2021/search-better-faster-smaller.md

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
template: overrides/main.html
2+
template: overrides/blog.html
33
description: >
44
How we rebuilt client-side search, delivering a better user experience while
55
making it faster and smaller at the same time
@@ -639,12 +639,7 @@ better. Next up:
639639
640640
If you've made it this far, thank you for your time and interest in Material
641641
for MkDocs! This is the first blog article that I decided to write after a
642-
short [Twitter survey] made me to. ~~You're invited to leave a comment
643-
to share your experiences with the new search implementation.~~[^9]
644-
645-
[^9]:
646-
We've disabled comments due to Disqus' ads being so incredibly horrible
647-
and invasive. If you know a better alternative, please ping me at
648-
642+
short [Twitter survey] made me to. You're invited to leave a comment
643+
to share your experiences with the new search implementation.
649644
650645
[Twitter survey]: https://twitter.com/squidfunk/status/1434477478823743488

docs/blog/2021/the-past-present-and-future.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
template: overrides/main.html
2+
template: overrides/blog.html
33
description: >
44
2021 was a fantastic year for this project as we shipped many new awesome
55
features and made this project sustainable

material/overrides/blog.html

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{#-
2+
This file was automatically generated - do not edit
3+
-#}
4+
{% extends "overrides/main.html" %}
5+
{% block content %}
6+
{{ super() }}
7+
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
8+
<script src="https://giscus.app/client.js" data-repo="squidfunk/mkdocs-material" data-repo-id="MDEwOlJlcG9zaXRvcnk1MDYxNzQyOA==" data-category="_" data-category-id="DIC_kwDOAwRcVM4CAtJY" data-mapping="pathname" data-reactions-enabled="1" data-emit-metadata="1" data-theme="light" data-lang="en" crossorigin="anonymous" async></script>
9+
{% endblock %}

src/overrides/blog.html

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!--
2+
Copyright (c) 2016-2022 Martin Donath <[email protected]>
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to
6+
deal in the Software without restriction, including without limitation the
7+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8+
sell copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in
12+
all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20+
IN THE SOFTWARE.
21+
-->
22+
23+
{% extends "overrides/main.html" %}
24+
25+
<!-- Content -->
26+
{% block content %}
27+
{{ super() }}
28+
29+
<!-- Giscus - generated by https://giscus.app -->
30+
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
31+
<script
32+
src="https://giscus.app/client.js"
33+
data-repo="squidfunk/mkdocs-material"
34+
data-repo-id="MDEwOlJlcG9zaXRvcnk1MDYxNzQyOA=="
35+
data-category="_"
36+
data-category-id="DIC_kwDOAwRcVM4CAtJY"
37+
data-mapping="pathname"
38+
data-reactions-enabled="1"
39+
data-emit-metadata="1"
40+
data-theme="light"
41+
data-lang="en"
42+
crossorigin="anonymous"
43+
async
44+
>
45+
</script>
46+
{% endblock %}

0 commit comments

Comments
 (0)