-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Sidebar title and doc title don't change after updating it in file. #813
Comments
|
Maybe it has something to do with the fact that I use subdirectories for my doc files? I also don't addy any id's to my doc files. I tried adding Id's but then docusaurus could not find the file by id. |
That's weird. My website use id on docs & warriorjs use subdirectories for all their docs with id too. You can check how warriorjs use subdirectories https://github.com/olistic/warriorjs/blob/master/website/sidebars.json If your docs is in Can you try adding id and see if it works ? |
Adding an id doesn't work. I seem to get this error quite often now while change title attritube or others:
But it doesn't crash my development server and live reloading of text on pages still works. |
Can you try to remove i18n folder -> npm run write-translations -> change some docs title -> npm run write-translations again and see if the title is changed in i18n/en.json Do not run dev server Since the workaround is related with deleting i18n I think it got to do with write translation |
Deleting your current |
Just tried it, it does change the |
I don't see any 1.3.1 release yet? |
🤣 I got ahead of myself. I thought it went out last night. Should be today. |
so the workaround step has been reduced to
Does Everything updates like normal ? |
Yes, it is not necessary to remove the BTW, maybe I should add that I first started with v1.2.0, then upgraded to v1.2.1 and then upgraded to v1.3.0. |
So if you only start dev server without running If yes, I think the problem is that dev server doesnt run write-translations when it should have https://github.com/facebook/Docusaurus/blob/e9eef3976025c9f428baec725e6daf929384b5fb/lib/server/server.js#L9 |
Yes, changing title and only starting dev server won't change it. When running |
Or this function goes wrong? And thats why I sometimes get this error?
|
Seems so to me. This works for me but I think it didn't work for yours Can you try above step & let me know abt the logs that appears ? |
In the docusaurus project or my own? |
@KoenCa yours Just for context how many markdown files do you have 😂 |
I just get logs like this:
The error log mostly happens when the server is already running. I have 78 markdown files at the moment and more will come. I also have 48 PNG images in my docs assets. |
Tbh, it's a little bit hard for us to fix without reproducible demo How about this. We'll release 1.3.1 soon. Let's see if that solve your problem later. Otherwise I might need you to give me a reproducible repo, maybe you can omit the docs content if it's confidential. Sorry for the trouble |
No problem, I understand. |
@KoenCa "start": "docusaurus-write-translations && docusaurus-start", Let me know if it works 😊 |
Yes, it works 👍 |
Is this a bug report?
Yes
Have you read the Contributing Guidelines on issues?
Yes
Environment
Docusaurus v1.3.0
NPM v6.1.0
Node v8.11.3
Macbook Pro with MacOs High Sierra
Steps to Reproduce
Tried to reproduce it in a fresh Docusaurus project, but can't reproduce it there. What I can say about my own project is that it already has a lot of markdown files. I also have all of them in subdirectories inside the
docs
folder, so I also refer to them via their relative path in mysidebars.json
file.sidebars.json
When building the project it also updates fine.
Expected Behavior
I expected the title to change to the new one in the sidebar and in the h1 header. This does not happen.
Actual Behavior
Title in sidebar doesn't change and the h1 header doesn't change, which used to work before, but sudddenly stopped working.
Sometimes I see this error in the console:
But most of the time it doesn't show up.
I also asked this in the Discord channel and got a workaround:
npm run write-translations
Reproducible Demo
Could not reproduce it in a fresh docusaurus project and can't share my own project here. If more details are needed I can provide them.
The text was updated successfully, but these errors were encountered: