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

docs: add swizzle delete tip #10759

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Conversation

effozen
Copy link
Contributor

@effozen effozen commented Dec 12, 2024

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

While customizing the theme, I noticed there is very limited guidance on how to remove swizzled components. The only mention I found was in the "Which component should I swizzle?" section, which states: "Don't forget to unswizzle the rest by deleting the files after you've found the correct one, so you don't maintain too many components."

As a junior developer, I found this explanation insufficient for understanding the exact steps needed to properly remove swizzled elements. Therefore, I decided to add a more explicit tip. I hope this addition will help other developers—especially those who are new to Docusaurus or not yet confident in their development skills—use the tool more effectively.

Changes

:::tip Removing Unneeded Swizzled Components

If you decide that a previously swizzled component is no longer necessary, you can simply remove its file(s) from the `src/theme` directory. After removing the component, make sure to restart your development server to ensure the changes are properly reflected.

:::

Add this tip on Overview section.

Below is tip image.

스크린샷 2024-12-13 오전 1 51 27

Test Plan

Test links

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

Related issues/PRs

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Dec 12, 2024
Copy link

netlify bot commented Dec 12, 2024

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 6b0275e
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/675b141dda5da70008be30bb
😎 Deploy Preview https://deploy-preview-10759--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 Report
/ 🟢 92 🟢 98 🟢 96 🟢 100 Report
/docs/installation 🟠 55 🟢 97 🟢 100 🟢 100 Report
/docs/category/getting-started 🟠 74 🟢 100 🟢 100 🟠 86 Report
/blog 🟠 63 🟢 96 🟢 100 🟠 86 Report
/blog/preparing-your-site-for-docusaurus-v3 🔴 48 🟢 92 🟢 100 🟢 100 Report
/blog/tags/release 🟠 65 🟢 96 🟢 100 🟠 86 Report
/blog/tags 🟠 74 🟢 100 🟢 100 🟠 86 Report

Copy link
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 9cefca4 into facebook:main Dec 13, 2024
13 checks passed
@slorber slorber added the pr: internal This PR does not touch production code, or is not meaningful enough to be in the changelog. label Dec 13, 2024
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: internal This PR does not touch production code, or is not meaningful enough to be in the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants