- Notifications
You must be signed in to change notification settings - Fork39
Docusaurus 2#334
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Docusaurus 2#334
Changes fromall commits
Commits
Show all changes
2 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
20 changes: 20 additions & 0 deletionsdocs/.gitignore
This file contains hidden or 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,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* |
33 changes: 33 additions & 0 deletionsdocs/README.md
This file contains hidden or 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,33 @@ | ||
#Website | ||
This website is built using[Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator. | ||
###Installation | ||
``` | ||
$ yarn | ||
``` | ||
###Local Development | ||
``` | ||
$ yarn start | ||
``` | ||
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server. | ||
###Build | ||
``` | ||
$ yarn build | ||
``` | ||
This command generates static content into the`build` directory and can be served using any static contents hosting service. | ||
###Deployment | ||
``` | ||
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy | ||
``` | ||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the`gh-pages` branch. |
10 changes: 7 additions & 3 deletionsdocs/tutorials.md → docs/docs/build-tutorial.md
This file contains hidden or 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
7 changes: 7 additions & 0 deletionsdocs/docs/overview.md
This file contains hidden or 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,7 @@ | ||
--- | ||
id:overview | ||
title:Overview | ||
sidebar_label:Overview | ||
--- | ||
Overview |
91 changes: 91 additions & 0 deletionsdocs/docusaurus.config.js
This file contains hidden or 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,91 @@ | ||
module.exports={ | ||
title:'CodeRoad', | ||
tagline:'A VSCode Extension for Interactive Coding Tutorials', | ||
url:'https://coderoad.github.io', | ||
baseUrl:'/', | ||
favicon:'img/favicon.ico', | ||
organizationName:'coderoad', | ||
projectName:'coderoad-vscode', | ||
themeConfig:{ | ||
navbar:{ | ||
title:'CodeRoad', | ||
logo:{ | ||
alt:'My Site Logo', | ||
src:'img/logo.svg', | ||
}, | ||
links:[ | ||
{ | ||
to:'docs/overview', | ||
activeBasePath:'docs', | ||
label:'Docs', | ||
position:'left', | ||
}, | ||
{ | ||
href:'https://github.com/coderoad/coderoad-vscode', | ||
label:'GitHub', | ||
position:'right', | ||
}, | ||
], | ||
}, | ||
footer:{ | ||
style:'dark', | ||
links:[ | ||
// { | ||
// title: 'Docs', | ||
// items: [ | ||
// { | ||
// label: 'Style Guide', | ||
// to: 'docs/doc1', | ||
// }, | ||
// { | ||
// label: 'Second Doc', | ||
// to: 'docs/doc2', | ||
// }, | ||
// ], | ||
// }, | ||
// { | ||
// title: 'Community', | ||
// items: [ | ||
// { | ||
// label: 'Stack Overflow', | ||
// href: 'https://stackoverflow.com/questions/tagged/docusaurus', | ||
// }, | ||
// { | ||
// label: 'Discord', | ||
// href: 'https://discordapp.com/invite/docusaurus', | ||
// }, | ||
// { | ||
// label: 'Twitter', | ||
// href: 'https://twitter.com/docusaurus', | ||
// }, | ||
// ], | ||
// }, | ||
// { | ||
// title: 'More', | ||
// items: [ | ||
// { | ||
// label: 'GitHub', | ||
// href: 'https://github.com/coderoad/coderoad-vscode', | ||
// }, | ||
// ], | ||
// }, | ||
], | ||
copyright:`Copyright ©${newDate().getFullYear()} CodeRoad. Built with Docusaurus.`, | ||
}, | ||
}, | ||
presets:[ | ||
[ | ||
'@docusaurus/preset-classic', | ||
{ | ||
docs:{ | ||
sidebarPath:require.resolve('./sidebars.js'), | ||
// Please change this to your repo. | ||
editUrl:'https://github.com/coderoad/coderoad-vscode/edit/master/docs/', | ||
}, | ||
theme:{ | ||
customCss:require.resolve('./src/css/custom.css'), | ||
}, | ||
}, | ||
], | ||
], | ||
} |
30 changes: 30 additions & 0 deletionsdocs/package.json
This file contains hidden or 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,30 @@ | ||
{ | ||
"name":"docs", | ||
"version":"0.0.0", | ||
"private":true, | ||
"scripts": { | ||
"start":"docusaurus start", | ||
"build":"docusaurus build", | ||
"swizzle":"docusaurus swizzle", | ||
"deploy":"docusaurus deploy" | ||
}, | ||
"dependencies": { | ||
"@docusaurus/core":"^2.0.0-alpha.54", | ||
"@docusaurus/preset-classic":"^2.0.0-alpha.54", | ||
"classnames":"^2.2.6", | ||
"react":"^16.8.4", | ||
"react-dom":"^16.8.4" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
} | ||
} |
6 changes: 6 additions & 0 deletionsdocs/sidebars.js
This file contains hidden or 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,6 @@ | ||
module.exports={ | ||
someSidebar:{ | ||
Intro:['overview','build-tutorial'], | ||
// Features: ['mdx'], | ||
}, | ||
} |
25 changes: 25 additions & 0 deletionsdocs/src/css/custom.css
This file contains hidden or 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,25 @@ | ||
/* stylelint-disable docusaurus/copyright-header */ | ||
/** | ||
* Any CSS included here will be global. The classic template | ||
* bundles Infima by default. Infima is a CSS framework designed to | ||
* work well for content-centric websites. | ||
*/ | ||
/* You can override the default Infima variables here. */ | ||
:root { | ||
--ifm-color-primary:#25c2a0; | ||
--ifm-color-primary-dark:rgb(33,175,144); | ||
--ifm-color-primary-darker:rgb(31,165,136); | ||
--ifm-color-primary-darkest:rgb(26,136,112); | ||
--ifm-color-primary-light:rgb(70,203,174); | ||
--ifm-color-primary-lighter:rgb(102,212,189); | ||
--ifm-color-primary-lightest:rgb(146,224,208); | ||
--ifm-code-font-size:95%; | ||
} | ||
.docusaurus-highlight-code-line { | ||
background-color:rgb(72,77,91); | ||
display: block; | ||
margin:0calc(-1*var(--ifm-pre-padding)); | ||
padding:0var(--ifm-pre-padding); | ||
} |
78 changes: 78 additions & 0 deletionsdocs/src/pages/index.js
This file contains hidden or 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,78 @@ | ||
importReactfrom'react' | ||
importclassnamesfrom'classnames' | ||
importLayoutfrom'@theme/Layout' | ||
importLinkfrom'@docusaurus/Link' | ||
importuseDocusaurusContextfrom'@docusaurus/useDocusaurusContext' | ||
importuseBaseUrlfrom'@docusaurus/useBaseUrl' | ||
importstylesfrom'./styles.module.css' | ||
constfeatures=[ | ||
{ | ||
title:<>Your Editor</>, | ||
imageUrl:'img/undraw_docusaurus_mountain.svg', | ||
description:<>Playing tutorials in a real-world setting: within your coding editor.</>, | ||
}, | ||
{ | ||
title:<>Your Code</>, | ||
imageUrl:'img/undraw_docusaurus_tree.svg', | ||
description:<>You own your progress. Save with Git to build your timeline. Deploy to build your portfolio.</>, | ||
}, | ||
{ | ||
title:<>Open</>, | ||
imageUrl:'img/undraw_docusaurus_react.svg', | ||
description:<>CodeRoad is open-source. Build your own tutorials. Contribute to the tooling.</>, | ||
}, | ||
] | ||
functionFeature({ imageUrl, title, description}){ | ||
constimgUrl=useBaseUrl(imageUrl) | ||
return( | ||
<divclassName={classnames('col col--4',styles.feature)}> | ||
{imgUrl&&( | ||
<divclassName="text--center"> | ||
<imgclassName={styles.featureImage}src={imgUrl}alt={title}/> | ||
</div> | ||
)} | ||
<h3>{title}</h3> | ||
<p>{description}</p> | ||
</div> | ||
) | ||
} | ||
functionHome(){ | ||
constcontext=useDocusaurusContext() | ||
const{ siteConfig={}}=context | ||
return( | ||
<Layouttitle={`Hello from${siteConfig.title}`}description="Description will go into a meta tag in <head />"> | ||
<headerclassName={classnames('hero hero--primary',styles.heroBanner)}> | ||
<divclassName="container"> | ||
<h1className="hero__title">{siteConfig.title}</h1> | ||
<pclassName="hero__subtitle">{siteConfig.tagline}</p> | ||
<divclassName={styles.buttons}> | ||
<Link | ||
className={classnames('button button--outline button--secondary button--lg',styles.getStarted)} | ||
to={useBaseUrl('docs/overview')} | ||
> | ||
Get Started | ||
</Link> | ||
</div> | ||
</div> | ||
</header> | ||
<main> | ||
{features&&features.length&&( | ||
<sectionclassName={styles.features}> | ||
<divclassName="container"> | ||
<divclassName="row"> | ||
{features.map((props,idx)=>( | ||
<Featurekey={idx}{...props}/> | ||
))} | ||
</div> | ||
</div> | ||
</section> | ||
)} | ||
</main> | ||
</Layout> | ||
) | ||
} | ||
exportdefaultHome |
36 changes: 36 additions & 0 deletionsdocs/src/pages/styles.module.css
This file contains hidden or 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,36 @@ | ||
/* stylelint-disable docusaurus/copyright-header */ | ||
/** | ||
* CSS files with the .module.css suffix will be treated as CSS modules | ||
* and scoped locally. | ||
*/ | ||
.heroBanner { | ||
padding:4rem0; | ||
text-align: center; | ||
position: relative; | ||
overflow: hidden; | ||
} | ||
@media screenand (max-width:966px) { | ||
.heroBanner { | ||
padding:2rem; | ||
} | ||
} | ||
.buttons { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
.features { | ||
display: flex; | ||
align-items: center; | ||
padding:2rem0; | ||
width:100%; | ||
} | ||
.featureImage { | ||
height:200px; | ||
width:200px; | ||
} |
Binary file addeddocs/static/img/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletionsdocs/static/img/logo.svg
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.