This allows us to show the results of example evaluation before the user
clicks evaluate, but also for chatbots to see the output when viewing
without interaction.
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>
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>
This is used in post-merge. I have yet to fix the generation of this md
file and so I am just returning this command for now to fix post merge
until this is done.
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.
These are no longer being used and are dependent on an old version of
node to work.
I have disabled the generation to allow the new docs site to be built. I
thought it made sense to remove all things relating to live blocks since
we have no plans to support them now anyway.
Signed-off-by: Charlie Egan <charlie@styra.com>
* New site v1
Signed-off-by: Charlie Egan <charlie@styra.com>
* Add feature and language pages
Signed-off-by: Charlie Egan <charlie@styra.com>
* tidy data generation
Signed-off-by: Charlie Egan <charlie@styra.com>
* Import docs
Signed-off-by: Charlie Egan <charlie@styra.com>
* WIP
Signed-off-by: Charlie Egan <charlie@styra.com>
* Update content d65888c14f
Signed-off-by: Charlie Egan <charlie@styra.com>
* Refactor site to support any base path
Signed-off-by: Charlie Egan <charlie@styra.com>
* Use base URL for nav icons
Signed-off-by: Charlie Egan <charlie@styra.com>
* Refactor locations of community and support logos
Signed-off-by: Charlie Egan <charlie@styra.com>
* More asset refactoring
Signed-off-by: Charlie Egan <charlie@styra.com>
* Move k8s docs into correct location
Signed-off-by: Charlie Egan <charlie@styra.com>
* Build the sidebar
Signed-off-by: Charlie Egan <charlie@styra.com>
* Fix CLI formatting
Signed-off-by: Charlie Egan <charlie@styra.com>
* Fix broken links
Signed-off-by: Charlie Egan <charlie@styra.com>
* Tidy nav with some dividers
Signed-off-by: Charlie Egan <charlie@styra.com>
* Deploy under /new
Signed-off-by: Charlie Egan <charlie@styra.com>
* Deploy new site on preview too
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Link to OPA repo for GH nav link
Signed-off-by: Charlie Egan <charlie@styra.com>
* Updates to homepage
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Add a logo grid to homepage
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Update homepage to have improved layout
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Update homepage rego example
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Update homepage logo list
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Update PlaygroundExample to used ?? operator
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Add a simple search
We might want to come back to this later to make the results better but
this is as good as the current search.
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Add a docs archive page
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Revise homepage content and use demo video
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: correct archive version list
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Only support light mode
This is something we can come back to when we have time to review the
graphics for multi mode
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Link is available by default
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Remove blue hero color, and use smaller logo grid
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Correct ecosystem feature links
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Drop loadEcosystem
This is no longer needed as ecosystem pages are now loaded like other
pages (no special asset handling).
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Update content to f308f61
This branch duplicates content to reformat some of it for the new site.
This commit ports in some of the new changes.
https://github.com/open-policy-agent/opa/compare/f7b002e17...f308f612b
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Update slack logos
Use one with a transparent background instead.
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Use styled components, clear custom css
This keeps custom css to a minimum. Used for side by side and for hiding
the codeAPI text.
Signed-off-by: Charlie Egan <charlie@styra.com>
* docs: Update archive to show 1.4.2 release
Signed-off-by: Charlie Egan <charlie@styra.com>
---------
Signed-off-by: Charlie Egan <charlie@styra.com>
This is what I have done:
* bring all pages into Hugo structure (security, community, support)
* make styles consistent more consistent with homepage
* merge and try to de-dupe css
* Reduced number of breakpoints to 2, one for mobile and one for larger
This is intended to be a step in the right direction, making the site
easier to maintain and more design consistent. There is much left to do,
some examples of things still to work on:
* The remaining CSS is still very messy and likely has some unused.
* The homepage still has an entirely different Dom for mobile in one section, this is toggled on and off.
* We don't use Hugo to generate any page content from markdown for these pages
* ... the list goes on.
Signed-off-by: Charlie Egan <charlie@styra.com>
This commit adds support for named argument declarations for built-in
functions as well as additional metadata/annotations on built-in
functions (e.g., descriptions, categories, etc.) This commit allows us
to generate a data file (builtin_metadata.json) that other tools can
consume to improve the Rego authoring experience.
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
Co-authored-by: Torin Sandall <torinsandall@gmail.com>
With this change, the work done for local development, and the per-PR netlify preview changes:
It will no longer include the website stuff for versions other than edge, the current working tree.
We thus save us the time, and the flakiness, involved with
- checking if github has release binaries for all the versions
- checking out their sources
- fetching the release binaries to pre-hydrate old versions' live-blocks.
The previously-used, documented make target should still be intact.
Fixes#4379 to some extent, I hope.
* docs/website: remove "latest" binary from opa versions cache
Having a stale binary here -- one called "latest" but not actually
being "latest" -- causes issues like this: when building the website
content for the (real) latest version, the script would take the
old (previous-latest) binary, and fail because that binary didn't
know the latest future keywords.
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
* remove empty bottom-left block
* add "Contributing" to mobile nav
* add "Support" section to mobile nav
* make "Support" link relative in sidebar
* add "Discussions" social icon + titles
Now, something shows up when you hover over the social button. I hope
this improves a11y.
Had to bump the font awesome version for another icon I tried, figured
I'd just keep the bump anyways.
Includes some `config.yaml` removals because I couldn't see where they had
been used.
* docs/Makefile: add netlify-cli --dir argument
Without it, I'd run into some weird problem with netlify assuming the
website was built with cecil, and complaining it couldn't find its
binary.
With the `--dir` argument, everything seems to work like it did before.
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
With more and more version appearing, the argument count passed to the
`npm run` call through the shell glob had increased, too -- to a point
where execution was impossible because it had reached a hard limit.
The obvious fix would have been to use `find [...] -exec cmd {} +` or
`find [...] -print0 | xargs -0 cmd`, however, since the npm call builds
another command line that's executed, we'd step over that limit again.
So instead, we'll now run the npm script on batches of 200 files. It's
below the maximum (unclear what it is, I haven't dug that deep), and
still fast enough (running it file-by-file takes 15+minutes).
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
This updates the Makefile targets to remove the hugo-only options for
development, as well as clarifying/simplifying the requirements for
a dev environment. There are now really two options: just look at the
markdown preview with your editor/ide, or install the tools locally
and deploy the full site.
We can likely improve the dev experience some more (would be nice to
get back to the live content updating dev experience) but for now this
should help remove some confusion about how to build and run the site.
Signed-off-by: Patrick East <east.patrick@gmail.com>
The `linkcheck` target has been broken since we added in the "latest"
URL stuff and started using netlify redirects all over.
Add documentation for using a different tool that crawls the live
preview deployemnt.
Signed-off-by: Patrick East <east.patrick@gmail.com>
This makes it easier to troubleshoot the live blocks injection step
by isolating the build step to make the hugo content.
Signed-off-by: Patrick East <east.patrick@gmail.com>
This commit adds a postprocessor to the docs build that enables
examples to be edited and have the results show up live. See the
additions to `docs/README.md` for more about what writing these
blocks looks like or the netlify PR preview
(e.g. at `docs/edge/how-do-i-write-policies/`)
to see them in action (you'll need to disable CORS for live output).
Signed-off-by: David Boles <me@davidbol.es>
There are a few drawbacks to different dev approaches with modifying
and testing the website and docs content. This updates the makefile
to include a handful of options and info about when to use them.
This also changes to not use a “live” Hugo service behind netlify when
we run it locally in dev mode. This allows for the local netlify
preview to more accurately reflect the “real” build.
Signed-off-by: Patrick East <east.patrick@gmail.com>
We needed to change to build the docs from the root of the git repo
Where the netlify toml file was. To make this easier we just shim the
docs-* make targets to the ./docs/Makefile.
The nice part of this is we get a full deployment with the redirects
and other netlify config bits in place.
Signed-off-by: Patrick East <east.patrick@gmail.com>
..There can be only one.
The groundwork was laid in previous patches but this finishes the
process of removing the local/dev/preview builds. We now only have
a single doc build that will show *all* content.
Signed-off-by: Patrick East <east.patrick@gmail.com>
The VERSION ifdef guard was causing the Netlify build to fail. Split
the gh-pages build into a separate Makefile for now.
Signed-off-by: Torin Sandall <torinsandall@gmail.com>
This target is self-contained and produces a site.tar.gz output that
contains the entire static site. We can deploy the contents of
site.tar.gz to the gh-pages branch.
Signed-off-by: Torin Sandall <torinsandall@gmail.com>