Skip to content

Commit

Permalink
chore: update docusaurus template (#1786)
Browse files Browse the repository at this point in the history
Signed-off-by: aeneasr <aeneas@ory.sh>
  • Loading branch information
aeneasr authored Apr 6, 2020
1 parent d8e1ec9 commit d1b74f8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/scripts/fix-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fs.readFile(file, (err, b) => {

const t = b
.toString()
.replace(/^id: api/gim, '')
.replace(/^id: api/img,'')
.replace(/^title:(.*)/im, 'title: REST API\nid: api') // improve title, add docusaurus id
.replace(/^language_tabs:.*\n/im, '') // not supported by docusaurus
.replace(/^toc_footers.*\n/im, '') // not supported by docusaurus
Expand Down
28 changes: 15 additions & 13 deletions docs/scripts/rerelease.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
const path = require('path');
const name = process.argv[2];
const fs = require('fs');

const p = path.join(__dirname, '../versions.json');

fs.writeFile(p, JSON.stringify(require(p).filter((v) => v !== name)), function (
err
) {
if (err) {
return console.error(err);
}
});
const path = require('path')
const name = process.argv[2];
const fs = require('fs');

const p = path.join(__dirname, '../versions.json');

fs.writeFile(
p,
JSON.stringify(require(p).filter(v => v !== name)),
function(err) {
if (err) {
return console.error(err);
}
}
);
4 changes: 2 additions & 2 deletions docs/src/pages/versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function Version() {
<tr>
<th>{latestVersion}</th>
<td>
<Link to={useBaseUrl('/docs')}>
<Link to={useBaseUrl('/')}>
Documentation
</Link>
</td>
Expand All @@ -49,7 +49,7 @@ function Version() {
<tr>
<th>master</th>
<td>
<Link to={useBaseUrl('/docs/next/index')}>
<Link to={useBaseUrl('/next/index')}>
Documentation
</Link>
</td>
Expand Down

0 comments on commit d1b74f8

Please sign in to comment.