From 05a02e6182e6fb5544b2faca94744772fd6d23d3 Mon Sep 17 00:00:00 2001 From: Ruth Fuchss Date: Mon, 24 Jun 2024 17:48:17 +0200 Subject: [PATCH 1/3] correctly configure GitHub folder Make sure the GitHub folder is also updated when initialising. Signed-off-by: Ruth Fuchss --- init.sh | 6 ++++++ sp-files/conf.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/init.sh b/init.sh index fe8b6744..0cef9170 100755 --- a/init.sh +++ b/init.sh @@ -19,6 +19,12 @@ sed -i "s|working-directory:\s*'\.'|working-directory: '$install_directory'|g" " echo "Updating .readthedocs.yaml configuration..." sed -i "s|configuration:\s*sp-docs/conf\.py|configuration: $install_directory/conf.py|g" "$temp_directory/sp-files/.readthedocs.yaml" sed -i "s|requirements:\s*sp-docs/\.sphinx/requirements\.txt|requirements: $install_directory/.sphinx/requirements.txt|g" "$temp_directory/.readthedocs.yaml" +echo "Updating conf.py configuration..." +if [ "$install_directory" == "." ]; then + sed -i "s|'github_folder':\s*'/sp-docs/'|'github_folder': '/'|g" "$temp_directory/sp-files/conf.py" +else + sed -i "s|'github_folder':\s*'/sp-docs/'|'github_folder': '/$install_directory/'|g" "$temp_directory/sp-files/conf.py" +fi # Create the specified installation directory if it doesn't exist if [ ! -d "$install_directory" ]; then diff --git a/sp-files/conf.py b/sp-files/conf.py index 4ab995b7..ae1a224a 100644 --- a/sp-files/conf.py +++ b/sp-files/conf.py @@ -99,7 +99,7 @@ # Change to the folder that contains the documentation # (usually "/" or "/docs/") - 'github_folder': '/', + 'github_folder': '/sp-docs/', # Change to an empty value if your GitHub repo doesn't have issues enabled. # This will disable the feedback button and the issue link in the footer. From 13f2014819eb979e487d69da66da1a3f55c9ca61 Mon Sep 17 00:00:00 2001 From: Ruth Fuchss Date: Mon, 24 Jun 2024 17:49:08 +0200 Subject: [PATCH 2/3] add configuration option for contributor listing The default is to show contributors, but this can be turned off. Signed-off-by: Ruth Fuchss --- sp-files/conf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sp-files/conf.py b/sp-files/conf.py index ae1a224a..e0d3ebf0 100644 --- a/sp-files/conf.py +++ b/sp-files/conf.py @@ -109,11 +109,11 @@ # Valid options: none, prev, next, both # 'sequential_nav': "none", - # Controls whether to display the contributors for each file - # "display_contributors": True, + # Uncomment to disable displaying the contributors for each file. + # (You can also limit the time frame for displaying contributors + # by setting a "display_contributors_since" variable.) + # "display_contributors": False, - # Controls the time frame for showing the contributors - # "display_contributors_since": "" } # If your project is on documentation.ubuntu.com, specify the project From d2ed0eda4b04d883592bdde9534d58cd3c365937 Mon Sep 17 00:00:00 2001 From: Ruth Fuchss Date: Fri, 26 Jul 2024 10:53:10 +0200 Subject: [PATCH 3/3] pin canonical-sphinx version to main We should use the latest release in the end - but for now, using the latest (untagged) version will speed up development. Signed-off-by: Ruth Fuchss --- sp-files/.sphinx/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sp-files/.sphinx/requirements.txt b/sp-files/.sphinx/requirements.txt index cb4b960b..c019f178 100644 --- a/sp-files/.sphinx/requirements.txt +++ b/sp-files/.sphinx/requirements.txt @@ -1,2 +1,2 @@ -canonical-sphinx +git+https://github.com/canonical/canonical-sphinx@main#egg=canonical-sphinx sphinx-autobuild