diff --git a/script/_linter/bin/links.js b/script/_linter/bin/links.js index 52db3f3f16..c3d3e87dbd 100644 --- a/script/_linter/bin/links.js +++ b/script/_linter/bin/links.js @@ -100,11 +100,6 @@ const allFiles = glob `${folderPath}/spec/**/*`, `${folderPath}/tmp/**/*`, `${folderPath}/vendor/**/*`, - - // TODO: Shared chrome removal generated a lot of ignorable errors. - // We plan on redoing the docs header/footer, re-enable when that's done. - `${folderPath}/src/components/chrome/fragments/footer.html`, - `${folderPath}/src/components/chrome/fragments/header.html`, ], }); diff --git a/src/components/chrome/StaticFooter.astro b/src/components/chrome/StaticFooter.astro index 563675a4f7..64b29dfd3d 100644 --- a/src/components/chrome/StaticFooter.astro +++ b/src/components/chrome/StaticFooter.astro @@ -1,12 +1,247 @@ ---- -import footerTemplate from "./fragments/footer.html?raw"; +
+ +
+ + + +{/* Keep copyright year up-to-date for pages that are rarely rebuilt (e.g. v0.44) */} + diff --git a/src/components/chrome/StaticHeader.astro b/src/components/chrome/StaticHeader.astro index 7b2bc6e96e..c319c3e707 100644 --- a/src/components/chrome/StaticHeader.astro +++ b/src/components/chrome/StaticHeader.astro @@ -1,12 +1,3217 @@ --- import { formatGithubStars, getGithubStars } from "@/lib/github/getGithubStars"; -import headerHtml from "./fragments/header.html?raw"; -const githubStars = formatGithubStars(await getGithubStars()); -const renderedHeaderHtml = headerHtml.replace("%%GITHUB_STARS%%", githubStars); +type Props = { + includeGithubStars?: boolean; +}; + +const { includeGithubStars } = Astro.props; + +const githubStars = + includeGithubStars && formatGithubStars(await getGithubStars()); --- - +
+ +
+ diff --git a/src/components/chrome/fragments/footer.html b/src/components/chrome/fragments/footer.html deleted file mode 100644 index 1ec46e5425..0000000000 --- a/src/components/chrome/fragments/footer.html +++ /dev/null @@ -1,126 +0,0 @@ -
- -
- - diff --git a/src/components/chrome/fragments/header.html b/src/components/chrome/fragments/header.html deleted file mode 100644 index 3996482c4b..0000000000 --- a/src/components/chrome/fragments/header.html +++ /dev/null @@ -1,1655 +0,0 @@ -
- -
diff --git a/src/layouts/DefaultNewLayout.astro b/src/layouts/DefaultNewLayout.astro index dcf4716c8b..f4559a7282 100644 --- a/src/layouts/DefaultNewLayout.astro +++ b/src/layouts/DefaultNewLayout.astro @@ -20,7 +20,7 @@ const lq = getLiquidRenderer({ page, dirname }); - +
diff --git a/src/layouts/ErrorLayout.astro b/src/layouts/ErrorLayout.astro index 76816695e7..a949dcb12a 100644 --- a/src/layouts/ErrorLayout.astro +++ b/src/layouts/ErrorLayout.astro @@ -19,7 +19,7 @@ const lq = getLiquidRenderer({ page, dirname }); - +