-
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
Fix aliases documentation and incorporate more feedback from 'Brunch and learn' session on the topic #396
Conversation
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
Signed-off-by: Jack Baldry <[email protected]>
…page, not the directory of the page Signed-off-by: Jack Baldry <[email protected]>
Signed-off-by: Jack Baldry <[email protected]>
Overall readability score: 60.84 (🟢 +0.07)
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.
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. |
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 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. |
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 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.
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, 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. |
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 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**. |
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 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. |
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 like this suggestion but do we need to avoid the use of "we"?
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 don't think so.
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 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]>
Gonna get this in to make sure the example is no longer broken but happy to accept additional contributions in follow up PRs. |