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(techdocs): use edit_uri_template
instead of edit_uri
#16699
base: master
Are you sure you want to change the base?
feat(techdocs): use edit_uri_template
instead of edit_uri
#16699
Conversation
Use [`edit_uri_template`](https://www.mkdocs.org/user-guide/configuration/#edit_uri_template) instead of [`edit_uri`](https://www.mkdocs.org/user-guide/configuration/#edit_uri) and remove integration type-based limit. This features was introduced as part of [mkdocs v1.4.0](https://github.com/mkdocs/mkdocs/releases/tag/1.4.0). Effectively, this will add at least `repo_url` to all `url`-type locations of all integrations. Additionally, `edit_uri_template` will only be added if the integration supports an edit URL (== `resolveEditUrl` does not return URL unchanged). Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
Changed Packages
|
Uffizzi Ephemeral Environment
|
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
Could anyone reopen this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this one must've slipped off the radar.
Looks good to me! 👍 Will leave final say to @backstage/techdocs-core
Please mark this as ready for review if it is btw. Otherwise reviewers won't get pinged automatically and it will have to be discovered in other ways, which just happened 😅 |
@Rugvip I've kept it a draft for now as it requires an upgrade at the mkdocs plugins - and so far, I've struggled a bit with that 😅 |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
not stale |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
not stale |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
no stale |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
no stale |
Marked as will-fix, let is know when it's time to have a look 😁 |
@@ -108,7 +109,12 @@ export const patchMkdocsYmlPreBuild = async ( | |||
scmIntegrations: ScmIntegrationRegistry, | |||
) => { | |||
await patchMkdocsFile(mkdocsYmlPath, logger, mkdocsYml => { | |||
if (!('repo_url' in mkdocsYml) && !('edit_uri' in mkdocsYml)) { | |||
console.log(mkdocsYmlPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log(mkdocsYmlPath); |
Update: However, mkdocs-monorepo-plugin still requires some changes (and does not yet require a recent enough version, yet). |
Use
edit_uri_template
instead ofedit_uri
and remove integration type-based limit.This features was introduced as part of
mkdocs v1.4.0.
Effectively, this will add at least
repo_url
to allurl
-type locations of all integrations.Additionally,
edit_uri_template
will only be added if the integration supports an edit URL(==
resolveEditUrl
does not return URL unchanged).Hey, I just made a Pull Request!
✔️ Checklist
Signed-off-by
line in the message. (more info)