From 4d3d0bdf5526a9d7cdec840b2d62c9344f8370dc Mon Sep 17 00:00:00 2001 From: George Melikov Date: Fri, 29 May 2020 15:54:13 +0300 Subject: [PATCH] Set absolute paths in 404 page Signed-off-by: George Melikov --- .github/workflows/publish.yml | 2 +- .github/workflows/pull_request.yml | 2 +- docs/conf.py | 5 +++++ docs/requirements.txt | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7b7c5a3..f24fd1c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v1 - uses: ammaraskar/sphinx-action@master with: - pre-build-command: "apt-get update -y && apt-get install -y python3-pip && pip install -r docs/requirements.txt" + pre-build-command: "apt-get update -y && apt-get install -y git python3-pip && pip install -r docs/requirements.txt" docs-folder: "docs/" - name: Deploy uses: peaceiris/actions-gh-pages@v3 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index cb6fc34..93639c9 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -9,5 +9,5 @@ jobs: - uses: actions/checkout@v1 - uses: ammaraskar/sphinx-action@master with: - pre-build-command: "apt-get update -y && apt-get install -y python3-pip && pip install -r docs/requirements.txt" + pre-build-command: "apt-get update -y && apt-get install -y git python3-pip && pip install -r docs/requirements.txt" docs-folder: "docs/" diff --git a/docs/conf.py b/docs/conf.py index 22bdff4..99fcd55 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -46,6 +46,7 @@ extensions = [ 'sphinx.ext.intersphinx', "sphinx_issues", "sphinx_rtd_theme", + "notfound.extension" ] # Add any paths that contain templates here, relative to this directory. @@ -214,3 +215,7 @@ issues_github_path = "openzfs/zfs" issues_uri = "https://github.com/openzfs/zfs/issues/{issue}" issues_pr_uri = "https://github.com/openzfs/zfs/pull/{pr}" issues_commit_uri = "https://github.com/openzfs/zfs/commit/{commit}" + +# Get absolute paths in 404 +notfound_no_urls_prefix = True +notfound_url_prefix = '/openzfs-docs' \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt index 51b388a..ff66b42 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,5 @@ Sphinx sphinx-issues +# sphinx-notfound-page with change for Github Pages https://github.com/readthedocs/sphinx-notfound-page/pull/94 +git+https://github.com/gmelikov/sphinx-notfound-page.git@github_pages#egg=sphinx-notfound-page sphinx-rtd-theme