Skip to content

Commit

Permalink
update code
Browse files Browse the repository at this point in the history
  • Loading branch information
Chakravarthy7102 committed Dec 4, 2023
1 parent dd08194 commit 2b12edb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion v2/buildDocsForProduction
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ rm ./build/blog.html
rm ./build/404.html
rm ./build/.nojekyll

# replaces all the occurances of supertokens.com/ with supertokens.com/docs when it's not starting with supertokens.com/img.
# updating search page url on documention with the correct path.
sed -i '' '/supertokens\.com\/img/!s/supertokens\.com/supertokens.com\/docs/g' ./build/opensearch.xml

mv ./build/opensearch.xml ./build/docs
Expand Down
2 changes: 1 addition & 1 deletion v2/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let beforeDefaultRemarkPlugins = [
];

let rehypePlugins = [
require('./src/plugins/addNofollowToExternalLinks'),
require('./src/plugins/addNofollowToExternalLinks')
];

module.exports = {
Expand Down
6 changes: 3 additions & 3 deletions v2/src/plugins/transformOpenSearchLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ module.exports = () => {
}

async function writeToHTML(filePath,modifiedContent) {
return new Promise((res, rej) => {
return new Promise((resolve, reject) => {
try {
fs.writeFile(filePath, modifiedContent, "utf8", err => {
if (err) {
return rej(err);
return reject(err);
} else {
return res();
return resolve();
}
});
} catch (error) {
Expand Down

0 comments on commit 2b12edb

Please sign in to comment.