Skip to content

Commit 27dae03

Browse files
authored
.sync/markdownlint.yaml: Templatize allowed HTML elements (#38)
The file sync process can compile files as Nunjucks[1] templates if the `template` field is present. In this case, allowed HTML elements in markdown files are adjusted for the following repos: - The mu (documentation) repo to allow `<center>` and `<img>` tags. - The mu_feature_mm_supv repo to allow `<SmmCategory>` and `<PolicyAccessAttribute>` tags. [1] https://mozilla.github.io/nunjucks/ Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
1 parent e8d095e commit 27dae03

2 files changed

Lines changed: 29 additions & 4 deletions

File tree

.sync/Files.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,20 @@ group:
7373
# - microsoft/mu_tiano_platforms
7474
# - Custom pipeline steps
7575

76-
# CI Configuration - Markdown Lint
76+
# CI Configuration - Markdown Lint - Common Settings
7777
- files:
7878
- source: .sync/ci_config/.markdownlint.yaml
7979
dest: .markdownlint.yaml
80+
template:
81+
allowed_elements:
82+
- br
8083
repos: |
81-
microsoft/mu
8284
microsoft/mu_basecore
8385
microsoft/mu_common_intel_min_platform
8486
microsoft/mu_crypto_release
8587
microsoft/mu_devops
8688
microsoft/mu_feature_config
8789
microsoft/mu_feature_ipmi
88-
microsoft/mu_feature_mm_supv
8990
microsoft/mu_feature_uefi_variable
9091
microsoft/mu_oem_sample
9192
microsoft/mu_plus
@@ -94,6 +95,30 @@ group:
9495
microsoft/mu_tiano_platforms
9596
microsoft/mu_tiano_plus
9697
98+
# CI Configuration - Markdown Lint - Mu Documentation Repo Settings
99+
- files:
100+
- source: .sync/ci_config/.markdownlint.yaml
101+
dest: .markdownlint.yaml
102+
template:
103+
allowed_elements:
104+
- br
105+
- center
106+
- img
107+
repos: |
108+
microsoft/mu
109+
110+
# CI Configuration - Markdown Lint - Mu MM Supervisor Repo Settings
111+
- files:
112+
- source: .sync/ci_config/.markdownlint.yaml
113+
dest: .markdownlint.yaml
114+
template:
115+
allowed_elements:
116+
- br
117+
- SmmCategory
118+
- PolicyAccessAttribute
119+
repos: |
120+
microsoft/mu_feature_mm_supv
121+
97122
# dependabot - Track GitHub Actions and PIP Modules
98123
- files:
99124
- source: .sync/dependabot/actions-pip.yml

.sync/ci_config/.markdownlint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
{
1818
"default": true,
1919
"MD013": {"line_length": 120, "code_blocks": false, "tables": false},
20-
"MD033": {"allowed_elements": ["br"]}
20+
"MD033": {"allowed_elements": [{{ allowed_elements | dump | safe }}]}
2121
}

0 commit comments

Comments
 (0)