21 Commits

Author SHA1 Message Date
Charlie Egan 5e2142efc0 Add copy-as-markdown button to doc pages (#8540)
Allow users to copy entire page content as markdown for pasting into LLMs.

Follows https://github.com/open-policy-agent/opa/pull/8535

Upgrades Docusaurus to 3.10.0 too, adds turndown for HTML-to-markdown
conversion.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2026-04-22 16:37:07 +00: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
dependabot[bot] f18131e3b3 build(deps): bump markdown-it and markdownlint-cli2 in /docs (#8329)
Bumps [markdown-it](https://github.com/markdown-it/markdown-it) to 14.1.1 and updates ancestor dependency [markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2). These dependencies need to be updated together.


Updates `markdown-it` from 14.1.0 to 14.1.1
- [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/markdown-it/markdown-it/compare/14.1.0...14.1.1)

Updates `markdownlint-cli2` from 0.20.0 to 0.21.0
- [Changelog](https://github.com/DavidAnson/markdownlint-cli2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/DavidAnson/markdownlint-cli2/compare/v0.20.0...v0.21.0)

---
updated-dependencies:
- dependency-name: markdown-it
  dependency-version: 14.1.1
  dependency-type: indirect
- dependency-name: markdownlint-cli2
  dependency-version: 0.21.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-16 09:02:45 -06:00
Charlie Egan b29b1dad76 docs/website: Markdown linting and spell checking for documentation (#8292)
* Add markdownlint tooling to docs

Install markdownlint-cli2 with configuration file and make targets for
auto fix etc too.

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

* Autofixable markdown issues

mainly, replace tabs with spaces for consistent 2-space indentation

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

* MD059

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

* Fix a number of <link> issues

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

* MD041

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

* MD041

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

* MD046

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

* MD025

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

* MD052

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

* MD028

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

* MD001

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

* Add GH action check in PRs

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

* Use 4 spaces for tabs

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

* Use 4 spaces for tabs

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

* docs: Add spell checking using Vale

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

* Correct comment for space indentation rule

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

---------

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2026-02-05 10:20:13 +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 4c31c81a0f website: Remove unused lunr dependency
https://app.netlify.com/projects/openpolicyagent/deploys/6908b1fae94d6a0007407fd6

Addresses these two issues:

1:45:52 PM: npm warn deprecated mkdirp@0.3.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
1:45:52 PM: npm warn deprecated gauge@3.0.2: This package is no longer supported.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2025-11-04 07:21:33 +01:00
Charlie Egan 087f942f25 docs: Update based on slack feedback (#7990)
* docs: Update policy-reference page with intro

I hope this addresses some of the pain shared in:
https://openpolicyagent.slack.com/archives/C08V59T3NAF/p1761232592164519

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

* docs: Revise server, net, port diagram

We had some valid feedback that this was disjointed with the following
text.

https://openpolicyagent.slack.com/archives/C08V59T3NAF/p1761298015276409

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

* docs: Correct typo in keyword link

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

---------

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
2025-10-29 10:58:16 +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 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 e73ca6cf53 website: Update docusaurus components to 3.8.1 (#7718)
Signed-off-by: Charlie Egan <charlie@styra.com>
2025-06-23 17:45:15 +01:00
Charlie Egan 2c0c2c9b75 website: Refactor site components with CSS modules
I have been seeing some minor FOUC issues when styles are changed
version to version.

https://turkus.github.io/2018/06/06/fouc-react/

They are not always noticeable, but I think css modules will help ensure
the styles are always present when needed.

This PR also attempts to make the components more consistently structured
in the repo by standardizing on the styles.module.css.

Signed-off-by: Charlie Egan <charlie@styra.com>
2025-06-10 08:49:32 +00:00
Charlie Egan 2733643045 docs: Add feedback form for user reported issues (#7662)
Form submissions will be sent to a channel for OPA maintainers to review.

Signed-off-by: Charlie Egan <charlie@styra.com>
2025-06-04 13:08:58 +00: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 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 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
Patrick East 58d336aff9 Refactor doc directories
Signed-off-by: Patrick East <east.patrick@gmail.com>
2019-04-26 17:12:15 -07:00
lucperkins a9f3221200 Remove PostCSS dependency
Signed-off-by: lucperkins <lucperkins@gmail.com>
2019-04-12 17:25:57 -07:00
lucperkins bb0d4e271b New OPA website (Hugo + Netlify)
Signed-off-by: lucperkins <lucperkins@gmail.com>
2019-03-26 13:45:50 -07:00
Mikol Graves bb33db8890 Refresh OPA front page
These changes update the front page of the openpolicyagent.org site. Specifically:

- Replace empty-calorie content with example use cases
- Eliminate gulp and sccs
- Add scroll-to and -back functionality
- Rocking boat

Overall these changes make the site easier to build and provide a more interesting overview of what users can do with OPA today.

Signed-off-by: Mikol Graves <mikol@thinbox.org>
2018-11-26 10:15:22 -08:00
Eva Xiaohui Luo 25ba04c980 Refresh OPA website
These changes contain a redesign of the OPA website. The main changes
are (1) new frontpage w/ refreshed messaging and assets and (2) docs
ported to gitbook.
2017-07-05 15:39:45 -07:00