-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: upgrade to Docusaurus 2 beta (#19)
- Upgrade to Docusaurus v2 beta - Use `classic` Docusaurus preset - List *features* on landing page - Add missing content to Part 1 to fix broken links - Use Yarn v1 as recommended by Docusaurus v2 - Fail if no build output is found Related to #17.
- Loading branch information
Showing
40 changed files
with
9,562 additions
and
10,144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
website/node_modules/* | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
node_modules | ||
lib/core/metadata.js | ||
lib/core/MetadataBlog.js | ||
website/translated_docs | ||
website/build/ | ||
website/yarn.lock | ||
website/i18n/* | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
const shadesOfPurpleTheme = require('prism-react-renderer/themes/shadesOfPurple'); | ||
|
||
const organizationName = 'this-is-learning'; | ||
const projectName = 'rxjs-fundamentals-course'; | ||
const title = 'RxJS Fundamentals'; | ||
|
||
// With JSDoc @type annotations, IDEs can provide config autocompletion | ||
/** @type {import('@docusaurus/types').DocusaurusConfig} */ | ||
(module.exports = { | ||
baseUrl: `/${projectName}/`, | ||
favicon: 'img/favicon.ico', | ||
onBrokenLinks: 'throw', | ||
onBrokenMarkdownLinks: 'warn', | ||
presets: [ | ||
[ | ||
'@docusaurus/preset-classic', | ||
/** @type {import('@docusaurus/preset-classic').Options} */ | ||
({ | ||
blog: { | ||
editUrl: `https://github.com/${organizationName}/${projectName}/edit/main/blog`, | ||
showReadingTime: true, | ||
}, | ||
docs: { | ||
editUrl: `https://github.com/${organizationName}/${projectName}/edit/main`, | ||
sidebarPath: require.resolve('./sidebars.js'), | ||
}, | ||
theme: { | ||
customCss: require.resolve('./src/css/custom.css'), | ||
}, | ||
}), | ||
], | ||
], | ||
projectName, | ||
tagline: 'An Open Learning course by This is Learning', | ||
themeConfig: | ||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */ | ||
({ | ||
footer: { | ||
copyright: `© ${new Date().getFullYear()} This is Learning. Licensed under CC BY-SA 4.0.`, | ||
links: [ | ||
{ | ||
title: 'Open Learning', | ||
items: [ | ||
{ | ||
label: 'RxJS Fundamentals', | ||
to: '/docs/part-1', | ||
}, | ||
{ | ||
label: 'This is Learning on DEV Community', | ||
href: 'https://dev.to/this-is-learning', | ||
}, | ||
{ | ||
label: 'This is Angular on DEV Community', | ||
href: 'https://dev.to/this-is-angular', | ||
}, | ||
], | ||
}, | ||
{ | ||
title: 'Community', | ||
items: [ | ||
{ | ||
label: 'This is Learning Community on Discord', | ||
href: 'https://discord.gg/ygKzbrBtVn', | ||
}, | ||
{ | ||
label: 'This is Learning on GitHub', | ||
href: 'https://github.com/this-is-learning', | ||
}, | ||
{ | ||
label: 'This is Angular on GitHub', | ||
href: 'https://github.com/this-is-learning', | ||
}, | ||
], | ||
}, | ||
{ | ||
title: 'Social', | ||
items: [ | ||
{ | ||
label: 'Star on GitHub', | ||
href: `https://github.com/${organizationName}/${projectName}`, | ||
}, | ||
{ | ||
label: 'This is Learning on Twitter', | ||
href: 'https://twitter.com/Thisis_Learning', | ||
}, | ||
{ | ||
label: 'This is Angular on Twitter', | ||
href: 'https://twitter.com/Thisis_Angular', | ||
}, | ||
], | ||
}, | ||
], | ||
style: 'dark', | ||
}, | ||
navbar: { | ||
items: [ | ||
{ | ||
docId: 'part-1', | ||
label: 'Course', | ||
position: 'left', | ||
type: 'doc', | ||
}, | ||
{ | ||
href: `https://github.com/${organizationName}/${projectName}`, | ||
label: 'GitHub', | ||
position: 'right', | ||
}, | ||
], | ||
logo: { | ||
alt: title, | ||
src: 'img/logo.png', | ||
}, | ||
title, | ||
}, | ||
prism: { | ||
darkTheme: shadesOfPurpleTheme, | ||
defaultLanguage: 'typescript', | ||
theme: shadesOfPurpleTheme, | ||
}, | ||
}), | ||
title, | ||
url: `https://${organizationName}.github.io`, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"name": "rxjs-fundamentals-course", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"docusaurus": "docusaurus", | ||
"start": "docusaurus start", | ||
"build": "docusaurus build", | ||
"swizzle": "docusaurus swizzle", | ||
"deploy": "docusaurus deploy", | ||
"clear": "docusaurus clear", | ||
"serve": "docusaurus serve", | ||
"write-translations": "docusaurus write-translations", | ||
"write-heading-ids": "docusaurus write-heading-ids" | ||
}, | ||
"dependencies": { | ||
"@docusaurus/core": "2.0.0-beta.6", | ||
"@docusaurus/preset-classic": "2.0.0-beta.6", | ||
"@mdx-js/react": "^1.6.21", | ||
"@svgr/webpack": "^5.5.0", | ||
"clsx": "^1.1.1", | ||
"file-loader": "^6.2.0", | ||
"prism-react-renderer": "^1.2.1", | ||
"react": "^17.0.1", | ||
"react-dom": "^17.0.1", | ||
"url-loader": "^4.1.1" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.5%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* Creating a sidebar enables you to: | ||
- create an ordered group of docs | ||
- render a sidebar for each doc of that group | ||
- provide next/previous navigation | ||
The sidebars can be generated from the filesystem, or explicitly defined here. | ||
Create as many sidebars as you want. | ||
*/ | ||
|
||
module.exports = { | ||
// By default, Docusaurus generates a sidebar from the docs folder structure | ||
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], | ||
|
||
// But you can create a sidebar manually | ||
/* | ||
tutorialSidebar: [ | ||
{ | ||
type: 'category', | ||
label: 'Tutorial', | ||
items: ['hello'], | ||
}, | ||
], | ||
*/ | ||
}; |
Oops, something went wrong.