mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-24 14:33:38 +00:00
doc: add top-level redirect
* Add a script for creating top-level redirects on the projectacrn.github.io site. * Use it to generate the top-level index.html redirect to latest/index.html in the Makefile (for make publsh). * Generate a new redirect for hardware.html to catch inbound links. Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This commit is contained in:
parent
f64f253562
commit
abb564ba41
@ -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/<head>/<head>\n <base href="https:\/\/projectacrn.github.io\/latest\/">/' $(BUILDDIR)/html/404.html > $(PUBLISHDIR)/../404.html
|
||||
endif
|
||||
|
@ -1,12 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>ACRN Hypervisor documentation</title>
|
||||
<meta http-equiv="refresh" content="0; URL=latest/index.html">
|
||||
<script>
|
||||
window.location.href = "latest/index.html"
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p>Please visit the <a href="/latest/">latest ACRN documentation</a></p>
|
||||
</body>
|
||||
</html>
|
28
doc/scripts/publish-redirect.sh
Executable file
28
doc/scripts/publish-redirect.sh
Executable file
@ -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"<<EOF
|
||||
<html>
|
||||
<head>
|
||||
<title>ACRN Hypervisor documentation Redirect</title>
|
||||
<meta http-equiv="refresh" content="0; URL=$2">
|
||||
<script>
|
||||
window.location.href = "$2"
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p>Please visit the <a href="/latest/">latest ACRN documentation</a></p>
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user