From 660616b4494eb28f91a7ca85fd1f85bb23dd455e Mon Sep 17 00:00:00 2001 From: shenghuo2 <1308357113@qq.com> Date: Mon, 5 Aug 2024 17:50:42 +0000 Subject: [PATCH 1/4] feat: add readme contributors generator --- .github/workflows/readme-contributors.yml | 21 +++++++++++++++++++++ README.md | 11 +++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/readme-contributors.yml diff --git a/.github/workflows/readme-contributors.yml b/.github/workflows/readme-contributors.yml new file mode 100644 index 0000000..3f9f643 --- /dev/null +++ b/.github/workflows/readme-contributors.yml @@ -0,0 +1,21 @@ +name: Generate Contributors in README.md + +on: + push: + branches: + - main + +jobs: + contrib-readme-job: + runs-on: ubuntu-latest + name: A job to automate contrib in readme + permissions: + contents: write + pull-requests: write + steps: + - name: Contribute List + uses: akhilmhdh/contributors-readme-action@v2.3.10 + with: + image_size: 80 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index e34a99b..8fe790f 100644 --- a/README.md +++ b/README.md @@ -45,3 +45,14 @@ All commands are run from the root of the project, from a terminal: ## 👀 Want to learn more? Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). + + +## Contributors + + + + +### Bots + + + From 5def6703cfca109d1930d1cc034335f09bfe7b48 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 17:50:54 +0000 Subject: [PATCH 2/4] docs(contributor): contrib-readme-action has updated readme --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/README.md b/README.md index 8fe790f..1f0426d 100644 --- a/README.md +++ b/README.md @@ -50,9 +50,49 @@ Feel free to check [our documentation](https://docs.astro.build) or jump into ou ## Contributors + + + + + + + + +
+ + shenghuo2 +
+ shenghuo2 +
+
+ + CG-Jue +
+ CGjue +
+
+ + Yhuanhuan01 +
+ huan +
+
### Bots + + + + + + +
+ + github-actions[bot] +
+ github-actions[bot] +
+
From 9a46ae77e108d4fc6bdccf0175febd8600426328 Mon Sep 17 00:00:00 2001 From: shenghuo2 <1308357113@qq.com> Date: Mon, 5 Aug 2024 17:58:05 +0000 Subject: [PATCH 3/4] refactor(footer): rename footer --- src/pages/components/{footer.astro => Footer.astro} | 0 src/pages/layouts/BaseLayout.astro | 2 +- src/pages/layouts/BaseMarkdownLayout.astro | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename src/pages/components/{footer.astro => Footer.astro} (100%) diff --git a/src/pages/components/footer.astro b/src/pages/components/Footer.astro similarity index 100% rename from src/pages/components/footer.astro rename to src/pages/components/Footer.astro diff --git a/src/pages/layouts/BaseLayout.astro b/src/pages/layouts/BaseLayout.astro index ad7ab3c..4af7ff5 100644 --- a/src/pages/layouts/BaseLayout.astro +++ b/src/pages/layouts/BaseLayout.astro @@ -1,7 +1,7 @@ --- // 导入导航栏组件 import Navbar from '../components/Navbar.astro'; -import Footer from '../components/footer.astro'; +import Footer from '../components/Footer.astro'; // 接收页面标题和当前路径作为属性 const { title, currentPath } = Astro.props; const siteName = 'QLNU-Sec-Team'; diff --git a/src/pages/layouts/BaseMarkdownLayout.astro b/src/pages/layouts/BaseMarkdownLayout.astro index bfef11d..89b56a3 100644 --- a/src/pages/layouts/BaseMarkdownLayout.astro +++ b/src/pages/layouts/BaseMarkdownLayout.astro @@ -1,5 +1,5 @@ --- -import Footer from '../components/footer.astro'; +import Footer from '../components/Footer.astro'; import Navbar from '../components/Navbar.astro'; const { frontmatter } = Astro.props; From 5804a2a28162fce5bf2d4dacb631b28dd061c045 Mon Sep 17 00:00:00 2001 From: shenghuo2 <1308357113@qq.com> Date: Mon, 5 Aug 2024 17:59:31 +0000 Subject: [PATCH 4/4] docs: readme completed --- README.md | 182 ++++++++++++++++++++++++++++++++++------- package.json | 2 +- src/pages/member.astro | 2 +- 3 files changed, 153 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 8fe790f..5bcfb9f 100644 --- a/README.md +++ b/README.md @@ -1,51 +1,162 @@ -# Astro Starter Kit: Minimal +# 齐鲁师范学院网络安全社团(QLNU-Sec-Team)官网 + +![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/QLNU-Sec-Team/QLNU-Sec-Team.github.io/astro.yml) +![GitHub License](https://img.shields.io/github/license/QLNU-Sec-Team/QLNU-Sec-Team.github.io) +![GitHub deployments](https://img.shields.io/github/deployments/QLNU-Sec-Team/QLNU-Sec-Team.github.io/github-pages) +![GitHub Release](https://img.shields.io/github/v/release/QLNU-Sec-Team/QLNU-Sec-Team.github.io) + +![NPM Version](https://img.shields.io/npm/v/astro) +![GitHub last commit](https://img.shields.io/github/last-commit/QLNU-Sec-Team/QLNU-Sec-Team.github.io) +![GitHub contributors](https://img.shields.io/github/contributors-anon/QLNU-Sec-Team/QLNU-Sec-Team.github.io) + + + + +运行在: https://www.qlnu-sec.cn + +## About + +> 本项目使用 `Astro` 作为 Web 框架进行编写 +> +> 基本框架由 [shenghuo2](https://github.com/shenghuo2) 进行编写实现 +> +> 于 2024.8.5 基本完成实现 + +## 维护提示 + +若需维护 `index`/`award` 页的内容 + +直接修改 `src/pages/index.md` / `src/pages/award.md` 即可 + +--- + +如需增加`member`页的成员 + +请修改`src/assets/memberList.json` + +按照以下格式编写 -```sh -npm create astro@latest -- --template minimal ``` +{ + "index": { + "level": "number", + "member": [ + "name" + ], + "link": { + "name": "https://link" + } + } +} +``` + +--- -[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal) -[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/minimal) -[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/minimal/devcontainer.json) +> 本项目使用了**ViewTransition**特性,所以请使用Astro ^4.12.2 +> +> 使用nodejs v20 -> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! -## 🚀 Project Structure +# 项目结构 -Inside of your Astro project, you'll see the following folders and files: +``` +. +├── public +│ ├── favicon.svg +│ ├── icon.png +│ ├── QLNU.png +│ └── wx.svg +├── src +│ ├── assets +│ │ └── memberList.json +│ ├── pages +│ │ ├── components +│ │ │ ├── footer.astro +│ │ │ ├── Navbar.astro +│ │ │ └── NavItem.astro +│ │ ├── layouts +│ │ │ ├── BaseLayout.astro +│ │ │ └── BaseMarkdownLayout.astro +│ │ ├── award.md +│ │ ├── index.md +│ │ └── member.astro +│ ├── styles +│ │ └── global.css +│ └── env.d.ts +├── astro.config.mjs +├── CNAME +├── LICENSE +├── package.json +├── package-lock.json +├── README.md +└── tsconfig.json -```text -/ -├── public/ -├── src/ -│ └── pages/ -│ └── index.astro -└── package.json ``` -Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. +## public + +此文件夹下为网站根目录可直接使用的文件 + +主要是存放非代码、未处理的资源 + +这个文件夹中的文件将会被原封不动地复制到构建文件夹中 + +`favicon.svg` 未使用,为Astro的icon + +## src + +### assets -There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. +`memberList.json` 为 member.astro所引用的成员列表JSON -Any static assets, like images, can be placed in the `public/` directory. +结构请参考 [维护提示](#维护提示) -## 🧞 Commands +### pages -All commands are run from the root of the project, from a terminal: +`Astro`将渲染在本文件夹下的文件为页面 -| Command | Action | -| :------------------------ | :----------------------------------------------- | -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:4321` | -| `npm run build` | Build your production site to `./dist/` | -| `npm run preview` | Preview your build locally, before deploying | -| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | -| `npm run astro -- --help` | Get help using the Astro CLI | +### pages/components -## 👀 Want to learn more? +基本组件,Astro使用模块化设计 -Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). +可以是 `Astro 组件` 或是像 React 或 Vue 这样的 `UI 框架组件` +Navbar由NavItem组成 + +Footer为页脚 + +### pages/layouts + +框架模板,两个模板几乎相同,可以再进行合并重构 + +BaseLayout为原模板,后改为`member.astro`独用 + +BaseMarkdownLayout为`index.md`和`award.md`的渲染模板 + +### styles + +本文件夹下存放的`global.css`暂未实装 + +## 根目录 + +### package.json + +nodejs 项目清单 + +名称和版本 (name 和 version): 定义项目的名称和版本号。 + +描述 (description): 项目简要描述。 + +脚本 (scripts): 定义一组可以通过 `npm run