Revert commenting (does now work)

This commit is contained in:
Dimitry Ivanov 2019-04-05 14:57:57 +03:00
parent 5c0eead38d
commit f4e0ecc4fb
2 changed files with 0 additions and 33 deletions

View File

@ -1,31 +0,0 @@
<template></template>
<script>
export default {
destroyed() {
// remove comments section. It seems that utteranc does not support SPA
const utterances = document.querySelectorAll(".utterances");
const remove = e => e.parentElement.removeChild(e);
if (!!utterances) {
for (let i = 0; i < utterances.length; i++) {
remove(utterances[i]);
}
}
},
mounted() {
// this script adds HTML element and removes self
const script = document.createElement("script");
script.setAttribute("src", "https://utteranc.es/client.js");
script.setAttribute("repo", "noties/Markwon");
script.setAttribute("issue-term", "pathname");
script.setAttribute("label", "doc-comments");
script.setAttribute("theme", "github-light");
script.setAttribute("crossorigin", "anonymous");
script.setAttribute("async", true);
const page = document.querySelectorAll(".page")[0];
page.appendChild(script);
}
};
</script>

View File

@ -63,5 +63,3 @@ This section is kept due to historical reasons. Starting with version <Badge tex
the amount of magic is reduced. To leverage your `Markwon` usage a concept of `Plugin`
is introduced which helps to extend default behavior in a simple and _no-breaking-the-flow_ manner.
Head to the [next section](/docs/v3/core/plugins.md) to know more.
<Comments />