My understanding is that the docusuarus.config.js
file essentially translates the defined info into HTML that builds your website. The file the translated info goes to is the 'index.html' file.
However, my footer (and a few other components) in my config.js
file will not reflect in the index.html
file. For example, in my docusuarus.config.js
file, I have defined a footer:
footer: {
copyright: `<b>Unless otherwise noted, all files contained herein are X Company, Inc., Proprietary and Confidential Information.</b>
<br/><br/>
Copyright © ${new Date().getFullYear()} Company, Version 1.00`,
This footer worked before I modified the homepage index.js
file. It seems the index.js
file is overriding some things.
In my index.html
file, this is the defined footer:
footer class="footer"><div class="container container-fluid">
<div class="footer__bottom text--center">
<div class="footer__copyright">
Copyright © 2024 My Project, Inc. Built with Docusaurus.</div></div></div></footer></div>
Note the Copyright © 2024 My Project, Inc. Built with Docusaurus.
That copy is not defined anywhere in my site files. That is the default footer copy.
So, for some reason, Docusaurus is reverting to default copy, and some information in my docusaurus.config.js
is being ignored.
I have not found a resource that documents this issue as explicitly as: "My index.html
file is ignoring or not receiving info from my docusaurus.config.js
file."
I had this problem on a site I was working on and assumed the site was corrupt. So, I started a new one and now I have the same problem.
I don't prefer the idea of deleting the index.js
file, which I have seen suggested. That file is useful and hasn't been problematic before.
I tried:
- Updating Node versions
- Restarting the development server
- Starting fresh Docusaurus site
- Rebuilding the site
- Comparing old sites that have works (no discernible difference)