From 064a0502a717f91a434043e337d0c77c21402c4f Mon Sep 17 00:00:00 2001 From: Evan Lovely Date: Tue, 10 Oct 2017 14:48:56 -0700 Subject: [PATCH] Allowing Pattern State to be set in MD files front matter. Just like node versions. (#134) --- src/PatternLab/PatternData/Rules/DocumentationRule.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PatternLab/PatternData/Rules/DocumentationRule.php b/src/PatternLab/PatternData/Rules/DocumentationRule.php index 4e9ef3fa..e38499f8 100644 --- a/src/PatternLab/PatternData/Rules/DocumentationRule.php +++ b/src/PatternLab/PatternData/Rules/DocumentationRule.php @@ -83,7 +83,11 @@ public function run($depth, $ext, $path, $pathName, $name) { if (isset($title)) { $patternStoreData["nameClean"] = $title; } - + + if (isset($yaml["state"])) { + $patternStoreData["state"] = $yaml["state"]; + } + // if the pattern data store already exists make sure this data overwrites it $patternStoreData = (PatternData::checkOption($patternStoreKey)) ? array_replace_recursive(PatternData::getOption($patternStoreKey),$patternStoreData) : $patternStoreData; PatternData::setOption($patternStoreKey, $patternStoreData);