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

Update link guidance to reflect current advice #345

Merged
merged 23 commits into from
Nov 2, 2023

Conversation

jdbaldry
Copy link
Member

@jdbaldry jdbaldry commented Oct 9, 2023

  • Restructured links and references page
  • Rewrote relref shortcode destination section
  • Fixed linting errors
  • Update linking advice

imatwawana and others added 4 commits October 6, 2023 17:37
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]>
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/shortcodes/index.md Outdated Show resolved Hide resolved
docs/sources/get-started/_index.md Show resolved Hide resolved
docs/sources/write/links/index.md Show resolved Hide resolved
docs/sources/write/links/index.md Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/markdown-guide/index.md Show resolved Hide resolved
docs/sources/write/shortcodes/index.md Outdated Show resolved Hide resolved
docs/sources/write/shortcodes/index.md Outdated Show resolved Hide resolved
@jdbaldry jdbaldry changed the title Update link guidance. Update link guidance Oct 9, 2023
Copy link
Contributor

@imatwawana imatwawana left a 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.

docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Oct 18, 2023

Overall readability score: 60.61 (🟢 +0.57)

File Readability
_index.md 55.11 (🟢 +0.3)
index.md 62.75 (🟢 +0.61)
index.md 75.34 (-)
index.md 68.88 (🟢 +0.15)
index.md 64.56 (🟢 +0.79)
index.md 61.77 (🟢 +0.3)
View detailed metrics

🟢 - Shows an increase in readability
🔴 - Shows a decrease in readability

File Readability FRE GF ARI CLI DCRS
_index.md 55.11 37.26 7.32 13.9 14.58 7.6
  🟢 +0.3 🟢 +0 🟢 +0.04 🟢 +0.3 🔴 -0.12 🔴 -0.01
index.md 62.75 47.28 8.73 12 12.47 6.77
  🟢 +0.61 🟢 +0.1 🟢 +0.07 🟢 +0.2 🟢 +0.11 🟢 +0.01
index.md 75.34 53.07 6.86 8.8 10.82 6.32
  - - - - - -
index.md 68.88 52.05 7.44 10.3 11.87 6.83
  🟢 +0.15 🔴 -0.1 🔴 -0.02 🟢 +0.1 🟢 +0.06 🔴 -0.01
index.md 64.56 47.18 8.64 11.9 12.35 6.35
  🟢 +0.79 🟢 +0.3 🟢 +0.3 🟢 +0 🔴 -0.11 🟢 +0.12
index.md 61.77 49.41 9.29 11.3 12.64 7.13
  🟢 +0.3 🟢 +0.2 🟢 +0.1 🟢 +0.1 🔴 -0.06 🟢 +0.01

Averages:

  Readability FRE GF ARI CLI DCRS
Average 60.61 47.52 9.59 11.66 12.08 7.31
  🟢 +0.57 🟢 +0.32 🟢 +0.07 🟢 +0.14 🟢 +0.08 🟢 +0.02
View metric targets
Metric Range Ideal score
Flesch Reading Ease 100 (very easy read) to 0 (extremely difficult read) 60
Gunning Fog 6 (very easy read) to 17 (extremely difficult read) 8 or less
Auto. Read. Index 6 (very easy read) to 14 (extremely difficult read) 8 or less
Coleman Liau Index 6 (very easy read) to 17 (extremely difficult read) 8 or less
Dale-Chall Readability 4.9 (very easy read) to 9.9 (extremely difficult read) 6.9 or less

Copy link
Contributor

@imatwawana imatwawana left a 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.

docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Show resolved Hide resolved
docs/sources/write/shortcodes/index.md Show resolved Hide resolved
jdbaldry and others added 5 commits October 19, 2023 14:45
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]>
@jdbaldry jdbaldry requested a review from imatwawana October 19, 2023 13:48
Copy link
Contributor

@Eve832 Eve832 left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Contributor

@imatwawana imatwawana left a 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!

docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
docs/sources/write/links/index.md Outdated Show resolved Hide resolved
@@ -437,18 +509,28 @@ Set the reference at the end of the page as follows:

Copy link
Contributor

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 %}}

Copy link
Member Author

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


To convert a heading to an anchor, make the following changes:

1. Convert to lower case.
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
1. Convert to lower case.
1. Convert the header to lower case.

Copy link
Contributor

@osg-grafana osg-grafana left a comment

Choose a reason for hiding this comment

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

Unblocking with feedback

@osg-grafana osg-grafana added the type/docs Docs Squad label used across all Grafana Labs repos label Oct 23, 2023
Co-authored-by: Isabel <[email protected]>
Co-authored-by: Ursula Kallio <[email protected]>
@jdbaldry
Copy link
Member Author

jdbaldry commented Nov 2, 2023

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.

@jdbaldry jdbaldry changed the title Update link guidance Update link guidance to reflect current advice Nov 2, 2023
@jdbaldry jdbaldry merged commit c3b862c into main Nov 2, 2023
9 checks passed
@jdbaldry jdbaldry deleted the jdb/2023-10-update-linking-guidance branch November 2, 2023 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/docs Docs Squad label used across all Grafana Labs repos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants