Skip to content

website: Render versions under /data/versions.json#7783

Merged
charlieegan3 merged 1 commit intoopen-policy-agent:mainfrom
charlieegan3:render-versions-data
Jul 17, 2025
Merged

website: Render versions under /data/versions.json#7783
charlieegan3 merged 1 commit intoopen-policy-agent:mainfrom
charlieegan3:render-versions-data

Conversation

@charlieegan3
Copy link
Copy Markdown
Contributor

This will facilitate versioned OPA docs sites checking the current version of the OPA website.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 17, 2025

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit 9443fd8
🔍 Latest deploy log https://app.netlify.com/projects/openpolicyagent/deploys/6878d99892c86f000803c364
😎 Deploy Preview https://deploy-preview-7783--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@charlieegan3
Copy link
Copy Markdown
Contributor Author

Comment thread netlify.toml
[[headers]]
for = "/data/versions.json"
[headers.values]
Access-Control-Allow-Origin = "https://*.netlify.app"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is perhaps broad but we have sites like: https://v1-3-0--opa-docs.netlify.app/ etc and I think only globbing is allowed in these headers.

Comment thread docs/docusaurus.config.js
const { createData, addRoute } = actions;
const { versions } = content;

await createData("versions.json", JSON.stringify(versions, null, 2));
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have validated that tag v1.6.0 contains a caps.json file for this release, so I am using the list of capabilities as the definitive list of releases.

Comment thread docs/docusaurus.config.js Outdated
@charlieegan3 charlieegan3 force-pushed the render-versions-data branch from 4a78d6e to 6ca01fe Compare July 17, 2025 11:05
This will facilitate other sites checking the current version of the OPA
website.

Signed-off-by: Charlie Egan <charlie@styra.com>
@charlieegan3 charlieegan3 force-pushed the render-versions-data branch from 6ca01fe to 9443fd8 Compare July 17, 2025 11:08
Copy link
Copy Markdown
Contributor

@srenatus srenatus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@charlieegan3
Copy link
Copy Markdown
Contributor Author

Thanks Stephan!

@charlieegan3 charlieegan3 enabled auto-merge (squash) July 17, 2025 11:08
@charlieegan3 charlieegan3 merged commit 9c3bcbe into open-policy-agent:main Jul 17, 2025
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants