Skip to content

docs: Add sphinxext.rediraffe redirection plugin#13436

Merged
mattklein123 merged 1 commit intoenvoyproxy:masterfrom
phlax:docs-page-move-redirect
Oct 8, 2020
Merged

docs: Add sphinxext.rediraffe redirection plugin#13436
mattklein123 merged 1 commit intoenvoyproxy:masterfrom
phlax:docs-page-move-redirect

Conversation

@phlax
Copy link
Copy Markdown
Member

@phlax phlax commented Oct 8, 2020

Signed-off-by: Ryan Northey ryan@synca.io

Commit Message: docs: Add sphinxext.rediraffe redirection plugin
Additional Description:

Adds a Sphinx extension that allows redirecting pages that have been moved, to ensure that old published links continue to work when docs change

Also has a tool for diffing against commit/branch to figure out which redirects should be added. This could potentially be added as part of CI, but i have not done so in this PR, as just fixing the links and adding the redirects seemed a greater priority.

Of the options i looked at this extension seemed to have the most active dev, and has the bonus feature of the diff tool

Risk Level:
Testing:
Docs Changes:
Release Notes:
[Optional Runtime guard:]
[Optional Fixes #Issue] Fix #11068 touch #13386
[Optional Deprecated:]

refs

@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/dependency-watchers: FYI only for changes made to (bazel/repository_locations\.bzl)|(api/bazel/repository_locations\.bzl)|(.*/requirements\.txt).

🐱

Caused by: #13436 was opened by phlax.

see: more, trace.

@phlax
Copy link
Copy Markdown
Member Author

phlax commented Oct 8, 2020

trying to figure out how the actual docs site is built - sphinx is building in html mode, but afaict jekyll or somesuch is redirecting from some/page to some/page.html

given above im reasonably confident that this should fix the redirect problems in #11068 but i cant test 100% until we see it published

Signed-off-by: Ryan Northey <ryan@synca.io>
@phlax phlax force-pushed the docs-page-move-redirect branch 2 times, most recently from 81b60d0 to a9c0592 Compare October 8, 2020 12:37
@phlax
Copy link
Copy Markdown
Member Author

phlax commented Oct 8, 2020

/retest-circle

@repokitteh-read-only
Copy link
Copy Markdown

🔨 rebuilding ci/circleci: api (failed build)
🔨 rebuilding ci/circleci: go_control_plane_mirror (failed build)
🔨 rebuilding ci/circleci: docs (failed build)

🐱

Caused by: a #13436 (comment) was created by @phlax.

see: more, trace.

@TheTripleV
Copy link
Copy Markdown

To run rediraffecheckdiff on PR's, you just need to have both the pr and master available.
This is used in https://github.com/wpilibsuite/frc-docs.

From their ci:

  check-redirects:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Checkout master
      run: |
        git fetch origin master --depth=1
    - uses: actions/setup-python@v2
      with:
        python-version: 3.7
    - name: Install Dependencies
      run: |
        pip install -r source/requirements.txt
    - name: Check redirects
      run: |
        make rediraffecheckdiff

@mattklein123 mattklein123 self-assigned this Oct 8, 2020
@phlax
Copy link
Copy Markdown
Member Author

phlax commented Oct 8, 2020

thanks @TheTripleV thats really helpful

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool. Is this something you want to merge right now? Or do you want to wire up more automation?

/wait-any

@phlax
Copy link
Copy Markdown
Member Author

phlax commented Oct 8, 2020

i think if we can land it now, it means we can start moving things without breaking anything.

once we have it landed, i can look at hooking up CI

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mattklein123 mattklein123 merged commit 4ff61b8 into envoyproxy:master Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken documentation links

3 participants