summaryrefslogtreecommitdiff
path: root/make-redirects.py
blob: 76860775adcd6025d66efe498888f1b4b89ab498 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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))