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

Add Origin.Path to transform template #71

Merged
merged 1 commit into from
Aug 10, 2021

Conversation

saswatamcode
Copy link
Collaborator

This PR adds Origin.Path to front/backmatter templates. This is useful in case of constructing links that require paths such as GitHub edit links in path matter and makes YAML DRY-er, for example,

    backMatter:
      template: |
        Found a typo, inconsistency or missing information in our docs?
        Help us to improve [Thanos](https://thanos.io) documentation by proposing a fix [on GitHub here](https://github.com/thanos-io/thanos/edit/main/{{ .Origin.Path }}) :heart:

Test case also added.

Signed-off-by: Saswata Mukherjee <[email protected]>
@saswatamcode saswatamcode requested a review from bwplotka August 8, 2021 04:58
@saswatamcode saswatamcode self-assigned this Aug 8, 2021
Copy link
Owner

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@bwplotka bwplotka merged commit dd2d810 into bwplotka:main Aug 10, 2021
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.

2 participants