From f5a2bd326f32856de11606d3b65358ab70d8b6b2 Mon Sep 17 00:00:00 2001 From: Vincent Date: Fri, 29 Mar 2024 13:20:22 +0800 Subject: [PATCH] update --- .github/workflows/documentation-Zenith.yml | 24 ++++ README.md | Bin 768 -> 796 bytes docs/intro-Zenith.md | 48 +++++++ "docs/\345\205\254\345\274\217/test.md" | 4 + docusaurus.config-Zenith.js | 141 +++++++++++++++++++++ sidebars.js | 33 +++-- 6 files changed, 239 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/documentation-Zenith.yml create mode 100644 docs/intro-Zenith.md create mode 100644 "docs/\345\205\254\345\274\217/test.md" create mode 100644 docusaurus.config-Zenith.js diff --git a/.github/workflows/documentation-Zenith.yml b/.github/workflows/documentation-Zenith.yml new file mode 100644 index 0000000..f5b5ce6 --- /dev/null +++ b/.github/workflows/documentation-Zenith.yml @@ -0,0 +1,24 @@ +name: Deploy Github pages +on: + push: + branches: + - mian +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@main + with: + persist-credentials: false + - name: Install and Build + run: | + npm install + npm run-script build + - name: Deploy + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + BRANCH: gh-pages + FOLDER: build + BUILD_SCRIPT: npm install && npm run build \ No newline at end of file diff --git a/README.md b/README.md index 0c6c2c27be92d0755ffa320a8c2222174ce39299..2e7ca0979a148a068bcc3426192fbb18c0f4451c 100644 GIT binary patch delta 35 qcmZo*o5Qw%Sw@*bfgzP4k0G5Qhar=pm?48fm%)U=h=G@Ziva+BWd*+g delta 6 NcmbQk*1)!a82|?%0n7jZ diff --git a/docs/intro-Zenith.md b/docs/intro-Zenith.md new file mode 100644 index 0000000..8197508 --- /dev/null +++ b/docs/intro-Zenith.md @@ -0,0 +1,48 @@ +--- +sidebar_position: 1 +--- +hhhhhhha😊 + +# 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)**. + +### What you'll need + +- [Node.js](https://nodejs.org/en/download/) version 18.0 or above: + - When installing Node.js, you are recommended to check all checkboxes related to dependencies. + +## Generate a new site + +Generate a new Docusaurus site using the **classic template**. + +The classic template will automatically be added to your project after you run the command: + +```bash +npm init docusaurus@latest my-website classic +``` + +You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor. + +The command also installs all necessary dependencies you need to run Docusaurus. + +## Start your site + +Run the development server: + +```bash +cd my-website +npm run start +``` + +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. + +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. diff --git "a/docs/\345\205\254\345\274\217/test.md" "b/docs/\345\205\254\345\274\217/test.md" new file mode 100644 index 0000000..7ddc7d5 --- /dev/null +++ "b/docs/\345\205\254\345\274\217/test.md" @@ -0,0 +1,4 @@ +--- +sidebar_position: 2 +--- +# 这是一个供hsy测试用的页面 \ No newline at end of file diff --git a/docusaurus.config-Zenith.js b/docusaurus.config-Zenith.js new file mode 100644 index 0000000..4a1b899 --- /dev/null +++ b/docusaurus.config-Zenith.js @@ -0,0 +1,141 @@ +// @ts-check +// `@type` JSDoc annotations allow editor autocompletion and type checking +// (when paired with `@ts-check`). +// There are various equivalent ways to declare your Docusaurus config. +// See: https://docusaurus.io/docs/api/docusaurus-config + +import {themes as prismThemes} from 'prism-react-renderer'; + +/** @type {import('@docusaurus/types').Config} */ +const config = { + title: 'English 42', + tagline: 'the answer of learning english', + favicon: 'img/favicon.ico', + + // Set the production url of your site here + url: 'https://english42.github.io', + // Set the // pathname under which your site is served + // For GitHub pages deployment, it is often '//' + baseUrl: '/', + + // GitHub pages deployment config. + // If you aren't using GitHub pages, you don't need these. + organizationName: 'mind-dance', // Usually your GitHub org/user name. + projectName: 'english42.github.io', // Usually your repo name. + + onBrokenLinks: 'throw', + onBrokenMarkdownLinks: 'warn', + + // Even if you don't use internationalization, you can use this field to set + // 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'], + }, + + presets: [ + [ + 'classic', + /** @type {import('@docusaurus/preset-classic').Options} */ + ({ + docs: { + sidebarPath: './sidebars.js', + // 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/', + }, + 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/', + }, + theme: { + customCss: './src/css/custom.css', + }, + }), + ], + ], + + themeConfig: + /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ + ({ + // Replace with your project's social card + image: 'img/docusaurus-social-card.jpg', + navbar: { + title: 'My Site', + logo: { + alt: 'My Site Logo', + src: 'img/logo.svg', + }, + items: [ + { + type: 'docSidebar', + sidebarId: 'tutorialSidebar', + position: 'left', + label: 'Tutorial', + }, + {to: '/blog', label: 'Blog', position: 'left'}, + { + href: 'https://github.com/facebook/docusaurus', + label: 'GitHub', + position: 'right', + }, + ], + }, + footer: { + style: 'dark', + links: [ + { + title: 'Docs', + items: [ + { + label: 'Tutorial', + to: '/docs/intro', + }, + ], + }, + { + 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: 'Blog', + to: '/blog', + }, + { + label: 'GitHub', + href: 'https://github.com/facebook/docusaurus', + }, + ], + }, + ], + copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`, + }, + prism: { + theme: prismThemes.github, + darkTheme: prismThemes.dracula, + }, + }), +}; + +export default config; diff --git a/sidebars.js b/sidebars.js index 3327580..c06097b 100644 --- a/sidebars.js +++ b/sidebars.js @@ -17,17 +17,28 @@ const sidebars = { tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], // But you can create a sidebar manually - /* - tutorialSidebar: [ - 'intro', - 'hello', - { - type: 'category', - label: 'Tutorial', - items: ['tutorial-basics/create-a-document'], - }, - ], - */ + + // tutorialSidebar: [ + // 'intro', + // 'hello', + // { + // type: 'category', + // label: 'Tutorial', + // items: ['tutorial-basics/create-a-document'], + // }, + // ], + }; export default sidebars; +// export default { +// tutorialSidebar: [ +// 'intro', +// 'hello', +// { +// type: 'category', +// label: 'Tutorial', +// items: ['tutorial-basics/create-a-document'], +// }, +// ], +// }; \ No newline at end of file