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

Fix aliases documentation and incorporate more feedback from 'Brunch and learn' session on the topic #396

Merged
merged 5 commits into from
Dec 12, 2023

Conversation

jdbaldry
Copy link
Member

@jdbaldry jdbaldry commented Dec 5, 2023

  • Fix bad example
  • Emphasize that the current directory is the directory containing the page, not the directory of the page
  • Use more easily understood terminology in table demonstration

Copy link
Contributor

github-actions bot commented Dec 5, 2023

Overall readability score: 60.84 (🟢 +0.07)

File Readability
index.md 71.37 (🟢 +2.85)
View detailed metrics

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

File Readability FRE GF ARI CLI DCRS
index.md 71.37 56.86 8.6 9.6 10.43 6.63
  🟢 +2.85 🟢 +8.26 🟢 +0.19 🟢 +0.2 🟢 +0.41 🟢 +0.09

Averages:

  Readability FRE GF ARI CLI DCRS
Average 60.84 47.79 9.57 11.6 12.06 7.31
  🟢 +0.07 🟢 +0.19 🟢 +0 🟢 +0 🟢 +0.01 🟢 +0
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

@JStickler JStickler left a comment

Choose a reason for hiding this comment

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

A couple of suggestions that follow up on how we talked about how this is similar to using cd in the meeting the other day.

@@ -96,23 +96,24 @@ To determine the relative alias, you must first understand the meaning of the cu

For an alias in the page `/docs/grafana/latest/alerting/manage-notifications/`:

- The current directory element (`.`) refers to the directory containing the current page.
- The current directory element (`.`) refers to the directory containing the current page, _not_ the directory of the current page.
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
- The current directory element (`.`) refers to the directory containing the current page, _not_ the directory of the current page.
- The current directory element (`.`) refers to the parent directory of the current page, _not_ the directory that contains the current page. An easy way to remember is that one dot means you have moved one step back in the file path to the page.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we should avoid "easy" if possible (https://developers.google.com/style/word-list#easy).

My only concern with this tip is that it is only true at the start of the alias, and that's really because the starting directory for any alias is the directory containing the current page.

I'm worried people will internalize . goes back one part and .. goes back two when in actually . goes nowhere and .. goes back one part.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, good point about "easy".

Describing how aliases work is hard!


In this example, this is the page `/docs/grafana/latest/alerting/manage-notifications/`.
In this example, this is the page `/docs/grafana/latest/alerting/`.

- The parent directory element (`..`) refers to the parent directory of the current directory element.
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
- The parent directory element (`..`) refers to the parent directory of the current directory element.
- The parent directory element (`..`) refers to the parent directory of the current directory element. An easy way to remember is that two dots means you have moved two steps back in the file path to the page.


The following table demonstrates the redirect URL, **REDIRECT**, created when using the relative alias, **RELATIVE ALIAS**, in the source file for **DESTINATION**:
The following table demonstrates how to redirect **FROM PAGE**, to **TO PAGE**.
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
The following table demonstrates how to redirect **FROM PAGE**, to **TO PAGE**.
In the following table, the **FROM PAGE** column lists the page that requires a redirect, for example because the page has been moved or no longer exists. The **TO PAGE** is where we want to redirect them, for example the renamed page or where the content has been moved.
The third column shows the alias that should be added to the front matter of the file in the **TO PAGE** column to create the proper redirect.

Copy link
Member Author

Choose a reason for hiding this comment

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

I like this suggestion but do we need to avoid the use of "we"?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think so.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've attempted to rewrite this bit using a list of the columns and your suggestions for explaining each column in 462fe21

Signed-off-by: Jack Baldry <[email protected]>
@jdbaldry
Copy link
Member Author

Gonna get this in to make sure the example is no longer broken but happy to accept additional contributions in follow up PRs.

@jdbaldry jdbaldry merged commit d8a403d into main Dec 12, 2023
6 checks passed
@jdbaldry jdbaldry deleted the jdb/2023-12-improve-aliases-documentation branch December 12, 2023 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants