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

Corrected the confusion of steps in the document due to formatting #220

Merged

Conversation

normal-coder
Copy link
Contributor

@normal-coder normal-coder commented Aug 20, 2023

Summary

Resolves #224

improve Logging documentation. The main changes are as follows:

  • Added language settings for code blocks
  • Fixed wrong numbering of operation steps caused by indentation
  • Corrected heading hierarchy for first paragraph

The following is a comparison example before and after restoration:

Before:

image

After:

image

Reference from specification:

Release Note

None.

Documentation

This PR implements the doc change.

@netlify
Copy link

netlify bot commented Aug 20, 2023

Deploy Preview for docssigstore ready!

Name Link
🔨 Latest commit 2dbd8e6
🔍 Latest deploy log https://app.netlify.com/sites/docssigstore/deploys/64e3c01b39ece9000872a550
😎 Deploy Preview https://deploy-preview-220--docssigstore.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

… due to formatting

Specification reference: https://github.com/DavidAnson/markdownlint/

Signed-off-by: 诺墨 <zhangshengxiang@gitee.com>
Signed-off-by: 诺墨 <zhangshengxiang@gitee.com>
@smythp
Copy link
Collaborator

smythp commented Aug 21, 2023

Hi @normal-coder,

I just looked through this and it seems like a great PR.

One question I have is with the indentation of fenced (```) code blocks, for example the go and yml code blocks. Why are they indented by four spaces?

For example, I would expect:

```go
...
```

instead of:

    ```go
     ...
     ```

This doesn't seem to affect rendering, but I'd typically expect fenced code blocks to not be indented.

Thanks, this seems like a great contribution.

@smythp
Copy link
Collaborator

smythp commented Aug 21, 2023

Also @ltagliaferri , this PR seems to be post-migration and doesn't need to be rebased.

@normal-coder
Copy link
Contributor Author

Hi @normal-coder,

I just looked through this and it seems like a great PR.

One question I have is with the indentation of fenced (```) code blocks, for example the go and yml code blocks. Why are they indented by four spaces?

For example, I would expect:

...

instead of:

```go
 ...
 ```

This doesn't seem to affect rendering, but I'd typically expect fenced code blocks to not be indented.

Thanks, this seems like a great contribution.

Perhaps you should try to understand principle of uniformity of the CommonMark specification: if a chunk of text has a certain meaning, it will continue to have the same meaning when put into a container block (such as a list item or blockquote).

I can understand that coding preferences don't want to have too many spaces in front of the example code snippets (which is extremely unfriendly to Vim or Emacs users), but compared to blockquotes inserting > at the beginning of the line, it maintains the integrity and coherence of the code sex.

Such writing does not affect rendering, because most parsers follow this specification for processing and implementation.

Copy link
Collaborator

@smythp smythp left a comment

Choose a reason for hiding this comment

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

In addition to reviewing the markdown, I've tested these changes with a screen reader. The change to the heading hierarchy and to list contiguity improves accessibility. Previously, the steps were treated as seven separate lists, not one list with seven items (for example). Consistency in headings is also important for screen reader navigation.

I learned a lot reading through the spec doc you shared. Semantically, how you've done things here now makes sense to me. The code blocks are indented to show that they are part of the list item, and also to indicate that the list should not be interrupted in parsing. Thanks for the explanation.

@smythp smythp merged commit 321f710 into sigstore:main Aug 22, 2023
6 checks passed
normal-coder added a commit to normal-coder/Sigstore-Docs that referenced this pull request Aug 25, 2023
* main:
  ci(github action): add Markdown linter check support for main branch (sigstore#227)
  Redirects now appears in public (sigstore#234)
  add 'cosign sign-blob'in the mTLS TSA section (sigstore#239)
  Changed 404 text, restored i18n (sigstore#238)
  Restored Netlify redirects file (sigstore#233)
  Removed docs from URL path (sigstore#232)
  Corrected the confusion of steps in the document due to formatting (sigstore#220)
  Added anchor text to link to releases page (sigstore#223)
normal-coder added a commit to normal-coder/Sigstore-Docs that referenced this pull request Aug 25, 2023
* main:
  ci(github action): add Markdown linter check support for main branch (sigstore#227)
  Redirects now appears in public (sigstore#234)
  add 'cosign sign-blob'in the mTLS TSA section (sigstore#239)
  Changed 404 text, restored i18n (sigstore#238)
  Restored Netlify redirects file (sigstore#233)
  Removed docs from URL path (sigstore#232)
  Corrected the confusion of steps in the document due to formatting (sigstore#220)
  Added anchor text to link to releases page (sigstore#223)
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.

Simplify step descriptions by following corresponding indentation for better reading experience.
2 participants