fix(docs): use main.html override so Algolia meta tag reaches deployed site#3666
fix(docs): use main.html override so Algolia meta tag reaches deployed site#3666
Conversation
…very page Material for MkDocs renders normal documentation pages through main.html extending base.html. The previous overrides/index.html was only consulted for pages that opt in via `template: index.html` in YAML front matter — none of jspsych's docs do that, so the verification tag never reached the deployed site. https://claude.ai/code/session_01V5YbstVEoGn4g1nZhgJ9Fy
|
📦 Preview build readyBuilt from PR head Changed packages: none detected Quick-start HTML: <script src="https://cdn.jsdelivr.net/gh/jspsych/jsPsych@fe4342fc673dfe42a40b7b8c13e366116690bcd6/packages/jspsych/dist/index.browser.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jspsych/jsPsych@fe4342fc673dfe42a40b7b8c13e366116690bcd6/packages/jspsych/css/jspsych.css">
<script src="https://cdn.jsdelivr.net/gh/jspsych/jsPsych@fe4342fc673dfe42a40b7b8c13e366116690bcd6/packages/plugin-html-keyboard-response/dist/index.browser.min.js"></script>All package URLs
Last updated 2026-05-05 01:21 UTC for PR head |
Summary
Follow-up to #3664. After that PR was merged and
Publish Docswas run, the Algolia verification meta tag was not present on the deployed site.Root cause: Material for MkDocs renders normal documentation pages through
main.html(which extendsbase.html). The override added in #3664 was namedoverrides/index.htmland{% extends "index.html" %}, but Material'sindex.htmltemplate is only used for pages that explicitly opt in viatemplate: index.htmlin YAML front matter. None of the jsPsych docs pages do this, so the override was never instantiated andextraheadwas never injected.Fix: Rename the override to
overrides/main.htmland extendbase.html, per the Material customization recipe (https://squidfunk.github.io/mkdocs-material/customization/#extending-the-theme). Also collapsed the stray double space between attributes in the<meta>tag.mkdocs.ymlalready has the correcttheme.custom_dir: 'overrides'from #3664 and is unchanged here.Test plan
Publish DocsGitHub Action against this branch (or after merge tomain).<meta name="algolia-site-verification" content="4B994F893596449E" />is present in<head>.https://claude.ai/code/session_01V5YbstVEoGn4g1nZhgJ9Fy
Generated by Claude Code