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: fix navbar style #6217

Merged
merged 3 commits into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const versions = require('./versions.json');


const siteConfig = {
baseUrl: '/' /* base url for your project */,
baseUrl: '/taro/' /* base url for your project */,
favicon: './img/favicon.ico',
tagline: '多端统一开发框架,支持用 React 的开发方式编写一次代码,生成能运行在微信/百度/字节跳动/支付宝/QQ小程序、快应用、H5、React Native 等平台的应用。',
title: 'Taro 文档' /* title for your website */,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"start": "docusaurus start",
"build": "docusaurus build",
"build": "docusaurus build --out-dir build/taro",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy"
},
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import {Redirect} from '@docusaurus/router';

function Home() {
return <Redirect to="/docs/README" />;
return <Redirect to="/taro/docs/README" />;
}

export default Home
2 changes: 1 addition & 1 deletion src/theme/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function NavLink({ activeBasePath, activeRegxp, to, href, label, position, ...pr

function NavItem({ items, position, ...props }) {
if (!items) {
return <NavLink className="navbar__item navbar__link" {...props} />;
return <NavLink {...props} className={classnames(['navbar__item', 'navbar__link', props.className])} />;
}

return (
Expand Down