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

Add a remark plugin to support custom header id #245

Merged
merged 7 commits into from
Nov 27, 2023

Conversation

dshevtsov
Copy link
Contributor

@dshevtsov dshevtsov commented Nov 27, 2023

Purpose of this pull request

This pull request (PR) adds a remark-heading-id plugin that allows validation of custom headers via remark-validate-links.

Test

See AdobeDocs/commerce-admin-developer#85

dshevtsov and others added 2 commits November 27, 2023 12:05
@dshevtsov dshevtsov self-assigned this Nov 27, 2023
@dshevtsov dshevtsov added the enhancement New feature or request label Nov 27, 2023
@dshevtsov dshevtsov marked this pull request as draft November 27, 2023 18:13
Copy link
Contributor

@jeff-matthews jeff-matthews left a comment

Choose a reason for hiding this comment

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

Approved for the basic functionality, but I want to note that this repo has special --ignore-patterns configured for the src/_includes and src/pages/graphql/schema directories.

For background, we originally added these patterns because of the false positives with custom header IDs. However, we've since expanded that to ignore frontmatter for the graphql schema directories. I assume we also need to ignore the _includes in the frontmatter checks as well.

Ideally, we would not ignore directories when testing.

@jeff-matthews
Copy link
Contributor

But maybe the frontmatter config makes it unnecessary to use CLI ignore patterns: https://github.com/AdobeDocs/commerce-webapi/blob/main/.remarkrc.mjs#L17.

The issue should be fixed by using remark-heading-id
@keharper
Copy link
Contributor

Coincidentally, in #246 I just deleted nearly 50 schema files that are no longer necessary now that the GraphQL schema docs link directly to SpectaQL. I don't know if it'll be possible to remove the pattern, but the remaining include files probably don't link to other include files.

@dshevtsov dshevtsov marked this pull request as ready for review November 27, 2023 20:20
@dshevtsov dshevtsov merged commit faef22a into AdobeDocs:main Nov 27, 2023
2 checks passed
@dshevtsov dshevtsov deleted the ds_custom-header-check branch November 27, 2023 20:46
@dshevtsov
Copy link
Contributor Author

Approved for the basic functionality, but I want to note that this repo has special --ignore-patterns configured for the src/_includes and src/pages/graphql/schema directories.

For background, we originally added these patterns because of the false positives with custom header IDs. However, we've since expanded that to ignore frontmatter for the graphql schema directories. I assume we also need to ignore the _includes in the frontmatter checks as well.

Ideally, we would not ignore directories when testing.

@jeff-matthews please create a ticket for me to investigate the issue.

@jeff-matthews
Copy link
Contributor

jeff-matthews commented Nov 27, 2023

@dshevtsov, I created #247, which I think will eliminate the need for the --ignore-patterns option.

@jeff-matthews jeff-matthews added the internal Differentiates work between community and Adobe staff label Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internal Differentiates work between community and Adobe staff
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants