diff --git a/11ty/CustomLiquid.ts b/11ty/CustomLiquid.ts index d2577cdd24..9db75a22ea 100644 --- a/11ty/CustomLiquid.ts +++ b/11ty/CustomLiquid.ts @@ -158,6 +158,10 @@ export class CustomLiquid extends Liquid { const prependedIncludes = ["header"]; const appendedIncludes = ["wai-site-footer", "site-footer"]; + // Include draft banner at top of informative pages for GH Pages builds and PR previews + if (process.env.WCAG_MODE === "editors" || (process.env.COMMIT_REF && !process.env.WCAG_MODE)) + prependedIncludes.unshift("draft-banner"); + if (isUnderstanding) prependedIncludes.push( isIndex ? "understanding/navigation-index" : "understanding/navigation" diff --git a/_includes/draft-banner.html b/_includes/draft-banner.html new file mode 100644 index 0000000000..dfe1469b7c --- /dev/null +++ b/_includes/draft-banner.html @@ -0,0 +1,10 @@ +{%- comment -%} +Banner shown only on builds of informative docs for GitHub Pages. +{%- endcomment -%} +{%- assign pubSlug = page.url | replace: "techniques", "Techniques" | replace: "understanding", "Understanding" | replace_last: ".html", "" -%} +
+

+ This is an unpublished editor’s draft that might include content that is not finalized. + View the published version +

+