Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
ShMcK merged 2 commits intomasterfromdocsaurus-2
May 15, 2020
Merged
Show file tree
Hide file tree
Changes fromall 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
20 changes: 20 additions & 0 deletionsdocs/.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff 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
View file
Open in desktop
Original file line numberDiff line numberDiff 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
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
#Tutorial Docs
---
id:build-tutorial
title:Building a Tutorial
sidebar_label:Building a Tutorial
---

A tutorial is made up of two parts:

Expand DownExpand Up@@ -133,7 +137,7 @@ That said, anything can be tested. I’ll include some examples below of tests I
#####Equality

Testing equality
Eg.https://github.com/ShMcK/coderoad-tutorial-js-bug-hunter/commit/75b32ebee89853deb3b4dad6aa8654f89bc72cff
Eg.<https://github.com/ShMcK/coderoad-tutorial-js-bug-hunter/commit/75b32ebee89853deb3b4dad6aa8654f89bc72cff>

#####Spy/Listener

Expand DownExpand Up@@ -171,7 +175,7 @@ Eg. [setup: useText hook refactor · ShMcK/coderoad-tutorial-tweeter@71deafa ·

When editing markdown, simply edit the markdown and re-run the parser.

When editing code, you'll need to rebase. You can use VSCode as your default editor for Git:https://blog.soltysiak.it/en/2017/01/set-visual-studio-code-as-default-git-editor-and-diff-tool/.
When editing code, you'll need to rebase. You can use VSCode as your default editor for Git:<https://blog.soltysiak.it/en/2017/01/set-visual-studio-code-as-default-git-editor-and-diff-tool/.>

Run rebase from a commit or just "root".

Expand Down
7 changes: 7 additions & 0 deletionsdocs/docs/overview.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
---
id:overview
title:Overview
sidebar_label:Overview
---

Overview
91 changes: 91 additions & 0 deletionsdocs/docusaurus.config.js
View file
Open in desktop
Original file line numberDiff line numberDiff 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
View file
Open in desktop
Original file line numberDiff line numberDiff 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
View file
Open in desktop
Original file line numberDiff line numberDiff 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
View file
Open in desktop
Original file line numberDiff line numberDiff 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
View file
Open in desktop
Original file line numberDiff line numberDiff 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
View file
Open in desktop
Original file line numberDiff line numberDiff 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
View file
Open in desktop
Binary file not shown.
1 change: 1 addition & 0 deletionsdocs/static/img/logo.svg
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

[8]ページ先頭

©2009-2025 Movatter.jp