Compile Templates Embedded in Markdown Files #19
Closed
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.
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:
After:
Practical Usage Example:
CC @EvanLovely @evanmwillhite @jesconstantine @aleksip @bradfrost