diff --git a/doc/Makefile b/doc/Makefile index 5d4ee56cb..7f48b6562 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -92,7 +92,8 @@ publish: cp -r $(BUILDDIR)/html/* $(PUBLISHDIR) ifeq ($(RELEASE),latest) cp scripts/publish-README.md $(PUBLISHDIR)/../README.md - cp scripts/publish-index.html $(PUBLISHDIR)/../index.html + scripts/publish-redirect.sh $(PUBLISHDIR)/../index.html latest/index.html + scripts/publish-redirect.sh $(PUBLISHDIR)/../hardware.html latest/reference/hardware.html cp scripts/publish-robots.txt $(PUBLISHDIR)/../robots.txt sed 's/
/\nPlease visit the latest ACRN documentation
- - diff --git a/doc/scripts/publish-redirect.sh b/doc/scripts/publish-redirect.sh new file mode 100755 index 000000000..4adef2cc8 --- /dev/null +++ b/doc/scripts/publish-redirect.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# Copyright (C) 2021 Intel Corporation. +# SPDX-License-Identifier: BSD-3-Clause + +# Create top-level website redirect to a doc (conf.py redirect script can only +# create redirects within the published folder output, e.g. latest/ or 2.6/) +# +# publish-redirect docname.html destpath/docname.html + +if [[ $# -ne 2 ]]; then + echo "Error: $0 expects two parameters: docname.html destpath/docname.html" >&2 + exit 1 +fi + +cat>"$1"<Please visit the latest ACRN documentation
+ + +EOF