docs: clarify where to add custom CSS files#12032
Conversation
|
Hi @atharv96k! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Dharya-dev
left a comment
There was a problem hiding this comment.
Thanks for adding this clarification! It's definitely helpful for beginners to visualize where the file should go.
However, since this is an .mdx file, the plain text file tree you added needs to be wrapped inside a code block. Otherwise, MDX will render it as a single line of text and ignore the spaces and newlines.
You should wrap it like this:
\\ ext
my-website/
├── src/
│ └── css/
│ └── custom.css ← add your custom styles here
├── docusaurus.config.js
└── package.json
\\
Could you wrap the structure block in those backticks? Thanks!
|
@Dharya-dev Done! Wrapped the file tree in a code block. Thanks for the review! 🙂 |
Pre-flight checklist
Motivation
This change addresses #12031.
Beginner users often struggle to find where to place custom CSS files when customizing a Docusaurus site. Added a project folder structure example under the Global Styles section to make this clearer.
Test Plan
This is a documentation-only change. No code was modified.
Verified that the added folder structure renders correctly in the MDX file.
Test links
Deploy preview: https://deploy-preview-12032--docusaurus-2.netlify.app/docs/styling-layout
Related issues/PRs
Closes #12031
Screenshot