To modify the light/dark mode icon in Docusaurus, follow these steps:
Locate the icon file: The existing icon file is located in the "static/img" folder of your Docusaurus project. Look for the following files: "light-mode-icon.svg" and "dark-mode-icon.svg".
Replace the icon file: You can replace the icon file with any other icon of your preference. Make sure to name it the same as the original icon file so that it can be recognized by Docusaurus.
Update the configuration file: The configuration file for Docusaurus is called "docusaurus.config.js". Open this file and look for the following code:
themeConfig: {
colorMode: {
defaultMode: 'light',
switchConfig: {
darkIcon: '๐',
darkIconStyle: {},
lightIcon: 'โ๏ธ',
lightIconStyle: {},
},
},
},
In this code, you can see the two icon files being referenced โ "darkIcon" and "lightIcon". Replace the file names with the names of your new icon files.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-06-28 04:13:42 +0000
Seen: 12 times
Last updated: Jun 28 '23
What is the procedure for using Pandas fillna() method with the column's mode?
How can I avoid undesirable stretching when using Unity in orthographic mode?
What is the method for accessing the info mode in Emacs to open a *.info file?
What are the steps to implement dark mode and merge two distinct web pages into a single one?
Can Selenium be executed on a cloud platform with headless mode enabled?
How can a newline be added in vim without entering insert mode?
How can we implement a dark mode using jQuery on an HTML page?
Is it true that the SPM UIColor resources are incompatible with Dark mode?