-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
8,209 additions
and
95 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docusaurus/* |
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,13 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Tutorial | ||
|
||
Lumos is a full-featured JavaScript(TypeScript) library for building Nervos CKB dApp. | ||
|
||
## Quick Start | ||
|
||
``` | ||
yarn add @ckb-lumos/lumos | ||
``` |
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,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* |
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,41 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
|
||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
This command starts a local development server and opens 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 | ||
|
||
Using SSH: | ||
|
||
``` | ||
$ USE_SSH=true yarn deploy | ||
``` | ||
|
||
Not using SSH: | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> 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. |
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')], | ||
}; |
Empty file.
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,35 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Tutorial Intro | ||
|
||
Let's discover **Docusaurus in less than 5 minutes**. | ||
|
||
## Getting Started | ||
|
||
Get started by **creating a new site**. | ||
|
||
Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**. | ||
|
||
## Generate a new site | ||
|
||
Generate a new Docusaurus site using the **classic template**: | ||
|
||
```shell | ||
npm init docusaurus@latest my-website classic | ||
``` | ||
|
||
## Start your site | ||
|
||
Run the development server: | ||
|
||
```shell | ||
cd my-website | ||
|
||
npx docusaurus start | ||
``` | ||
|
||
Your site starts at `http://localhost:3000`. | ||
|
||
Open `docs/intro.md` and edit some lines: the site **reloads automatically** and displays your changes. |
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,106 @@ | ||
// @ts-check | ||
// Note: type annotations allow type checking and IDEs autocompletion | ||
|
||
const lightCodeTheme = require("prism-react-renderer/themes/github"); | ||
const darkCodeTheme = require("prism-react-renderer/themes/dracula"); | ||
|
||
/** @type {import('@docusaurus/types').Config} */ | ||
const config = { | ||
title: "Lumos Docs", | ||
tagline: "Full featured JavaScript(TypeScript) based dApp library for Nervos CKB", | ||
url: "https://nervosnetwork.github.io", | ||
baseUrl: "/lumos/", | ||
onBrokenLinks: "throw", | ||
onBrokenMarkdownLinks: "warn", | ||
favicon: "img/favicon.ico", | ||
organizationName: "nervosnetwork", // Usually your GitHub org/user name. | ||
projectName: "lumos", // Usually your repo name. | ||
|
||
presets: [ | ||
[ | ||
"classic", | ||
/** @type {import('@docusaurus/preset-classic').Options} */ | ||
({ | ||
docs: { | ||
path: "../docs", | ||
sidebarPath: require.resolve("./sidebars.js"), | ||
editUrl: | ||
"https://github.com/nervosnetwork/lumos/tree/develop/docusaurus/website/", | ||
}, | ||
blog: { | ||
showReadingTime: true, | ||
editUrl: | ||
"https://github.com/nervosnetwork/lumos/tree/develop/docusaurus/website/", | ||
}, | ||
theme: { | ||
customCss: require.resolve("./src/css/custom.css"), | ||
}, | ||
}), | ||
], | ||
], | ||
|
||
themeConfig: | ||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */ | ||
({ | ||
navbar: { | ||
title: "Lumos Docs", | ||
// TODO need a logo | ||
// logo: { | ||
// alt: "Lumos Docs", | ||
// src: "img/logo.svg", | ||
// }, | ||
items: [ | ||
{ | ||
type: "doc", | ||
docId: "intro", | ||
position: "left", | ||
label: "Docs", | ||
}, | ||
// { to: "/blog", label: "Blog", position: "left" }, | ||
{ | ||
href: "https://github.com/nervosnetwork/lumos", | ||
label: "GitHub", | ||
position: "right", | ||
}, | ||
], | ||
}, | ||
footer: { | ||
style: "dark", | ||
links: [ | ||
{ | ||
title: "Docs", | ||
items: [ | ||
{ | ||
label: "Tutorial", | ||
to: "/docs/intro", | ||
}, | ||
{ | ||
label: "RFCs", | ||
href: "https://github.com/nervosnetwork/rfcs", | ||
}, | ||
], | ||
}, | ||
{ | ||
title: "More", | ||
items: [ | ||
{ | ||
label: "CKB", | ||
href: "https://github.com/nervosnetwork/ckb", | ||
}, | ||
{ | ||
label: "GitHub", | ||
href: "https://github.com/nervosnetwork/lumos", | ||
}, | ||
], | ||
}, | ||
], | ||
// copyright: `Copyright © ${new Date().getFullYear()} Lumos, Inc. Built with Docusaurus.`, | ||
}, | ||
prism: { | ||
theme: lightCodeTheme, | ||
darkTheme: darkCodeTheme, | ||
}, | ||
}), | ||
}; | ||
|
||
module.exports = config; |
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,43 @@ | ||
{ | ||
"name": "docusaurus", | ||
"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", | ||
"typecheck": "tsc" | ||
}, | ||
"dependencies": { | ||
"@docusaurus/core": "2.0.0-beta.14", | ||
"@docusaurus/preset-classic": "2.0.0-beta.14", | ||
"@mdx-js/react": "^1.6.21", | ||
"clsx": "^1.1.1", | ||
"prism-react-renderer": "^1.2.1", | ||
"react": "^17.0.1", | ||
"react-dom": "^17.0.1" | ||
}, | ||
"devDependencies": { | ||
"@docusaurus/module-type-aliases": "2.0.0-beta.14", | ||
"@tsconfig/docusaurus": "^1.0.4", | ||
"typescript": "^4.5.2" | ||
}, | ||
"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,31 @@ | ||
/** | ||
* 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. | ||
*/ | ||
|
||
// @ts-check | ||
|
||
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ | ||
const sidebars = { | ||
// 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'], | ||
}, | ||
], | ||
*/ | ||
}; | ||
|
||
module.exports = sidebars; |
11 changes: 11 additions & 0 deletions
11
docusaurus/website/src/components/HomepageFeatures.module.css
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,11 @@ | ||
.features { | ||
display: flex; | ||
align-items: center; | ||
padding: 2rem 0; | ||
width: 100%; | ||
} | ||
|
||
.featureSvg { | ||
height: 200px; | ||
width: 200px; | ||
} |
Oops, something went wrong.