mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Add newsfeed link to index.html
This commit is contained in:
parent
78c1b71440
commit
ccf70efff6
2 changed files with 11 additions and 7 deletions
|
@ -25,6 +25,7 @@ DOCUMENTATION_SRC = "DOCUMENTATION.md"
|
||||||
TARGET_DIR = "beta"
|
TARGET_DIR = "beta"
|
||||||
SHIFT_HEADING = 1
|
SHIFT_HEADING = 1
|
||||||
TOOLS_PATH = os.path.dirname(__file__)
|
TOOLS_PATH = os.path.dirname(__file__)
|
||||||
|
TEMPLATE_INDEX_PATH = os.path.join(TOOLS_PATH, "template-index.html")
|
||||||
TEMPLATE_PATH = os.path.join(TOOLS_PATH, "template.html")
|
TEMPLATE_PATH = os.path.join(TOOLS_PATH, "template.html")
|
||||||
FILTER_EXE = os.path.join(TOOLS_PATH, "filter.py")
|
FILTER_EXE = os.path.join(TOOLS_PATH, "filter.py")
|
||||||
POSTPROCESSOR_EXE = os.path.join(TOOLS_PATH, "postprocessor.py")
|
POSTPROCESSOR_EXE = os.path.join(TOOLS_PATH, "postprocessor.py")
|
||||||
|
@ -127,13 +128,8 @@ def run_git_fetch_and_restart_if_changed(remote_commits, target_branch):
|
||||||
|
|
||||||
|
|
||||||
def make_index_html(branch):
|
def make_index_html(branch):
|
||||||
return """\
|
with open(TEMPLATE_INDEX_PATH) as f:
|
||||||
<!DOCTYPE html>
|
return f.read().format(branch=branch)
|
||||||
<html lang="en">
|
|
||||||
<meta http-equiv="Refresh" content="0; url=%s.html">
|
|
||||||
<title>Redirect</title>
|
|
||||||
<p>Please follow <a href="%s.html">this link</a>.</p>
|
|
||||||
""" % (branch, branch)
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
8
documentation-generator/template-index.html
Normal file
8
documentation-generator/template-index.html
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="Refresh" content="0; url={branch}.html">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link href="https://github.com/Kozea/Radicale/releases.atom" type="application/atom+xml" rel="alternate" title="Radicale Releases">
|
||||||
|
<title>Redirect</title>
|
||||||
|
<p>Please follow <a href="{branch}.html">this link</a>.</p>
|
Loading…
Add table
Add a link
Reference in a new issue