Skip to content

docs: clarify where to add custom CSS files#12032

Merged
slorber merged 2 commits into
facebook:mainfrom
atharv96k:fix/clarify-custom-css-location
May 21, 2026
Merged

docs: clarify where to add custom CSS files#12032
slorber merged 2 commits into
facebook:mainfrom
atharv96k:fix/clarify-custom-css-location

Conversation

@atharv96k
Copy link
Copy Markdown
Contributor

@atharv96k atharv96k commented May 16, 2026

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

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

image

@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented May 16, 2026

Hi @atharv96k!

Thank you for your pull request and welcome to our community.

Action Required

In 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.

Process

In 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 CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@netlify
Copy link
Copy Markdown

netlify Bot commented May 16, 2026

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit b2da84a
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/6a0d2ee00e783a0008c04adb
😎 Deploy Preview https://deploy-preview-12032--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 project configuration.

@meta-cla meta-cla Bot added the CLA Signed Signed Facebook CLA label May 16, 2026
@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented May 16, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

Copy link
Copy Markdown

@Dharya-dev Dharya-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

@atharv96k
Copy link
Copy Markdown
Contributor Author

@Dharya-dev Done! Wrapped the file tree in a code block. Thanks for the review! 🙂

Copy link
Copy Markdown
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@slorber slorber merged commit f63ef94 into facebook:main May 21, 2026
11 of 12 checks passed
@slorber slorber added the pr: ignore This PR is not meaningful enough to appear in the changelog. label May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA pr: ignore This PR is not meaningful enough to appear in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify where custom CSS files should be added for theme customization

3 participants