Commit Graph

28 Commits

Author SHA1 Message Date
Charlie Egan d9ba5b4891 website: Import blog from medium (#8898)
This PR imports the blogs from https://medium.com/open-policy-agent into
the docusaurus site.

This is being done as the blog has stopped working due to the custom
domain hosting feature being removed from our tier.

The pages have been imported from manually downloaded webarchive files
from each post to ensure we captured the assets and rendered code
example too.

---------

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2026-07-16 12:01:24 +01:00
Charlie Egan ffd7d46ee4 website: Various updates to node and website deps (#8768)
Replaces https://github.com/open-policy-agent/opa/pull/8762

Original dependabot updates:

Bumps the website group in /docs with 9 updates:

| Package | From | To |
| --- | --- | --- |
|
[@floating-ui/react](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/react)
| `0.27.18` | `0.27.19` |
|
[@iconify/react](https://github.com/iconify/iconify/tree/HEAD/components/react)
| `6.0.0` | `6.0.2` |
| [@mermaid-js/layout-elk](https://github.com/mermaid-js/mermaid) |
`0.1.9` | `0.2.1` |
| [eslint](https://github.com/eslint/eslint) | `9.39.2` | `10.4.1` |
| [glob](https://github.com/isaacs/node-glob) | `11.1.0` | `13.0.6` |
| [js-yaml](https://github.com/nodeca/js-yaml) | `4.1.1` | `4.2.0` |
| [markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2) |
`0.21.0` | `0.22.1` |
| [recharts](https://github.com/recharts/recharts) | `3.7.0` | `3.8.1` |
|
[baseline-browser-mapping](https://github.com/web-platform-dx/baseline-browser-mapping)
| `2.10.20` | `2.10.33` |


I have also made some updates to use node 24.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Charlie Egan <charlie_egan@apple.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-11 13:23:17 +00:00
Charlie Egan 75202c334c docs: PoC for kapa.ai (#8699)
https://contribute.cncf.io/blog/2026/04/09/reducing-support-tax-cncf-kapa-ai/

Changes to follow shortly, PR open for domain allow listing.

Fixes https://github.com/open-policy-agent/opa/issues/8125

---------

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2026-06-08 12:06:56 +02:00
Charlie Egan bcc13280a4 website: Add .md alternate content types for llms (#8725)
This makes the site's content easier to consume from chatbots and coding
harnesses.

This reuses the logic from the copy page content button implemented
previously.

E.g.
https://deploy-preview-8725--openpolicyagent.netlify.app/docs/policy-reference/keywords/contains.md

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2026-06-02 16:03:07 +01:00
Sebastian Spaink 9d2c957c8b Generate a JSON Schema for the bundle manifest (#8684)
resolve: https://github.com/open-policy-agent/opa/issues/8661

Similar to the [plan.schema.json
](https://github.com/open-policy-agent/opa/pull/8676)this manifest will
be published on the website under
https://openpolicyagent.org/schemas/bundle/v1/manifest.schema.json

---------

Signed-off-by: Sebastian Spaink <sebastianspaink@gmail.com>
Co-authored-by: Stephan Renatus <s_renatus@apple.com>
2026-05-21 10:39:17 -05:00
Sebastian Spaink 796db6b8d2 Generate a JSON Schema for the IR plan (#8676)
resolve: https://github.com/open-policy-agent/opa/issues/8662 

Generate a schema for the IR plan and publish it to the website at schemas/ir/v1/plan.schema.json 

resolve: https://github.com/open-policy-agent/opa/issues/6266

Fix the upper case Index in MakeNumberRefStmt by supporting both, lower and upper case.

---------

Signed-off-by: Sebastian Spaink <sebastianspaink@gmail.com>
2026-05-19 15:16:25 -05:00
Sebastian Spaink 1a4a713006 Add a page explaining the Rego based PR check (#8611)
Signed-off-by: Sebastian Spaink <sebastianspaink@gmail.com>
2026-05-06 15:40:08 -05:00
Charlie Egan 9b2143cdf9 Implement new GlossaryTooltip component (#8367)
This is useful for using in docs pages where we want to be able to offer the
reader a definition for a term inline. Some such cases have been added as part
of this PR to get us started with some more technical terms early in our
docs.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2026-02-24 10:57:57 +00:00
Charlie Egan 89475700b8 website: Add a new kubecon event page (#8311)
Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2026-02-10 10:44:09 +00:00
Charlie Egan b1eb646ddc docs/website: Add formatting and linting checks (#8288)
* Update baseline-browser-mapping to version 2.9.19

Addresses issue in build

[baseline-browser-mapping] The data in this module is over two
months old.  To ensure accurate Baseline data, please update: `npm i
baseline-browser-mapping@latest -D`

Signed-off-by: Charlie Egan <charlie_egan@apple.com>

* Add fmt and lint config for docs

This is based on dprint and eslint. Some vendored paths are ignored.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>

* Format and lint docs project

Markdown linting will be added in another PR.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>

---------

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2026-02-03 17:01:54 +00:00
Charlie Egan e2acecee3e website: Display 2025 survey results on the website (#8258)
* Add survey data
* Add survey results pages with recharts for plots

Some simple cross year comparisons have been added too where data was available
for the inspection of trends.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2026-01-29 12:15:55 +01:00
Charlie Egan 78fd65ad3f website: Show breadcrumbs in search results (#8207)
Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2026-01-12 15:56:37 +01:00
Charlie Egan c6e9f90b67 website: Remove survey bar
The survey is now closed. Big thanks to everyone that submitted.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2025-12-17 11:32:01 +01:00
Charlie Egan 1b7e7de85a website: Docs versioning (#8038)
Only revert the docs content to the latest release. Retain all other
parts of the site the same.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2025-11-10 17:41:26 +00:00
Charlie Egan b1e04b8c5d website: Add bar to show survey link (#8035)
Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2025-11-10 17:38:11 +01:00
Charlie Egan 7f8de1047b website/docs: Fix remaining broken links (#8034)
- some were false positives where the react components I had made were
  not working with the checker. (CLI and Builtins refs)
- Others related to pages moved around etc, pages that used to be
  headings and so on.
- also address gtag loading issue by correctly configure via plugin.

From now, a broken anchor is fatal at build time.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2025-11-10 16:13:55 +00:00
Charlie Egan 4aa4554f8e website: Fix build issues (#7999)
There are some build issues related to a new netlify base image.

https://app.netlify.com/projects/openpolicyagent/deploys/69020ac6a2fe410008c643de

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2025-10-29 15:21:03 +00:00
Charlie Egan 9834088aea website: Update docusaurus
This needed a few other dependency edits/additions and updates to file loading
too.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2025-10-01 10:41:36 +02:00
Charlie Egan 964ddb5dec docs: Add OCP docs (#7875)
* docs: Add OCP docs

This adds OCP as a new project.

https://github.com/open-policy-agent/opa-control-plane/issues/39

Front loads changes from https://github.com/open-policy-agent/opa-control-plane/pull/41

Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>

* docs: Move OCP docs in-tree

Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>

* docs/ocp: Make updates to the OCP index

- put PATH section at the end
- use title attrs for some more pre blocks

Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>

---------

Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>
Co-authored-by: Charlie Egan <charlieegan3@users.noreply.github.com>
2025-09-03 15:42:03 +00:00
Charlie Egan 5951e5dee8 docs: Add Regal docs to OPA site (#7874)
This will show the project under /projects/, where some other upcoming
additions will have their docs too.

Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>
Co-authored-by: Charlie Egan <charlieegan3@users.noreply.github.com>
2025-09-02 17:41:06 +02:00
Charlie Egan 9c3bcbe4fd website: Render versions under /data/versions.json (#7783)
This will facilitate other sites checking the current version of the OPA
website.

Signed-off-by: Charlie Egan <charlie@styra.com>
2025-07-17 11:10:25 +00:00
Charlie Egan 5430c72d5c website: Show link to the edge release of the docs (#7776)
I have also corrected some issues with a non / base path for the site
here which are mostly unrelated.

Changes to the release/build tasks will come in a different PR so we
only show the latest release and not the edge on
openpolicyagent.org/docs.

Signed-off-by: Charlie Egan <charlie@styra.com>
2025-07-17 09:20:13 +00:00
Charlie Egan c4ccd5dd40 docs: Show edge rather than latest release (#7717)
* docs: Show edge rather than latest release

Docs are updated as we push to main, this means the version is not the
latest, but rather the edge version. This is to avoid confusion while
still showing fixes to the docs site as we make them, since it's still
an active area of development after we released the new version.

Signed-off-by: Charlie Egan <charlie@styra.com>

* docs: Allow setting of builtVersion

This will be used to set the version in the navbar item on versioned
deploys of the site.

Signed-off-by: Charlie Egan <charlie@styra.com>

---------

Signed-off-by: Charlie Egan <charlie@styra.com>
2025-06-23 16:49:01 +01:00
Charlie Egan 4be742cbd2 docs: Show current version in navbar (#7631)
There are some tricks here.

* the navbar item is a 'desktop' item, that appears in mobile too
* this is based on an 'official' workaround detailed here: https://github.com/facebook/docusaurus/issues/7227#issue-1212117180
* the navbar item is null when rendered in the mobile burger nav since
  it's always visible.
* the version is ONLY shown on docs/* pages to show the user that it's
  only that part of the site that's versioned.

I had some feedback that the version indicator in the navbar was too
prominent.

In outdated versions, we can make this red or something.

Signed-off-by: Charlie Egan <charlie@styra.com>
2025-05-28 08:34:20 +00:00
Charlie Egan b3242f2eaf docs: Implement dark mode for website (#7625)
Requires: https://github.com/open-policy-agent/opa/pull/7621

This almost works, but I've had to put in a bit of a hack in the theme
toggle to make sure the highlighting is redone correctly.

Signed-off-by: Charlie Egan <charlie@styra.com>
2025-05-22 19:59:50 +01:00
Charlie Egan 10134a31c7 docs: Migrate diagrams to mermaid (#7615)
These have been added to replicate the existing SVGs which need to be
replaced to better support light/dark mode.

Signed-off-by: Charlie Egan <charlie@styra.com>
2025-05-22 09:12:00 +00:00
Charlie Egan b0cd306a7f docs: Fix CLI documentation generation (#7600)
The new command is based on generating JSON for docusaurus consumption
rather than markdown. This is less error prone as manipulation of
markdown is better contained.

Signed-off-by: Charlie Egan <charlie@styra.com>
2025-05-20 11:21:10 +01:00
Charlie Egan d6b5659856 docs: Switch to new OPA website (#7592)
Some things added on this branch:
- icons and client logos at known paths
- some spam redirects
- some redirects for docs/latest/foo /docs/foo
- redirects for the two ‘moved’ pages (k8s and envoy intros)

I am going to be monitoring the traffic this week on Netlify to make
sure we have a good coverage with redirects where needed.
We also now prompt users to file issues directly from the 404 pages
which should help flag things we miss too.
2025-05-19 10:42:17 +00:00