mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-11 05:39:45 +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:
committed by
David Kinder
parent
f64f253562
commit
abb564ba41
@@ -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
|
Reference in New Issue
Block a user