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: Compile Templates Embedded in Markdown Files #126

Open
wants to merge 26 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.

You know the thing that really sucks about documenting your growing design system? When your docs you spent so much time putting together get out of sync with your source of truth. Again.

Wouldn't it be amazing if we could just use the same data and the same templates being put INTO the system to DOCUMENT the system itself? What's that? I already put a PR in for that on the original Pattern Lab PHP Core repo... 10 months ago? Oh snap!

In all seriousness, this is a major feature we've been seriously lacking in Pattern Lab's markdown docs approach for forever. This PR should fix that by letting you use the same templates and same data as you would with any other pattern in Pattern Lab, but in your markdown files.

Testing this out locally seems to be working as expected (global data trickling through, local data overriding global data if it exists, and pattern includes w/ namespaces) -- all seem to be working perfectly at first glance!

Before:
image

After:
image

Practical Usage Example:
image
image

CC @EvanLovely @evanmwillhite @jesconstantine @aleksip @bradfrost

dmolsen and others added 26 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
…templates / patterns embedded in markdown files. Living Design System docs FTW
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