如何向导航栏添加按钮?
我刚刚开始使用 Docusaurus,我想在导航栏中添加一个“注册”按钮(是的,我知道它仅用于文档)。我尝试过swizzle
ing 组件,但没有成功。我认为这与此 react 代码
有关:
<Link
className="button button--secondary button--lg"
to="/docs/intro">
Sign Up
</Link>
I've just started using Docusaurus and I want to add a Sign Up button to the navbar (yes, I know that it's for documentation only). I have tried swizzle
ing the componenets but I've had no luck. I think it has something to do with this react code
:
<Link
className="button button--secondary button--lg"
to="/docs/intro">
Sign Up
</Link>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Docusaurus 支持通过扩展配置文件中的默认主题来向导航栏添加按钮。
要添加简单的注册按钮,您可以在站点的根目录中创建一个
docusaurus.config.js
文件。Docusaurus supports adding buttons to the navbar by extending the default theme in a configuration file.
To add a simple signup button you can create a
docusaurus.config.js
file in the root directory of your site.