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

Adding Ability for Markdown Files to Specify Which Pattern It Should Be Associated With (ex. README.md) #18

Closed

Conversation

sghoweri
Copy link
Collaborator

@sghoweri sghoweri commented Sep 3, 2017

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).

---
title: Color Palette
patternType: colors
---

Our primary palette consists of our primary brand color...

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

…ternType it should be associated via frontmatter.
@EvanLovely
Copy link

Awesome! Tested & works. Could we get it so it could make this scenario work?

  • atoms/
    • 06-buttons/
      • button-primary
      • button-alt
    • 06-buttons.md

When you name files like 06-buttons.md it places it above the group, full width, and always visible. I like that placing a lot.

@sghoweri
Copy link
Collaborator Author

sghoweri commented Sep 3, 2017

@EvanLovely lemme take a closer look and I'll let you know!

Definitely agree with you though. I've found myself doing a bit of both -- some pattern specific docs to target unique or specific features, etc + more generalized docs covering a whole family of patterns.

@sghoweri
Copy link
Collaborator Author

sghoweri commented Oct 6, 2017

Closing out - new PR opened on the main Pattern Lab repo pattern-lab#125

@sghoweri sghoweri closed this Oct 6, 2017
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