diff options
author | Bastien Nocera <hadess@hadess.net> | 2019-11-13 12:28:02 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2019-11-13 12:38:52 +0100 |
commit | 01d7d82864d7cd530fd4300154285183b0ed82f2 (patch) | |
tree | 909a1e14ef9c2680c9d2fc59887643eef241de3d /web-export | |
parent | 3a358314b3b2c6b755168ed92af5e2bf585c578a (diff) |
web-export: Redirect from spec/ to spec/latest/
GitLab won't automatically generate pages for file listings, so we must
have an index.html in those directories. Take the easiest way out and
redirect from spec/ to spec/latest/ when they hit that URL.
Closes: #49
Diffstat (limited to 'web-export')
-rw-r--r-- | web-export/redirect.html | 8 | ||||
-rwxr-xr-x | web-export/update.py | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/web-export/redirect.html b/web-export/redirect.html new file mode 100644 index 0000000..0c7fc29 --- /dev/null +++ b/web-export/redirect.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html> + <head> + <title></title> + <meta http-equiv = "refresh" content = "0; url = latest/" /> + </head> + <body></body> +</html> diff --git a/web-export/update.py b/web-export/update.py index 34f098d..f23647f 100755 --- a/web-export/update.py +++ b/web-export/update.py @@ -339,6 +339,7 @@ for line in lines: if (spec.spec_dir, spec.basename_no_ext) not in latests: latests.append((spec.spec_dir, spec.basename_no_ext)) spec.latestize(index_fd) + shutil.copy('redirect.html', spec.spec_dir + '/index.html') else: index_fd.write(' - [version %s](%s/%s)\n' % (version, spec.spec_dir, spec.version)) |