Skip to content

Commit 9cf597c

Browse files
authored
Merge pull request #622 from input-output-hk/djo/555/doc_versioning
Documentation versioning
2 parents 46bb605 + f2558c5 commit 9cf597c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+3235
-19
lines changed

docs/Makefile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,14 @@ clean:
2020
rm yarn.lock || true
2121

2222
upgrade: clean install
23-
yarn upgrade @docusaurus/core@latest @docusaurus/preset-classic@latest redocusaurus@latest
23+
yarn upgrade @docusaurus/core@latest @docusaurus/preset-classic@latest redocusaurus@latest
24+
25+
update-current:
26+
# Use docusaurus command to create a new version using a temporary name
27+
yarn run docusaurus docs:version updated
28+
# cleanup previous file & replace it with the updated ones
29+
rm -rf versioned_docs/version-maintained versioned_sidebars/version-maintained-sidebars.json
30+
mv versioned_docs/version-updated versioned_docs/version-maintained
31+
mv versioned_sidebars/version-updated-sidebars.json versioned_sidebars/version-maintained-sidebars.json
32+
# Remove the entry for the temporary version in the versions.json file
33+
sed -i '/updated/d' versions.json

docs/docusaurus.config.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,21 @@ const config = {
3333
path: 'root',
3434
routeBasePath: '/',
3535
sidebarPath: require.resolve('./sidebars.js'),
36-
editUrl: 'https://github.com/input-output-hk/mithril/edit/main/docs',
36+
editUrl: ({docPath}) => {
37+
// We want users to submit doc updates to the upstream/next version!
38+
// Otherwise we risk losing the update on the next release.
39+
return `https://github.com/input-output-hk/mithril/edit/main/docs/root/${docPath}`;
40+
},
41+
lastVersion: 'maintained',
42+
versions: {
43+
current: {
44+
label: 'Next 🚧',
45+
banner: 'unreleased',
46+
},
47+
maintained: {
48+
label: 'Current',
49+
}
50+
},
3751
},
3852
blog: {
3953
path: 'blog/',
@@ -113,6 +127,11 @@ const config = {
113127
label: 'About Mithril',
114128
position: 'left',
115129
},
130+
{
131+
type: 'docsVersionDropdown',
132+
position: 'right',
133+
dropdownActiveClassDisabled: true,
134+
},
116135
{
117136
label: 'Explorer',
118137
to: 'https://mithril.network/explorer',

docs/root/manual/developer-docs/nodes/mithril-aggregator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
sidebar_position: 1
33
---
44

5-
import NetworksMatrix from '../../../../shared/networks-matrix.md';
5+
import NetworksMatrix from '../../../networks-matrix.md';
66

77
# Mithril Aggregator Node
88

docs/root/manual/developer-docs/nodes/mithril-client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
sidebar_position: 3
33
---
44

5-
import NetworksMatrix from '../../../../shared/networks-matrix.md';
5+
import NetworksMatrix from '../../../networks-matrix.md';
66

77
# Mithril Client Node
88

docs/root/manual/developer-docs/nodes/mithril-signer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
sidebar_position: 2
33
---
44

5-
import NetworksMatrix from '../../../../shared/networks-matrix.md';
5+
import NetworksMatrix from '../../../networks-matrix.md';
66

77
# Mithril Signer Node
88

docs/root/manual/developer-docs/references.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
sidebar_position: 2
33
---
44

5-
import NetworksMatrix from '../../../shared/networks-matrix.md';
5+
import NetworksMatrix from '../../networks-matrix.md';
66

77
# API Reference
88

docs/root/manual/getting-started/bootstrap-cardano-node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
sidebar_position: 1
33
---
44

5-
import NetworksMatrix from '../../../shared/networks-matrix.md';
5+
import NetworksMatrix from '../../networks-matrix.md';
66

77
# Bootstrap a Cardano Node
88

docs/root/manual/getting-started/run-signer-node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
sidebar_position: 2
33
---
44

5-
import NetworksMatrix from '../../../shared/networks-matrix.md';
5+
import NetworksMatrix from '../../networks-matrix.md';
66

77
# Run a Mithril Signer node (SPO)
88

docs/shared/networks-matrix.md renamed to docs/root/networks-matrix.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
unlisted: true
3+
hide_title: true
4+
hide_table_of_contents: true
5+
---
6+
17
Here is an up to date list of all the **Mithril Networks**, their configurations and their status:
28

39
> Last update: 11/14/2022

docs/sidebars.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
/**
2-
* Creating a sidebar enables you to:
3-
- create an ordered group of docs
4-
- render a sidebar for each doc of that group
5-
- provide next/previous navigation
6-
7-
The sidebars can be generated from the filesystem, or explicitly defined here.
8-
9-
Create as many sidebars as you want.
10-
*/
11-
121
// @ts-check
132

143
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */

0 commit comments

Comments
 (0)