diff options
Diffstat (limited to 'make-redirects.py')
-rw-r--r-- | make-redirects.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/make-redirects.py b/make-redirects.py new file mode 100644 index 0000000..7686077 --- /dev/null +++ b/make-redirects.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 + +links = [ + 'CHANGELOG', + 'INSTALL', + 'a2x.1', + 'article-standalone', + 'asciidocapi', + 'asciidoc-graphviz-sample', + 'faq', + 'index', + 'latex-filter', + 'manpage', + 'music-filter', + 'plugins', + 'slidy', + 'source-highlight-filter', + 'support', + 'testasciidoc', + 'userguide', +] + +for link in links: + with open('{}.html'.format(link), 'w', newline='\n') as file: + file.write('''<!DOCTYPE html> +<meta charset="utf-8"> +<!-- This file was generated by make-redirects.py, please don't modify it manually --> +<title>Redirecting to https://asciidoc-py.github.io/{0}.html</title> +<meta http-equiv="refresh" content="0; URL=https://asciidoc-py.github.io/{0}.html"> +<link rel="canonical" href="https://asciidoc-py.github.io/{0}.html"> +'''.format(link)) |