-
Notifications
You must be signed in to change notification settings - Fork 13
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
Update link guidance to reflect current advice #345
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Discourage `relref` shortcode. - Prefer fully qualified URLs with version substition for https://grafana.com pages. Signed-off-by: Jack Baldry <[email protected]>
Signed-off-by: Jack Baldry <[email protected]>
Signed-off-by: Jack Baldry <[email protected]>
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.
Thank you for doing this! I'm not sure what the reasoning is for "discouraging" the use of something vs just saying "do this (other thing)." This is a document that people need to be able to digest super quickly to be effective, and IMO using words like that in this context (vs in a style guideline) isn't helpful, so I've suggested removing all the relref content. If we reverse our decisions on this at some point, that content will live on in the previous versions of this PR, but having it in the WT is just confusing. We need to just say what we want folks to do and tell them how to do it.
… content to Shortcodes page Co-authored-by: Isabel Matwawana <[email protected]> Signed-off-by: Jack Baldry <[email protected]>
Signed-off-by: Jack Baldry <[email protected]>
Signed-off-by: Jack Baldry <[email protected]>
Closes #314. Signed-off-by: Jack Baldry <[email protected]>
…nce' into jdb/2023-10-update-linking-guidance
Overall readability score: 60.61 (🟢 +0.57)
View detailed metrics🟢 - Shows an increase in readability
Averages:
View metric targets
|
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've made some suggestions to hopefully improve clarity and the ability to scan the Links page. Also added a suggestion for the relref section on the Shortcodes page.
Co-authored-by: Isabel Matwawana <[email protected]> Signed-off-by: Jack Baldry <[email protected]>
…writer Co-authored-by: Isabel Matwawana <[email protected]> Signed-off-by: Jack Baldry <[email protected]>
Co-authored-by: Isabel Matwawana <[email protected]> Signed-off-by: Jack Baldry <[email protected]>
Co-authored-by: Isabel Matwawana <[email protected]> Signed-off-by: Jack Baldry <[email protected]>
Signed-off-by: Jack Baldry <[email protected]>
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.
lgtm!
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 added something in the anchor section that I think I was struggling to explain yesterday. Other than that, just a few minor wording and structure things. But I think one more pass will do it!
@@ -437,18 +509,28 @@ Set the reference at the end of the page as follows: | |||
|
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.
@jdbaldry I'm finding some patterns that aren't explicitly included in the docs here or in what's already published... and maybe it's worth mentioning or clarifying?
Assume a file at: /docs/sources/agent/static/example.md
, then:
{{% docs/reference %}}
[example]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/example"
{{% docs/reference %}}
will end in a 404 error when the docs are built....
but this works:
{{% docs/reference %}}
[example]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/example.md"
{{% docs/reference %}}
But this doesn't carry over to _index.md
files
{{% docs/reference %}}
[link]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow/_index.md"
{{% docs/reference %}}
will resolve fine as will
{{% docs/reference %}}
[link]: "/docs/agent/ -> /docs/agent/<AGENT_VERSION>/flow"
{{% docs/reference %}}
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.
The docs/reference
shortcode uses the Hugo relref
function under the hood and my understanding is that both of your examples should work the same.
For example, linking to errata.md
, in https://github.com/grafana/writers-toolkit/blob/jdb%2F2023-10-update-linking-guidance/docs/sources/review/doc-validator/_index.md?plain=1#L28
Co-authored-by: Isabel <[email protected]>
…titution Signed-off-by: Jack Baldry <[email protected]>
|
||
To convert a heading to an anchor, make the following changes: | ||
|
||
1. Convert to lower case. |
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.
1. Convert to lower case. | |
1. Convert the header to lower case. |
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.
Unblocking with feedback
Co-authored-by: Isabel <[email protected]> Co-authored-by: Ursula Kallio <[email protected]>
I'm going to get this merged and we can iterate from there. I am keen to get correct information in our documentation first and we can always polish it later. |
…nking-guidance Signed-off-by: Jack Baldry <[email protected]>
relref
shortcode destination section