create a redirect generation system to help move non dictatorship specifics out
This commit is contained in:
1
Makefile
1
Makefile
@@ -49,6 +49,7 @@ $(OUT_MULTIPAGE): $(IN) template_dir/*
|
|||||||
-r asciidoctor-multipage \
|
-r asciidoctor-multipage \
|
||||||
$(OPTS) \
|
$(OPTS) \
|
||||||
'$<'
|
'$<'
|
||||||
|
./generate-redirects
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(OUT) $(BODY)
|
rm -rf $(OUT) $(BODY)
|
||||||
|
|||||||
16
README.adoc
16
README.adoc
@@ -22720,13 +22720,11 @@ see also: <<why-is-ukraine-the-west-s-fault-by-john-mearsheimer-2015,Why is Ukra
|
|||||||
|
|
||||||
TODO migrate all into this README.
|
TODO migrate all into this README.
|
||||||
|
|
||||||
. link:censorship.md[Censorship]
|
. https://github.com/cirosantilli/china-dictatorship/blob/master/CONTRIBUTING.md
|
||||||
. link:media.md[Media]
|
. https://github.com/cirosantilli/china-dictatorship/blob/master/media.md
|
||||||
. link:dissidents.md[Dissidents]
|
. https://github.com/cirosantilli/china-dictatorship/blob/master/dissidents.md
|
||||||
. link:movements.md[Movements against the Dictatorship]
|
. https://github.com/cirosantilli/china-dictatorship/blob/master/movements.md
|
||||||
. link:images/[Images]
|
. https://github.com/cirosantilli/china-dictatorship/blob/master/policies.md
|
||||||
. link:policies.md[Policies]
|
. https://github.com/cirosantilli/china-dictatorship/blob/master/stack-overflow-profile.md
|
||||||
. link:stack-overflow.md[Stack Overflow]
|
|
||||||
. link:stack-overflow-profile.md[Stack Overflow profile]
|
|
||||||
. Personal
|
. Personal
|
||||||
.. link:communities-that-censor-politics.md[Communities that censor politics]
|
.. https://github.com/cirosantilli/china-dictatorship/blob/master/communities-that-censor-politics.md
|
||||||
|
|||||||
39
generate-redirects
Executable file
39
generate-redirects
Executable file
@@ -0,0 +1,39 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eu
|
||||||
|
for fromto in \
|
||||||
|
'CONTRIBUTING.md https://github.com/cirosantilli/china-dictatorship/blob/master/CONTRIBUTING.md' \
|
||||||
|
'censorship.md https://github.com/cirosantilli/china-dictatorship/blob/master/censorship.md' \
|
||||||
|
'communities-that-censor-politics.md https://github.com/cirosantilli/china-dictatorship/blob/master/communities-that-censor-politics.md' \
|
||||||
|
'dissidents.md https://github.com/cirosantilli/china-dictatorship/blob/master/dissidents.md' \
|
||||||
|
'flg-organ-harvesting= flg-organ-harvesting' \
|
||||||
|
'funded- funded-by-cia' \
|
||||||
|
'high-mountain-and-running-river https://ourbigbook.com/cirosantilli/high-mountain-and-flowing-water' \
|
||||||
|
'images https://github.com/cirosantilli/china-dictatorship-media' \
|
||||||
|
'media.md https://github.com/cirosantilli/china-dictatorship/blob/master/media.md' \
|
||||||
|
'overlook-human-rights-for-profitac overlook-human-rights-for-profit' \
|
||||||
|
'policies.md https://github.com/cirosantilli/china-dictatorship/blob/master/policies.md' \
|
||||||
|
'schinese-characters-are-insane chinese-characters-are-insane' \
|
||||||
|
'stack-overflow-profile.md https://github.com/cirosantilli/china-dictatorship/blob/master/stack-overflow-profile.md' \
|
||||||
|
'stack-overflow.md stack-overflow' \
|
||||||
|
'white-snow-in-sunny-spring https://ourbigbook.com/cirosantilli/white-snow-in-sunny-spring' \
|
||||||
|
|
||||||
|
do
|
||||||
|
from="${fromto%% *}"
|
||||||
|
to="${fromto#* }"
|
||||||
|
cat <<EOF > "out/multipage/$from.html"
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Redirecting...</title>
|
||||||
|
<link rel="canonical" href="$to"/>
|
||||||
|
<meta http-equiv="refresh" content="0;url=$to" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Redirecting...</h1>
|
||||||
|
<a href="$to">Click here if you are not redirected.</a>
|
||||||
|
<script>location='$to'</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
EOF
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user