Skip to content

Commit

Permalink
Merge branch 'tmp'
Browse files Browse the repository at this point in the history
  • Loading branch information
y0sh1ne committed Jun 26, 2024
2 parents 13367ed + 9565fc1 commit a8972ef
Show file tree
Hide file tree
Showing 18 changed files with 12,711 additions and 3,014 deletions.
40 changes: 3 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,7 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
本页面是使用[Docusaurus](https://docusaurus.io/)构建的,一个现代的静态网站生成器。

### 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.
The theme is based on the [Messiahhh's blog](https://github.com/Messiahhh/blog), modified to TypeScript version.
主题基于[Messiahhh's blog](https://github.com/Messiahhh/blog),魔改为了ts版本.
4 changes: 2 additions & 2 deletions docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new

### What you'll need

- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
- [Node.js](https://nodejs.org/en/download/) version 14 or above:
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.

## Generate a new site
Expand Down Expand Up @@ -44,4 +44,4 @@ The `cd` command changes the directory you're working with. In order to work wit

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/.

Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
40 changes: 29 additions & 11 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';

const config: Config = {
title: 'My Site',
tagline: 'Dinosaurs are cool',
title: 'y0sh1ne',
tagline: 'try',
favicon: 'img/favicon.ico',

// Set the production url of your site here
Expand All @@ -27,8 +27,8 @@ const config: Config = {
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
defaultLocale: 'zh-Hans',
locales: ['zh-Hans'],
},

presets: [
Expand All @@ -39,15 +39,15 @@ const config: Config = {
sidebarPath: './sidebars.ts',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
// editUrl:
// 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
// editUrl:
// 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
},
theme: {
customCss: './src/css/custom.css',
Expand All @@ -72,12 +72,21 @@ const config: Config = {
position: 'left',
label: 'Tutorial',
},
{to: '/blog', label: 'Blog', position: 'left'},
{
href: 'https://github.com/facebook/docusaurus',
label: 'GitHub',
// type: 'default',
to: '/blog',
label: 'Blog',
position: 'left'},
{
type: 'search',
position: 'right',
},
{
// type: 'default',
href: 'https://github.com/y0sh1ne/y0sh1ne.github.io',
html: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24" background-color="white" style="background-color: white;border-radius: 50%;"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"></path></svg>',
position: 'right',
}
],
},
footer: {
Expand Down Expand Up @@ -129,6 +138,15 @@ const config: Config = {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
algolia: {
// The application ID provided by Algolia
appId: 'x',

// Public API key: it is safe to commit it
apiKey: 'x',

indexName: 'y0sh1ne',
}
} satisfies Preset.ThemeConfig,
};

Expand Down
Loading

0 comments on commit a8972ef

Please sign in to comment.