Skip to content

Commit bf6d241

Browse files
committed
[dev] Disabling Disqus
1 parent 0b1ffa3 commit bf6d241

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

docusaurus.config.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ const AT_NOTATION_KEYS = {
1414

1515
const COMPONENTS_PATH = '@site/src/components';
1616

17-
let components = { Disqus: "Disqus" };
17+
// let components = { Disqus: "Disqus" };
18+
let components = {};
1819
let metaDescription = '';
1920

2021
const wrapDataWithComponent = (data, componentName) => {
@@ -102,10 +103,11 @@ const onAfterDataTransformation = (data) => {
102103

103104
if (allAvailableComponents.length !== 0) {
104105
const imports = `import { ${allAvailableComponents.join(', ')} } from '${COMPONENTS_PATH}';\n\n`;
105-
const isTitles = /---((?:\r?\n|\r)|.)+?---/.test(transformedData);
106-
transformedData = isTitles
107-
? (transformedData.replace(/^(---((?:\s*\n)|.)+?---)/, `$1\n\n${imports}`) + "\n\n<Disqus />")
108-
: imports + transformedData;
106+
transformedData = imports + transformedData;
107+
// const isTitles = /---((?:\r?\n|\r)|.)+?---/.test(transformedData);
108+
// transformedData = isTitles
109+
// ? (transformedData.replace(/^(---((?:\s*\n)|.)+?---)/, `$1\n\n${imports}`) + "\n\n<Disqus />")
110+
// : imports + transformedData;
109111
}
110112

111113
if (metaDescription) {
@@ -118,7 +120,7 @@ const onAfterDataTransformation = (data) => {
118120
});
119121
}
120122

121-
components = { Disqus: "Disqus" };
123+
// components = { Disqus: "Disqus" };
122124
metaDescription = '';
123125

124126
return transformedData;

0 commit comments

Comments
 (0)