Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

headTags are ignored #9792

Closed
6 of 7 tasks
rastislavcore opened this issue Jan 26, 2024 · 6 comments · Fixed by #10014
Closed
6 of 7 tasks

headTags are ignored #9792

rastislavcore opened this issue Jan 26, 2024 · 6 comments · Fixed by #10014
Labels
documentation The issue is related to the documentation of Docusaurus

Comments

@rastislavcore
Copy link

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

headTags are not reflected in builds. Defined in: https://github.com/CorePass/corepass-docs/blob/4695736a717cc14a3ac8154cf34fdf198a100d30/docusaurus.config.ts#L136

Tried one example from https://docusaurus.io/docs/seo#global-metadata

Reproducible demo

https://docs.corepass.net

Steps to reproduce

  1. Create the item in headTags
  2. Setup the parameters
  3. Build or publish the website

Expected behavior

Head elements should be shown and generator should be replaced.

Actual behavior

No head tags are injected. It is ignored.

Your environment

Self-service

  • I'd be willing to fix this bug myself.
@rastislavcore rastislavcore added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Jan 26, 2024
@swaroopar
Copy link

+1 have exactly same issue with version 3.1.0

dumbbell added a commit to rabbitmq/rabbitmq-website that referenced this issue Jan 31, 2024
Note that as of this commit, this does not work because of a regression
in Docusaurus related to custom <head/> tags. See facebook/docusaurus#9792.
@Josh-Cena
Copy link
Collaborator

Hi, headTags is a top-level config, not a themeConfig. @swaroopar please confirm if yours is the same issue.

@Josh-Cena Josh-Cena closed this as not planned Won't fix, can't repro, duplicate, stale Mar 3, 2024
@Josh-Cena Josh-Cena added closed: question This issue is a user error/misunderstanding. and removed bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Mar 3, 2024
@g0rbe
Copy link

g0rbe commented Apr 2, 2024

@Josh-Cena The SEO doc tricked me as well: https://docusaurus.io/docs/seo#global-metadata

@Josh-Cena Josh-Cena reopened this Apr 2, 2024
@Josh-Cena Josh-Cena added documentation The issue is related to the documentation of Docusaurus and removed closed: question This issue is a user error/misunderstanding. labels Apr 2, 2024
@Josh-Cena
Copy link
Collaborator

Yeah looks like that's wrong. I'll see if there are other places.

@g0rbe
Copy link

g0rbe commented Apr 3, 2024

The search for headTags shows only this page wrong.

@slorber
Copy link
Collaborator

slorber commented Apr 4, 2024

Related discussion: #9991 (reply in thread)

Yes, I confirm it's not a themeConfig but a site config:
https://docusaurus.io/docs/api/docusaurus-config#headTags

I'll merge the first doc PR that fixes it if anyone want to submit one (please backport to older docs versions too)

dumbbell added a commit to rabbitmq/rabbitmq-website that referenced this issue Apr 9, 2024
The documentation for `headTags` was fixed in Docusaurus 3.2.1
(facebook/docusaurus#10014). The fact that they didn't work for us was
not related to a problem in Docusuaurs (#facebook/docusaurus#9792), but
an incorrect use on our side.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation The issue is related to the documentation of Docusaurus
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants