Unit 6: head/* partials — drop duplicates, externalize KaTeX & inline CSS#8
Open
stradichenko wants to merge 1 commit intomainfrom
Open
Unit 6: head/* partials — drop duplicates, externalize KaTeX & inline CSS#8stradichenko wants to merge 1 commit intomainfrom
stradichenko wants to merge 1 commit intomainfrom
Conversation
- head.html: drop the inline duplicated theme-init <script>. Drop the hardcoded KaTeX <script>/<link> block (Unit 11 wires KaTeX from assets/js/katex-init.js, gated on .Params.math, with SRI). - head/critical-css.html: drop the duplicate inline theme-init script; keep only the safeJS injection of critical.js. Move the inline selection-highlight <style> into assets/css/critical.css. - head/js.html: collapse the three repeated resources.Get blocks for main.js / pdf-generator.js / scrollbar-fade.js into a single range loop. Drop the duplicated inline theme-init script. - head/styles.html: deduplicate the CSS bundle list (Unit 7 fixes the single.html side). Gate theme-toggle.css, search.css, contribution-calendar.css per page. Replace resources.Minify aliasing with the | minify pipe. - head/meta.html: replace .Date.Format with time.Format. Move CSP into a configurable site.Params.security.csp param with a sane default; drop 'unsafe-eval' from the default. - seo/preload-resources.html: drop dead Google Fonts dns-prefetch / preconnect (no Google Fonts loaded). Use | minify. - seo/schema-org.html: replace safeJS on the social array with jsonify. Replace .Date.Format with time.Format.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
head.html: drop the inline duplicated theme-init<script>. Drop the hardcoded KaTeX<script>/<link>block (Unit 11 wires KaTeX fromassets/js/katex-init.js, gated on.Params.math, with SRI).head/critical-css.html: drop the duplicate inline theme-init script; keep only thesafeJSinjection ofcritical.js. Move the inline selection-highlight<style>intoassets/css/critical.css.head/js.html: collapse the three repeatedresources.Getblocks (main.js / pdf-generator.js / scrollbar-fade.js) into a singlerangeloop. Drop the duplicated inline theme-init script.head/styles.html: deduplicate the CSS bundle list. Gatetheme-toggle.css,search.css,contribution-calendar.cssper page. Replaceresources.Minifyaliasing with the| minifypipe.head/meta.html: replace.Date.Formatwithtime.Format. Move CSP into a configurablesite.Params.security.cspparam with a sane default; drop'unsafe-eval'from the default.seo/preload-resources.html: drop dead Google Fontsdns-prefetch/preconnect.seo/schema-org.html: replacesafeJSon the social array withjsonify.Notes for reviewer
head.html: keeppartialCached "analytics.html"(Unit 9's analytics dispatcher is invariant per site).Test plan
<head>contains exactly one theme-init script.fonts.googleapis.compreconnectin built HTML.'unsafe-eval'in the default CSP header.Part of the PKB-theme modernization batch (15 units).