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

Check MDX frontmatter #96

Merged
merged 18 commits into from
Sep 24, 2024
Merged

Check MDX frontmatter #96

merged 18 commits into from
Sep 24, 2024

Conversation

lampa-da
Copy link
Collaborator

@lampa-da lampa-da commented Sep 3, 2024

This PR introduces a new script, check-mdx-frontmatter.js, which is designed to validate the frontmatter of MDX files in the fern/pages directory. The script ensures that each MDX file has a description in its frontmatter and that the description length falls within the specified range of 50 to 160 characters.

The script is integrated into the GitHub Actions workflow, check-mdx-frontmatter.yml, which runs on pull requests targeting the main branch. The workflow checks out the repository, sets up pnpm, installs dependencies, and then executes the check-mdx-frontmatter.js script.

Additionally, the PR updates the package.json and pnpm-lock.yaml files to include the gray-matter package as a dependency, ensuring that the required package is available for the script to function correctly.

  • New Script: check-mdx-frontmatter.js for validating frontmatter of MDX files.
  • Updated Workflow: check-mdx-frontmatter.yml to run the new script on pull requests.
  • Dependency Updates: gray-matter added to package.json and pnpm-lock.yaml.
  • File Changes: fern/pages/responsible-use/security.mdx has been modified.

@lampa-da lampa-da marked this pull request as ready for review September 3, 2024 19:19
@lampa-da lampa-da requested review from a team as code owners September 3, 2024 19:19
@lampa-da lampa-da requested review from daniel-cohere and removed request for daniel-cohere September 3, 2024 19:19
Copy link

github-actions bot commented Sep 3, 2024

@lampa-da lampa-da marked this pull request as draft September 3, 2024 22:46
Copy link

github-actions bot commented Sep 5, 2024

Copy link

github-actions bot commented Sep 5, 2024

Copy link

github-actions bot commented Sep 5, 2024

Copy link

github-actions bot commented Sep 5, 2024

Copy link

github-actions bot commented Sep 9, 2024

Copy link

github-actions bot commented Sep 9, 2024

Copy link

Copy link

Copy link

Copy link

Copy link

Copy link

@lampa-da lampa-da marked this pull request as ready for review September 20, 2024 21:04
Copy link

Copy link

Copy link
Contributor

@ishubham326 ishubham326 left a comment

Choose a reason for hiding this comment

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

🔥 Nice!

.github/scripts/check-mdx-frontmatter.js Outdated Show resolved Hide resolved
Co-authored-by: Shubham Shukla <[email protected]>
Signed-off-by: Kate Sv <[email protected]>
Copy link

Copy link
Collaborator

@billytrend-cohere billytrend-cohere left a comment

Choose a reason for hiding this comment

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

Awesome!

@lampa-da lampa-da merged commit 9acfe5c into main Sep 24, 2024
2 checks passed
@lampa-da lampa-da deleted the kate-check-meta-data-for-docs branch September 24, 2024 16:04
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.

3 participants