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//\n /' $(BUILDDIR)/html/404.html > $(PUBLISHDIR)/../404.html endif diff --git a/doc/scripts/publish-index.html b/doc/scripts/publish-index.html deleted file mode 100644 index 2d58e38b9..000000000 --- a/doc/scripts/publish-index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - ACRN Hypervisor documentation - - - - -

Please 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"< + + ACRN Hypervisor documentation Redirect + + + + +

Please visit the latest ACRN documentation

+ + +EOF