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

FEAT: Validate (and preprocess?) Frontmatter in .md and .mdx files #135

Open
1 of 2 tasks
helmturner opened this issue Oct 30, 2022 · 1 comment
Open
1 of 2 tasks
Assignees
Labels
enhancement New feature or request front end front end dev tasks (react/js component builds, css, html)

Comments

@helmturner
Copy link
Collaborator

Note: for support questions, please use #ug-code-for-tulsa slack channel in Techlahoma or stackoverflow. This repository's issues are reserved for feature requests and bug reports.

  • I'm submitting a ...

    • bug report
    • feature request
  • What is the current behavior?

You can put anything you want into the front-matter section of a .md or .mdx file, whether or not it's correct. If the front-matter schema doesn't match what our pipeline expects, you might get unexpected behavior, a silent bug, or an unhelpful error.

We're not using front-matter inputs anywhere as of yet, so it can't be reproduced easily.

  • What is the expected behavior?

A helplful and descriptive build error should occur in any of the following events:

  • A required front-matter value is missing
  • A front-matter value has an invalid type
  • A front-matter value has an invalid value
  • An unexpected front-matter value is encountered (may be helpful for catching typos on optional fields)
  • What is the motivation / use case for changing the behavior?

Good errors make for better communication between devs and content creators. This also allows us to preprocess when we validate. Finally, the content migrated from the old site causes all sorts of errors stemming from the format of the front-matter, and we would like to know specifically what needs fixing.

  • Please tell us about your environment:

    • Version: n/a
    • Browser: n/a
    • Language: n/a
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

This unblocks #101 , #81 , #2

@helmturner helmturner added enhancement New feature or request front end front end dev tasks (react/js component builds, css, html) labels Oct 30, 2022
@helmturner helmturner self-assigned this Oct 30, 2022
@helmturner helmturner moved this to Backlog in Website Rebuild 2022 Oct 30, 2022
@helmturner helmturner moved this from Backlog to In Progress in Website Rebuild 2022 Oct 30, 2022
@zenlex
Copy link
Collaborator

zenlex commented Oct 30, 2022

@helmturner Schema Information:
3 main content types - Blog, Event, Project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request front end front end dev tasks (react/js component builds, css, html)
Projects
Status: In Progress
Development

No branches or pull requests

2 participants