Add index.html and robots.txt files to default build

This commit is contained in:
JeremyStar™ 2024-04-20 13:46:18 +02:00
parent b4ada39ac2
commit 0fdf576ec4
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -32,6 +32,29 @@ function generate-link() {
if [ -z "${LINKGEN_NO_DEFAULT}" ]; then if [ -z "${LINKGEN_NO_DEFAULT}" ]; then
# LINKGEN_NO_DEFAULT is undefined, generate default links # LINKGEN_NO_DEFAULT is undefined, generate default links
echo ":: Generating StarOpenSource's default links" echo ":: Generating StarOpenSource's default links"
# Index
cat << EOF >> index.html
<!DOCTYPE html>
<html>
<head>
<title>Redirecting to nowhere</title>
</head>
<body>
<center>
<p>Hello! You've landed on StarOpenSource's redirection website.</p>
<p>You can visit the source code for this website <a href="/repos-redirection">here</a>.</p>
<br/>
<p>Here are some links you can try out:</p>
<p><a href="/website">[website]</a> <a href="/status">[status]</a> <a href="/filesystem">[/fs/]</a> <a href="/repos">repos</a></p>
</center>
</body>
</html>
EOF
# Robots
cat << EOF >> robots.txt
User-Agent: *
Disallow: /
EOF
# General # General
generate-link "website" "StarOpenSource's website" "https://staropensource.de" generate-link "website" "StarOpenSource's website" "https://staropensource.de"
generate-link "status" "StarOpenSource Infrastructure Status" "https://status.staropensource.de" generate-link "status" "StarOpenSource Infrastructure Status" "https://status.staropensource.de"