Skip to content

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

@helmturner

Description

@helmturner

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestfront endfront end dev tasks (react/js component builds, css, html)

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions