mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
53ab5b7a80
* 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 contentd65888c14fSigned-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 tof308f61This 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>
101 lines
2.8 KiB
Makefile
101 lines
2.8 KiB
Makefile
DEPLOY_PRIME_URL ?= "http://localhost:8888"
|
|
|
|
######################################################
|
|
#
|
|
# Development targets
|
|
#
|
|
######################################################
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -f $(CURDIR)/website/data/releases.yaml
|
|
rm -f $(CURDIR)/website/data/builtin_metadata.json
|
|
rm -rf $(CURDIR)/website/generated
|
|
rm -rf $(CURDIR)/website/public
|
|
rm -rf $(CURDIR)/website/resources
|
|
rm -rf $(CURDIR)/website/scripts/live-blocks/opa_versions/latest-*
|
|
|
|
.PHONY: generate-cli-docs
|
|
generate-cli-docs:
|
|
$(CURDIR)/../build/gen-cli-docs.sh "$(CURDIR)/content"
|
|
|
|
.PHONY: generate
|
|
generate: generate-cli-docs copy-hugo-static-content
|
|
$(CURDIR)/website/scripts/load-docs.sh
|
|
|
|
.PHONY: copy-hugo-static-content
|
|
copy-hugo-static-content:
|
|
mkdir -p $(CURDIR)/website/generated/
|
|
cp -r $(CURDIR)/website/content/* $(CURDIR)/website/generated/
|
|
|
|
.PHONY: dev-generate
|
|
dev-generate: generate-cli-docs copy-hugo-static-content
|
|
DEV=true $(CURDIR)/website/scripts/load-docs.sh
|
|
|
|
# The website has some npm dependencies saved in ./website/node_modules
|
|
# As well as dependencies required for the "live-blocks".
|
|
# Use this target to update them as needed.
|
|
.PHONY: install-deps
|
|
install-deps: live-blocks-install-deps
|
|
npm install
|
|
|
|
# The live-blocks-% pattern target will shim to the
|
|
# npm scripts in ./website/scripts/live-blocks
|
|
# NOTE(sr): we'll avoid an API call if we make use of releases.yaml to determine the latest release
|
|
.PHONY: live-blocks-%
|
|
live-blocks-%:
|
|
cd $(CURDIR)/website/scripts/live-blocks && LATEST=$(shell sed -n '2s/- //p' $(CURDIR)/website/data/releases.yaml) npm run $*
|
|
|
|
.PHONY: serve-local
|
|
serve-local: dev-build
|
|
# must be run from root of repo for
|
|
# the netlify.toml config to work
|
|
cd $(CURDIR)/.. && netlify dev --offline --dir $(CURDIR)/website/public
|
|
|
|
.PHONY: serve-remote
|
|
serve-remote: production-build
|
|
# must be run from root of repo for
|
|
# the netlify.toml config to work
|
|
cd $(CURDIR)/.. && netlify deploy
|
|
|
|
.PHONY: dev-build
|
|
dev-build: clean dev-generate hugo-production-build live-blocks-inject
|
|
|
|
######################################################
|
|
#
|
|
# CI targets
|
|
#
|
|
######################################################
|
|
|
|
.PHONY: hugo-production-build
|
|
hugo-production-build:
|
|
hugo \
|
|
--source $(CURDIR)/website \
|
|
--contentDir generated \
|
|
--ignoreCache \
|
|
--minify
|
|
|
|
.PHONY: production-build
|
|
production-build: clean generate hugo-production-build
|
|
make live-blocks-inject
|
|
|
|
.PHONY: preview-build
|
|
preview-build:
|
|
hugo \
|
|
--source $(CURDIR)/website \
|
|
--contentDir generated \
|
|
--baseURL $(DEPLOY_PRIME_URL) \
|
|
--buildDrafts \
|
|
--buildFuture \
|
|
--ignoreCache
|
|
# this is not compatible with node 22
|
|
# make live-blocks-inject
|
|
|
|
.PHONY: new-site
|
|
new-site:
|
|
cd new && \
|
|
npm ci && \
|
|
npx docusaurus build && \
|
|
mkdir -p ../website/public/new && \
|
|
cp -r build/. ../website/public/new
|