Skip to content

Commit 694537d

Browse files
authored
fix(docs): Make viewing (outdated) protocol specs work locally (#13534)
Viewing the protocol specs pages currently (with `yarn dev` or `yarn dev:local` in ./docs) currently doesnt work because the versioned docs do not include the protocol specs pages. This PR disables versioning for viewing protocol specs pages locally, so it will work.
1 parent a2f5553 commit 694537d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

docs/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,12 @@ When docusaurus builds, it looks for the `versions.json` file, and builds the ve
174174

175175
A new docs site is published on every merge to the master branch, if there are any changes in the docs folder. You can also manually trigger a new deployment by running the `docs-deploy` workflow in the [Github Actions tab](https://github.com/AztecProtocol/aztec-packages/actions/workflows/docs-deploy.yml). This can be triggered from a branch and does not have to wait for a PR to be merged, although merging a PR is recommended.
176176

177+
## Viewing (outdated) protocol specs
178+
179+
The protocol specs pages are outdated, but it may still be useful to view them in some cases.
180+
181+
To view the protocol specs, you can run `yarn dev` or `yarn dev:local`. When viewing the protocol specs locally, versioning is disabled, so you can view the protocol specs in the browser. It would error otherwise because the protocol specs pages are not included in the pages in `versioned_docs` and `versioned_sidebars`.
182+
177183
## Contributing
178184

179185
We welcome contributions from the community. Please review our [contribution guidelines](CONTRIBUTING.md) for more information.

docs/docusaurus.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const config = {
6262
);
6363
},
6464
routeBasePath: "/",
65+
disableVersioning: process.env.ENV === "dev",
6566
include: process.env.SHOW_PROTOCOL_SPECS
6667
? ["**/*.{md,mdx}"]
6768
: ["**/*.{md,mdx}", "!protocol-specs/**"],
@@ -79,6 +80,9 @@ const config = {
7980
],
8081
versions: (() => {
8182
const versionObject = {};
83+
if (process.env.ENV === "dev") {
84+
return versionObject;
85+
}
8286
versions.map((version) => {
8387
versionObject[version] = {
8488
banner: "none",

0 commit comments

Comments
 (0)