-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some tutorials link to files in the master branch instead of their version branch #7675
Comments
Fixing this turns out to be a little more complicated than it appears. The advice from The specific problem is that the docs site is rooted at the So we can fix the targeting of links within the doc site, but not outside it. We might be able to fix this for the docs site build by tweaking the VuePress config (e.g., inserting placeholders and substituting them for the target branch during the build). If we do that, however, then the links within the repository will no longer work, which will break markdown link checking and various other automation (along with readers' ability to move around when navgiating the repo on GitHub). |
Why is it not possible to use absolute URL's for links outside the docs directory? Is this just a problem because we copy the entire spec across? |
That is what we do now. The problem with absolute links is that they require embedding the branch name to form the URL. Presently, we do that using master, which means the docs site points to the master copy regardless of which version is selected, and master diverges from what is in the docs for previous versions. If we stub in a placeholder for vuepress to rewrite, then those links will appear as broken when viewed from GitHub directly, which means they'll fail in the link checker. |
So one option could be that whenever we create a backport branch we also update the docs to shift away from master and now to the backport branch? I'm not even convinced we should have documentation for master anyway since everything's in flux and we recommend people to use versions |
Yes. That's what I'm leaning toward. It wouldn't be hard to script rewriting URLs that point to the master branch of some file to target the backport branch instead. It would need to be done after creating the branch (of course) and committed against it before cutting a release.
That's a reasonable take. I don't have a strong feeling about keeping master on the doc site, but I would prefer that links viewed on GitHub continue to work when viewing the master branch. |
Summarizing the discussion about this issue during the dev call, we generally agreed the simplest solution is to continue using absolute URLs, so that links will work both in GitHub and in the generated docs site. Roughly, the plan is:
|
Updates #7675. Repro: linkpatch -recur -target v0.35.x -skip-match 'docs/(rfc|architecture)/' docs
Updates #7675. Repro: linkpatch -recur -target v0.35.x -skip-path docs/README.md,docs/DOCS_README.md \ -skip-match 'docs/(rfc|architecture)/' docs
Updates #7675. Repro: linkpatch -recur -target v0.3r.x -skip-path docs/README.md,docs/DOCS_README.md \ -skip-match 'docs/(rfc|architecture)/' docs
Updates #7675. Repro: linkpatch -recur -target v0.35.x -skip-path docs/README.md,docs/DOCS_README.md \ -skip-match 'docs/(rfc|architecture)/' docs
Updates #7675. Repro: linkpatch -recur -target v0.35.x -skip-path docs/README.md,docs/DOCS_README.md \ -skip-match 'docs/(rfc|architecture)/' docs
Updates #7675. Repro: linkpatch -recur -target v0.35.x -skip-path docs/README.md,docs/DOCS_README.md \ -skip-match 'docs/(rfc|architecture)/' docs
Updates #7675. Repro: linkpatch -recur -target v0.35.x -skip-path docs/README.md,docs/DOCS_README.md \ -skip-match 'docs/(rfc|architecture)/' docs
Updates #7675. Repro: linkpatch -recur -target v0.33.x -skip-path docs/README.md,docs/DOCS_README.md \ -skip-match 'docs/architecture/' docs
Updates #7675. Ensure that when we create the backport branch for a new release, we also clean up the docs directory.
Updates #7675. Ensure that when we create the backport branch for a new release, we also clean up the docs directory.
Updates #7675. Ensure that when we create the backport branch for a new release, we also clean up the docs directory.
Updates #7675. Ensure that when we create the backport branch for a new release, we also clean up the docs directory.
Updates #7675. Ensure that when we create the backport branch for a new release, we also clean up the docs directory.
Updates #7675. Ensure that when we create the backport branch for a new release, we also clean up the docs directory.
* Add linkpatch tool to rewrite documentation URLs. * Update instructions for creating backport branches. Updates #7675.
I believe this is now done. |
A follow-up to #7674.
A number of Markdown files in the docs directory, notably the tutorials, link to versions of files at the tip of the master branch instead of the version for which the tutorial is generated. This gives confusing results on the doc site, where the actual contents (and sometimes locations) of files may have diverged on the development head.
It would be nice to automate branching this in some way, since the values may change between versions even within a release branch.
Work Items
Fix up absolute links that point to docs.tendermint.com/master/spec.(we wound up backing out the removal of docs from master, so this is now moot)The text was updated successfully, but these errors were encountered: