Skip to content

Commit

Permalink
Correct theme for docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtrafford committed Mar 21, 2022
1 parent 7266b9f commit f5c3114
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions change_theme.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/usr/bin/env bash

# Remove multiple lines to be changed. They are then replaced within the following command
sed -e "/if not on_rtd:.*/{n;N;N;N;N;N;d}" -i $1

sed -e "s|html_logo = .*|html_logo = 'PandA-logo-for-black-background.svg'|" \
-e "s|html_favicon = .*|html_favicon = 'favicon.ico'|" \
-e "s|project = .*|project = 'PandABlocks-webcontrol'|" \
-e "s|if not on_rtd:.*|try:\n import sphinx_rtd_theme\n html_theme = 'sphinx_rtd_theme'\nexcept ImportError:\n html_theme = 'default'\n print('sphinx_rtd_theme not found, using default')|"\
-i $1

cat << EOF > $2
Expand Down

0 comments on commit f5c3114

Please sign in to comment.