From f5c3114bdf32d3b3688f2cd3e7be7f5ca1f6a089 Mon Sep 17 00:00:00 2001 From: Tom Trafford Date: Mon, 21 Mar 2022 14:15:55 +0000 Subject: [PATCH] Correct theme for docs --- change_theme.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/change_theme.sh b/change_theme.sh index d4b28e6..37404eb 100755 --- a/change_theme.sh +++ b/change_theme.sh @@ -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