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

Update blog.mdx #9811

Closed
wants to merge 1 commit into from
Closed

Update blog.mdx #9811

wants to merge 1 commit into from

Conversation

jcode116
Copy link

@jcode116 jcode116 commented Jan 31, 2024

The current documentation says to add a routebasepath and set docs to false.

This ends up with an error when starting the application.

When removing the sidebar doc item it works as expected.

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Test Plan

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/

Related issues/PRs

The current documentation says to add a routebasepath and set docs to false.

This ends up with an error when starting the application.

When removing the sidebar doc item it works as expected.
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jan 31, 2024
Copy link

netlify bot commented Jan 31, 2024

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 6821745
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/65ba06d447075300085e622c
😎 Deploy Preview https://deploy-preview-9811--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 57 🟢 98 🟢 100 🟢 100 🟠 89 Report
/docs/installation 🟠 89 🟢 98 🟢 100 🟢 100 🟠 89 Report
/docs/category/getting-started 🟠 76 🟢 100 🟢 100 🟢 90 🟠 89 Report
/blog 🟠 71 🟢 100 🟢 100 🟢 90 🟠 89 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 63 🟢 97 🟢 100 🟢 100 🟠 89 Report
/blog/tags/release 🟠 71 🟢 100 🟢 100 🟠 80 🟠 89 Report
/blog/tags 🟠 72 🟢 100 🟢 100 🟢 90 🟠 89 Report

@slorber
Copy link
Collaborator

slorber commented Feb 1, 2024

Similar to #9810 I can't merge this PR as is.

I need you to explain properly the problem in the first place and why this extra doc is useful. More importantly the user need to understand the reason behind these extra instructions.

@slorber slorber closed this Feb 1, 2024
@jcode116 jcode116 deleted the patch-2 branch February 2, 2024 22:29
@jcode116
Copy link
Author

jcode116 commented Feb 5, 2024

When installing a brand new installation and attempt to have blog/doc mode only, the instructions tell you to navigate to docusaurus.config.js and set the blog or docs to false depending on what the user is wanting to acheive.
https://docusaurus.io/docs/docs-introduction
https://docusaurus.io/docs/blog#blog-only-mode

The application then fails and the user is stuck with the following error:
Screenshot 2024-02-05 at 10 45 35 AM

To remove the docusaurus-plugin-content-docs error the user will need to navigate to the themeConfig within the docusaurus.config.js and remove:

 {
            type: 'docSidebar',
            sidebarId: 'tutorialSidebar',
            position: 'left',
            label: 'Tutorial',
          }

The application will work as expected. This removal should be pointed out in the documentation as it does not work as expected.

@slorber
Copy link
Collaborator

slorber commented Feb 5, 2024

The error message you screenshotted here is incomplete, please don't truncate error messages and screenshot/copy/paste them fully, they contain meaningful information (includig the stacktrace).

IMHO this is a DX problem, not a docs problem. The error message is likely not clear enough for the user to troubleshoot it. If the error message told you which element to remove from themeConfig.navbar, you wouldn't even have to read those extra docs paragraph you want to add there.

@OzakIOne
Copy link
Collaborator

OzakIOne commented Feb 8, 2024

I've tried on my end by creating a repro locally, I've set in docusaurus.config.js blog to false
Indeed the site now crashes and give the following error

image

And if we click on the button we have this similar error

image
image

We can add a second warning in the documentation below the one mentioning about ./src/pages/index.js page to tell the user to delete in docusaurus.config.js the item in the navbar causing the error

{
    type: 'docSidebar',
    sidebarId: 'tutorialSidebar',
    position: 'left',
    label: 'Tutorial',
},

@slorber
Copy link
Collaborator

slorber commented Feb 13, 2024

@imjustablacknerd we improved a bit the situation in #9839

@jcode116
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants