mirror of https://github.com/seL4/docs.git
Makefile: add preview target
Add a preview target for hosting a full preview of the site on an external server. Target files are written to _preview/ instead of _site/. Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
This commit is contained in:
parent
bb1ab78343
commit
b3b0657858
|
@ -3,6 +3,7 @@
|
|||
|
||||
_data/generated.yml
|
||||
_site/
|
||||
_preview/
|
||||
.sass-cache/
|
||||
_repos/
|
||||
projects/virtualization/docs/api/
|
||||
|
|
16
Makefile
16
Makefile
|
@ -102,16 +102,24 @@ docker_build:
|
|||
|
||||
# --host 0.0.0.0 serves on all interfaces, so that docker can export
|
||||
# the connection; also works locally
|
||||
serve: build
|
||||
.PHONY: serve
|
||||
serve: generate
|
||||
JEKYLL_ENV=$(JEKYLL_ENV) bundle exec jekyll serve
|
||||
|
||||
build: generate_api ruby_deps microkit-tutorial $(REPOSITORIES)
|
||||
$(MAKE) tutorials
|
||||
.PHONY: generate
|
||||
generate: generate_api ruby_deps microkit-tutorial tutorials $(REPOSITORIES)
|
||||
ifeq ($(JEKYLL_ENV),production)
|
||||
$(MAKE) generate_data_files
|
||||
endif
|
||||
JEKYLL_ENV=$(JEKYLL_ENV) bundle exec jekyll build
|
||||
|
||||
.PHONY: build
|
||||
build: generate
|
||||
JEKYLL_ENV=$(JEKYLL_ENV) bundle exec jekyll build $(BUILD_OPTS)
|
||||
|
||||
.PHONY: preview
|
||||
preview: JEKYLL_ENV := production
|
||||
preview: BUILD_OPTS := --config "_config.yml,_preview.yml" $(BUILD_OPTS)
|
||||
preview: build
|
||||
|
||||
clean:
|
||||
rm -rf _site
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
# Copyright 2025 Proofcraft Pty Ltd
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
destination: _preview
|
||||
baseurl: "/docsite"
|
Loading…
Reference in New Issue