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

feat: Expose relative path in PageMetaData #161

Merged
merged 3 commits into from
Jul 19, 2023

Conversation

nicolechung
Copy link
Contributor

@nicolechung nicolechung commented Jun 21, 2023

For: #160

page.editUrl works great for github, but due to the limitations of hosted-git-info it's hard to generate an editLink for on-prem instances of Gitlab, etc.

This PR exposes the relativePath which is not provided by the docfy service. The ember docfy service only exposes the route information, which is not necessarily related to the relative path in the repo.

  • Updated CONTRIBUTING with how to run the tests in package/core
  • added relativePath to the metadata
  • updated PageMetaData type
  • updated snapshots for tests
  • updated docs for how to use relativePath.

@nicolechung nicolechung force-pushed the expose_relative_path branch from 8a8a488 to 37199a9 Compare June 21, 2023 20:35
@nicolechung nicolechung marked this pull request as draft June 21, 2023 20:39
@nicolechung nicolechung force-pushed the expose_relative_path branch from 37199a9 to 2866085 Compare June 21, 2023 20:47
@nicolechung nicolechung marked this pull request as ready for review June 21, 2023 20:54
```hbs
<DocfyOutput @fromCurrentURL={{true}} as |page|>
{{#if page.relativePath}}
<a href=(concat "http://some-enterpise.com/browse/" page.relativePath)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: the build breaks if I use hbs template instead of just hbs...not sure why?

@josemarluedke josemarluedke merged commit 5408b1d into josemarluedke:main Jul 19, 2023
@josemarluedke
Copy link
Owner

Released in V0.7.0. Thanks for contributing.

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