-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
WiP: Integrate docusaurus 2 #247
Changes from 9 commits
160be2b
905a26d
e5b0001
6aecd8d
ff52570
4ab00c9
a2790b8
ddf04c5
4c691a5
4d737e7
6edc792
b4a1847
02e0101
ac8dfeb
d14c4c3
e467852
8116b71
20f5e72
68299ce
6fa587e
3909c17
bf944fd
2ff0153
85f3329
574edd4
035360f
56bba80
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# dependencies | ||
node_modules/ | ||
|
||
# production | ||
/build | ||
|
||
# generated files | ||
.docusaurus/ | ||
.cache-loader | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
*.log |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
// site configuration options. | ||
|
||
module.exports = { | ||
presets: [ | ||
[ | ||
'@docusaurus/preset-classic', | ||
{ | ||
docs: { | ||
path: '../docs', | ||
sidebarPath: require.resolve('./sidebars.json'), | ||
routeBasePath: '' | ||
}, | ||
theme: { | ||
customCss: [ | ||
require.resolve('./src/css/custom.css'), | ||
require.resolve('./src/css/monokai.css') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the cause of build error >.< It does not accept array. I spent 1 hr + to debug :( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It doesn't work perfectly. Its probably some weird and unwanted behavior of webpack or some caching. At least in my side the TOC couldnt appear, and refresh sometimes cause blank page export default [
require("infima/dist/css/default/default.css"),
require(["/mnt/c/Users/endij/Desktop/Linux/redux-starter-kit/my-website/src/css/custom.css","/mnt/c/Users/endij/Desktop/Linux/redux-starter-kit/my-website/src/css/monokai.css"]),
];
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lol forgive me, updated There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Anyway i fixed it :( its very easy to generate the prism theme.js Thanks for the hard work |
||
] | ||
} | ||
} | ||
] | ||
], | ||
projectName: 'redux-starter-kit', | ||
baseUrl: '/', | ||
favicon: 'img/favicon/favicon.ico', | ||
tagline: 'A simple batteries-included toolset to make using Redux easier', | ||
title: 'Redux Starter Kit', | ||
url: 'https://redux-starter-kit.js.org', | ||
themeConfig: { | ||
footer: { | ||
style: 'dark', | ||
logo: { | ||
alt: 'Redux Logo', | ||
src: 'img/redux_white.svg' | ||
}, | ||
links: [ | ||
{ | ||
title: 'Docs', | ||
items: [ | ||
{ | ||
label: 'Quick Start', | ||
to: 'introduction/quick-start' | ||
}, | ||
{ | ||
label: 'API Reference', | ||
to: 'api/configureStore' | ||
} | ||
] | ||
}, | ||
{ | ||
title: 'Community', | ||
items: [ | ||
{ | ||
label: 'Stack Overflow', | ||
href: 'http://stackoverflow.com/questions/tagged/redux' | ||
}, | ||
{ | ||
label: 'Discord', | ||
href: 'https://discord.gg/0ZcbPKXt5bZ6au5t' | ||
} | ||
] | ||
}, | ||
{ | ||
title: 'Social', | ||
items: [ | ||
{ | ||
label: 'GitHub', | ||
href: 'https://www.github.com/reduxjs/redux/' | ||
} | ||
] | ||
} | ||
], | ||
copyright: `Copyright (c) 2015-present Dan Abramov and the Redux documentation authors.` | ||
}, | ||
image: 'img/redux-logo-landscape.png', | ||
twitterImage: 'img/redux-logo-twitter.png', | ||
navbar: { | ||
title: 'Redux Starter Kit', | ||
logo: { | ||
alt: 'Redux Logo', | ||
src: 'img/redux.svg' | ||
}, | ||
links: [ | ||
{ | ||
to: 'introduction/quick-start', | ||
label: 'Quick Start', | ||
position: 'right' | ||
}, | ||
{ to: 'api/configureStore', label: 'API', position: 'right' }, | ||
{ | ||
href: 'https://www.github.com/reduxjs/redux-starter-kit', | ||
label: 'GitHub', | ||
position: 'right' | ||
} | ||
] | ||
}, | ||
algolia: { | ||
apiKey: '82d838443b672336bf63cab4772d9eb4', | ||
indexName: 'redux-starter-kit', | ||
algoliaOptions: {} | ||
}, | ||
googleAnalytics: { | ||
trackingID: 'UA-130598673-3' | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[build] | ||
base = "website" | ||
publish = "website/build" | ||
command = "yarn build" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this not a good idea to do this since this means this css will be bundled into main bundle, not when its needed. It will also conflict with the default inline style theme by docusaurus.
The css need to be converted like this https://github.com/FormidableLabs/prism-react-renderer/blob/master/src/themes/palenight.js
and set through “themeConfig.prism.theme”
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am aware of the converted method although i feel its not completely necessary for the extra work because
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I guess its OK because its roughly ~2kb. And the only page that doesn't need it is custom pages.