-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Omit “Edit this page” links for generated content #27393
Omit “Edit this page” links for generated content #27393
Conversation
{{ if not (.Param "auto_generated") }} | ||
<a href="{{ $editURL }}" target="_blank"><i class="fa fa-edit fa-fw"></i> {{ T "post_edit_this" }}</a> | ||
<a href="{{ $newPageURL }}" target="_blank"><i class="fa fa-edit fa-fw"></i> {{ T "post_create_child_page" }}</a> | ||
{{ end }} |
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.
This is the new bit
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.
Not sure if all generated pages have this parameter.
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.
They might not, but if they don't then I think no harm done?
/area web-development |
Relevant to issue #23889 |
Deploy preview for kubernetes-io-master-staging ready! Built with commit d6589e0 https://deploy-preview-27393--kubernetes-io-master-staging.netlify.app |
Yes, indeed. |
@@ -0,0 +1,41 @@ | |||
/* template adapted from Docsy theme */ |
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.
@sftim, This comment is displaying:
https://deploy-preview-27393--kubernetes-io-master-staging.netlify.app/docs/home/
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.
Ah, that's wrong. I didn't see it locally - maybe I didn't check properly.
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.
I feel this merits a 🤦!
b301fdb
to
d241050
Compare
PR #27429 is an example of a PR where this would eventually help. We'd also need to teach the API reference generator to mark its pages as autogenerated, or change the criteria for exclusion. |
Copy the page meta links template from the Docsy theme, and adapt it to only suggest editing pages that aren't autogenerated.
d241050
to
d6589e0
Compare
Thanks @sftim . |
LGTM label has been added. Git tree hash: 00d6f01f03501bd066cf4273289662812d08192e
|
Moving this PR forward. Thanks @sftim ! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kbhawkey The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Copy the page meta links template from Docsy and adapt it to only suggest editing pages when they aren't autogenerated.
Previews: