From baf629b7bb953f65561a092174e492824e87a590 Mon Sep 17 00:00:00 2001 From: KennethEnevoldsen Date: Mon, 8 Aug 2022 13:08:23 +0200 Subject: [PATCH] docs: Added edit button to documentation --- .github/workflows/documentation.yml | 1 + docs/conf.py | 23 ++++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 6bb7fac..ea55c1f 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -16,6 +16,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt + pip install -e . - name: Build and Commit uses: sphinx-notes/pages@v2 - name: Push changes diff --git a/docs/conf.py b/docs/conf.py index 4e3e66d..436c75d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,13 +10,6 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -import os -import sys - -sys.path.insert(0, os.path.abspath("..")) -sys.path.insert(0, "..") -sys.path.insert(0, os.path.abspath("../")) - from spacy_wrap.about import __version__ @@ -25,6 +18,7 @@ project = "spacy-wrap" author = "Kenneth Enevoldsen" +repo_url = f"https://github.com/kennethenevoldsen/{project}" # The full version, including alpha/beta/rc tags release = __version__ @@ -87,6 +81,21 @@ html_favicon = "_static/favicon.ico" html_theme_options = { + "footer_icons": [ + { + "name": "GitHub", + "url": repo_url, + "html": """ + + + + """, + "class": "", + }, + ], + "source_repository": repo_url, + "source_branch": "main", + "source_directory": "docs/", "light_logo": "icon.png", "dark_logo": "icon_dark.png", "light_css_variables": {