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

Commit 6701cb7

Browse files
committed
init
1 parent 85e8ad1 commit 6701cb7

File tree

17 files changed

+133
-461
lines changed

17 files changed

+133
-461
lines changed

‎docs/annotated/00-index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 0
2+
sidebar_position: 2
33
---
44

55
# Rust 源码分析

‎docs/ecosystem/00-index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 0
2+
sidebar_position: 1
33
---
44

55
# rust 生态

‎docs/guide/01-intro.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 1
2+
sidebar_position: 0
33
---
44

55
# rust 教程

‎docs/intro.md‎

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,3 @@ sidebar_position: 1
33
---
44

55
# Tutorial Intro
6-
7-
Let's discover **Docusaurus in less than 5 minutes**.
8-
9-
## Getting Started
10-
11-
Get started by **creating a new site**.
12-
13-
Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.
14-
15-
### What you'll need
16-
17-
- [Node.js](https://nodejs.org/en/download/) version 16.14 or above:
18-
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
19-
20-
## Generate a new site
21-
22-
Generate a new Docusaurus site using the **classic template**.
23-
24-
The classic template will automatically be added to your project after you run the command:
25-
26-
```bash
27-
npm init docusaurus@latest my-website classic
28-
```
29-
30-
You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
31-
32-
The command also installs all necessary dependencies you need to run Docusaurus.
33-
34-
## Start your site
35-
36-
Run the development server:
37-
38-
```bash
39-
cd my-website
40-
npm run start
41-
```
42-
43-
The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.
44-
45-
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
46-
47-
Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.

‎docusaurus.config.js‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const config = {
6363
title: "Rust 学习", // todo x
6464
logo: {
6565
alt: "Rust Logo",
66-
src: "img/logo.png",
66+
src: "img/logo.svg",
6767
},
6868
items: [
6969
// TODO X: 教程
@@ -94,7 +94,7 @@ const config = {
9494
label: "生态",
9595
},
9696

97-
// todo x: 生态
97+
// todo x: 源码分析
9898
{
9999
type: "docSidebar",
100100
position: "left",
@@ -135,7 +135,11 @@ const config = {
135135
items: [
136136
{
137137
label: "Tutorial",
138-
to: "/docs/intro",
138+
to: "docs/guide/intro",
139+
},
140+
{
141+
label: "Ecosystem",
142+
to: "docs/ecosystem/index",
139143
},
140144
],
141145
},
@@ -170,7 +174,7 @@ const config = {
170174
],
171175
},
172176
],
173-
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
177+
copyright: `Copyright © ${new Date().getFullYear()} better-rs. Built with Docusaurus.`,
174178
},
175179
prism: {
176180
theme: lightCodeTheme,

‎src/components/HomepageFeatures/index.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type FeatureItem = {
1313
const FeatureList: FeatureItem[] = [
1414
{
1515
title: 'Rust: A better C++',
16-
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
16+
Svg: require('@site/static/img/rust-flat-happy.svg').default,
1717
description: (
1818
<>
1919
<ul>
@@ -30,7 +30,7 @@ const FeatureList: FeatureItem[] = [
3030
},
3131
{
3232
title: '语法特性',
33-
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
33+
Svg: require('@site/static/img/rust-cuddlyferris.svg').default,
3434
description: (
3535
<>
3636
<ul>
@@ -46,7 +46,7 @@ const FeatureList: FeatureItem[] = [
4646
},
4747
{
4848
title: '应用场景',
49-
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
49+
Svg: require('@site/static/img/rust-flat-gesture.svg').default,
5050
description: (
5151
<>
5252
<ul>

‎src/pages/index.tsx‎

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,39 @@ import HomepageFeatures from '@site/src/components/HomepageFeatures';
88
import styles from './index.module.css';
99

1010
function HomepageHeader() {
11-
const { siteConfig } = useDocusaurusContext();
12-
return (
13-
<header className={clsx('hero hero--primary', styles.heroBanner)}>
14-
<div className="container">
15-
<h1 className="hero__title">{siteConfig.title}</h1>
16-
<p className="hero__subtitle">{siteConfig.tagline}</p>
11+
const {siteConfig} = useDocusaurusContext();
12+
return (
13+
<header className={clsx('hero hero--primary', styles.heroBanner)}>
14+
<div className="container">
1715

16+
<h1 className="hero__title">{siteConfig.title}</h1>
17+
<p className="hero__subtitle">{siteConfig.tagline}</p>
1818

19-
{/* Todo X: 更新 */}
20-
<div className={styles.buttons}>
21-
<Link
22-
className="button button--secondary button--lg"
23-
to="/docs/intro">
19+
{/* Todo X: 更新 */}
20+
<div className={styles.buttons}>
21+
<Link
22+
className="button button--secondary button--lg"
23+
to="docs/guide/intro">
2424

25-
Rust 学习教程
25+
Rust 学习教程
2626

27-
</Link>
28-
</div>
29-
</div>
30-
</header>
31-
);
27+
</Link>
28+
</div>
29+
</div>
30+
</header>
31+
);
3232
}
3333

3434
export default function Home(): JSX.Element {
35-
const {siteConfig} = useDocusaurusContext();
36-
return (
37-
<Layout
38-
title={`${siteConfig.title}`}
39-
description="Description will go into a meta tag in <head />">
40-
<HomepageHeader/>
41-
<main>
42-
<HomepageFeatures/>
43-
</main>
44-
</Layout>
45-
);
35+
const {siteConfig} = useDocusaurusContext();
36+
return (
37+
<Layout
38+
title={`${siteConfig.title}`}
39+
description="Description will go into a meta tag in <head />">
40+
<HomepageHeader/>
41+
<main>
42+
<HomepageFeatures/>
43+
</main>
44+
</Layout>
45+
);
4646
}

‎static/img/docusaurus.png‎

-5.02 KB
Binary file not shown.

‎static/img/favicon.ico‎

62.5 KB
Binary file not shown.

‎static/img/logo.png‎

-26.3 KB
Binary file not shown.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /