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>
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>
* 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>
* 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>
- 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>
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>
* 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>
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>
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>
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>
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.