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

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

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

sghoweri
Copy link
Contributor

@sghoweri sghoweri commented Oct 6, 2017

Original pull request from the Drupal Pattern Lab Fork which already merged in these 9 previous PRs.

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

dmolsen and others added 24 commits July 28, 2016 17:12
Remove extra character from InstallerUtil so dev branch works
… comments to explain my PHP chicken scratch.

Addresses existing open issue #3 and corresponds with the 2nd half of work mentioned in drupal-pattern-lab/patternengine-php-twig#1
Updating global data to use `yml` or `yaml`
v2.8.0 RC - Merging Latest on Dev into Master
Replace possible dots in pattern names with dashes
…-lineages

Fix for Broken Lineage Functionality in PL When Using Twig templates w/ Path Namespaces (ie. Drupal 8-friendly Paths)
Don't overwrite nameClean if it has already been set
…exist when scanning the pattern source directory for patterns; adds the RecursiveIteratorIterator flag to follow symbolic links while still continuing to skip dots (. and ..).

This opens the door for some creative workarounds to the rigid way Pattern Lab expects pattern templates to be organized at the file system level + how the physical path to a pattern determines how it's organized in Pattern Lab... pattern-lab#28
Allow Pattern Lab to follow pattern symlinks when registering patterns
…ternType it should be associated via frontmatter.
@sghoweri
Copy link
Contributor Author

sghoweri commented Oct 6, 2017

And just so this doesn't accidently get lost, @EvanLovely also mentioned:

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.

@EvanLovely
Copy link
Member

See #48

@EvanLovely
Copy link
Member

And #34

@EvanLovely
Copy link
Member

EvanLovely commented Oct 12, 2017

FYI, just added these to MD docs config: #137

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.

None yet

5 participants