Adding Ability for Markdown Files to Specify Which Pattern It Should Be Associated With (ex. README.md) #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For example, if I had a colors.twig file in my code with a README.md file living right next to it (living in a colors folder), currently this file is completely ignored by Pattern Lab.
This update adds the ability to specify a
patternType
option in the markdown file's front matter to tell Pattern Lab which pattern it should be associated with (or more specifically, which patternType it should be associated with).Besides offering more flexible in how files are named, this also helps make Pattern Lab much friendlier to monorepo projects where each pattern might be individually versioned, documented, and published to NPM and/or Github where README.md filenames provide a better user experience if browsing a pattern's source files.
CC @aleksip @EvanLovely @evanmwillhite