Skip to content

fix: remove unneeded main.html that added the dropdown menus at the bottom#2

Merged
andrzejnovak merged 1 commit intocms-cat:mainfrom
IzaakWN:rmMain
Mar 31, 2026
Merged

fix: remove unneeded main.html that added the dropdown menus at the bottom#2
andrzejnovak merged 1 commit intocms-cat:mainfrom
IzaakWN:rmMain

Conversation

@IzaakWN
Copy link
Copy Markdown
Contributor

@IzaakWN IzaakWN commented Mar 31, 2026

Issue

I realized at the bottom of the pages that used this plugin, the drop menus would be duplicated. For example:

https://cms-analysis.docs.cern.ch/ using mkdocs-header-dropdown v0.3.0:

Scherm­afbeelding 2026-03-31 om 19 09 20

https://tau-wiki.docs.cern.ch using mkdocs-header-dropdown v0.4.0:

Scherm­afbeelding 2026-03-31 om 19 09 33

Solution

It seems to be because partials/header-dropdown.html is included twice:

It seems the latter that adds the drop menu a second time to its script block at the very bottom of base.html. It is probably redundant, and additionally prevents the user from overriding main.html themselves for other purposes.

Therefore, this PR proposes to just remove templates/main.html all together. It works when I tested it locally for the CMS website. The dropmenu still appears in the header as expected, but not in the footer anymore.

@andrzejnovak andrzejnovak changed the title Remove unneeded main.html that added the dropdown menus at the bottom fix: remove unneeded main.html that added the dropdown menus at the bottom Mar 31, 2026
@andrzejnovak andrzejnovak merged commit 3c96cee into cms-cat:main Mar 31, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants