Skip to content
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

Make Markdown links relative, so browsing a git ref stays in the same git ref #173

Merged
merged 3 commits into from
Nov 7, 2018

Conversation

webmat
Copy link
Contributor

@webmat webmat commented Nov 6, 2018

This is important for Beta1, as people visiting elastic/ecs will soon be directed
to past versions (e.g. v1.0.0-beta1), if they're looking for official ECS
releases.

This fix ensures that navigating the links from the Readme to the use cases and
the links from use cases back to the readme keeps the person in the same branch
or tag. Prior to this, they would get sent back to the latest version of ECS.

In this PR:

  • Make links to use cases relative
  • Make links to field defs (from use cases) relative
  • Fix last two instances of documentation links pointing to a specific version.
    They now link to the "current" stack version.

This addresses one element of #167.

@webmat webmat changed the title Make Markdown links relative, so browsing Git ref stays in the same place Make Markdown links relative, so browsing Git ref stays in the same git ref Nov 6, 2018
@webmat webmat changed the title Make Markdown links relative, so browsing Git ref stays in the same git ref Make Markdown links relative, so browsing a git ref stays in the same git ref Nov 6, 2018
@webmat webmat requested a review from ruflin November 6, 2018 19:15
@webmat webmat self-assigned this Nov 6, 2018
* [Logging](https://github.com/elastic/ecs/blob/master/use-cases/logging.md)
* [Metricbeat](https://github.com/elastic/ecs/blob/master/use-cases/metricbeat.md)
* [TLS](https://github.com/elastic/ecs/blob/master/use-cases/tls.md)
* [APM](use-cases/apm.md)
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering if these links still work if someone looks at the README directly from the landing page? Because then the link changes to blob/master so the relative link is not correct.

We should make sure these links keep working as I assume that are the ones most used.

Copy link
Contributor Author

@webmat webmat Nov 7, 2018

Choose a reason for hiding this comment

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

I tested all combinations, and it works in all cases:

  • From a branch, clicking in root page rendering of readme towards use cases
  • From a branch, clicking from /readme.md towards use cases
  • From a branch, clicking from use cases back to field defs in the readme
  • From root page of the repo (temporarily merged to master in my fork) to the readme and back

All of these cases worked as expected.

@webmat webmat merged commit 54f600d into elastic:master Nov 7, 2018
@webmat webmat deleted the relative-links branch November 7, 2018 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants