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(techdocs): use edit_uri_template instead of edit_uri #16699

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pjungermann
Copy link
Contributor

Use edit_uri_template instead of edit_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 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).

Hey, I just made a Pull Request!

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

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>
@github-actions github-actions bot added the area:techdocs Related to the TechDocs Project Area label Mar 4, 2023
@backstage-goalie
Copy link
Contributor

backstage-goalie bot commented Mar 4, 2023

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage/plugin-techdocs-node plugins/techdocs-node minor v1.6.1-next.0

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2023

Uffizzi Ephemeral Environment deployment-18114

☁️ https://app.uffizzi.com/github.com/backstage/backstage/pull/16699

📄 View Application Logs etc.

What is Uffizzi? Learn more!

@github-actions
Copy link
Contributor

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!

@github-actions github-actions bot added the stale label Mar 11, 2023
@github-actions github-actions bot closed this Mar 16, 2023
@pjungermann
Copy link
Contributor Author

Could anyone reopen this?

@Rugvip Rugvip reopened this Mar 23, 2023
@Rugvip Rugvip removed the stale label Mar 23, 2023
Copy link
Member

@Rugvip Rugvip left a 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

@Rugvip
Copy link
Member

Rugvip commented Mar 23, 2023

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 😅

@pjungermann
Copy link
Contributor Author

@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 😅

@github-actions
Copy link
Contributor

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!

@github-actions github-actions bot added the stale label Mar 30, 2023
@Rugvip Rugvip removed the stale label Apr 1, 2023
@pjungermann
Copy link
Contributor Author

not stale

@github-actions
Copy link
Contributor

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!

@github-actions github-actions bot added the stale label Apr 12, 2023
@pjungermann
Copy link
Contributor Author

not stale

@github-actions github-actions bot removed the stale label Apr 13, 2023
@github-actions
Copy link
Contributor

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!

@github-actions github-actions bot added the stale label Apr 20, 2023
@pjungermann
Copy link
Contributor Author

no stale

@github-actions github-actions bot removed the stale label Apr 21, 2023
@github-actions
Copy link
Contributor

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!

@github-actions github-actions bot added the stale label Apr 28, 2023
@pjungermann
Copy link
Contributor Author

no stale

@github-actions github-actions bot removed the stale label Apr 28, 2023
@Rugvip Rugvip added the will-fix We will fix this at some point label May 4, 2023
@Rugvip
Copy link
Member

Rugvip commented May 4, 2023

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);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
console.log(mkdocsYmlPath);

@pjungermann
Copy link
Contributor Author

Update:
mkdocs-techdocs-core already requires a recent enough mkdocs version to be able to use edit_uri_template instead of edit_uri.

However, mkdocs-monorepo-plugin still requires some changes (and does not yet require a recent enough version, yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:techdocs Related to the TechDocs Project Area will-fix We will fix this at some point
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants