diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 0000000..dda3ea6 --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,19 @@ +# Preview the generated doc in pull requests. + +name: Preview Generated Docs +on: + pull_request: + branches: ["master"] + +permissions: + pull-requests: write + +jobs: + documentation-links: + name: Preview Docs + runs-on: ubuntu-latest + steps: + - uses: readthedocs/actions/preview@v1 + with: + project-slug: "editorconfig-specification" + single-version: true diff --git a/conf.py b/conf.py index 037a465..67c77b7 100644 --- a/conf.py +++ b/conf.py @@ -18,7 +18,7 @@ # -- Project information ----------------------------------------------------- project = 'EditorConfig Specification' -copyright = '2019--2020, EditorConfig Team' +copyright = '2019--2024, EditorConfig Team' author = 'EditorConfig Team' version = '0.16.0' @@ -26,6 +26,11 @@ # -- General configuration --------------------------------------------------- +import os + +# Set canonical URL from the Read the Docs Domain +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") + # The master document master_doc = 'index'