Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions 11ty/CustomLiquid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,8 @@ export class CustomLiquid extends Liquid {

// Clean out elements to be removed
// (e.g. editors.css & sources.css, and leftover template paragraphs)
// NOTE: some paragraphs with the "instructions" class actually have custom content,
// but for now this remains consistent with the XSLT process by stripping all of them.
$(".remove, section#meta, section.meta").remove();
// Note: the link selector accounts for ~40 files forgetting class="remove" on editors.css
$(".remove, link[href$='editors.css'], section#meta, section.meta").remove();

if ($("p.instructions").length > 0) {
console.error(`${filepath} contains a <p class="instructions"> element.\n` +
Expand All @@ -151,6 +150,9 @@ export class CustomLiquid extends Liquid {
throw new Error("Instructions paragraph found; please resolve.")
}

// Add charset to pages that forgot it
if (!$("meta[charset]").length) $('<meta charset="UTF-8">').prependTo("head");

const prependedIncludes = ["header"];
const appendedIncludes = ["wai-site-footer", "site-footer"];

Expand Down
3 changes: 2 additions & 1 deletion techniques/technique-template.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Technique Title</title>
<link rel="stylesheet" type="text/css" href="../../css/editors.css">
<link rel="stylesheet" type="text/css" href="../../css/editors.css" class="remove">
</head>
<body>
<h1>Technique Title</h1>
Expand Down
3 changes: 2 additions & 1 deletion understanding/understanding-template.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>WCAG 2 Understanding Page</title>
<link rel="stylesheet" type="text/css" href="sources.css">
<link rel="stylesheet" type="text/css" href="sources.css" class="remove">
</head>
<body>
<h1>Understanding SC #.#.#</h1>
Expand Down