Skip to content

Commit

Permalink
docs footer
Browse files Browse the repository at this point in the history
  • Loading branch information
kwinkunks committed Feb 20, 2022
1 parent 8a34c25 commit 7f5ffd9
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions docs/process_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ def simplify_credits(html):
"""
Replace the credit part of the HTML footer. Return the new text.
"""
s = r"Created using <a href=\"https://www\.sphinx.+?Furo theme</a>."
pattern = re.compile(s, flags=re.DOTALL)
s = r'<a class="muted-link" href="https://pradyunsg\.me">@pradyunsg</a>\'s'
pattern = re.compile(s)
html = pattern.sub(r'', html)

new_s = '<a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>'
new_s += ' | Created using Sphinx & Furo'
s = r'Copyright &#169; 2022, Agile Scientific'
pattern = re.compile(s)
new_s = '&#169; 2022, Agile Scientific | <a href="https://creativecommons.org/licenses/by/4.0/">CC BY</a>'
html = pattern.sub(new_s, html)

return pattern.sub(new_s, html)
return html


def main(path):
Expand Down

0 comments on commit 7f5ffd9

Please sign in to comment.