-
Notifications
You must be signed in to change notification settings - Fork 163
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
819 changed files
with
11,700 additions
and
60 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,37 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
# 允许你在 GitHub 上的 Actions 标签中手动触发此“工作流程” | ||
workflow_dispatch: | ||
|
||
# 允许 job 克隆 repo 并创建一个 page deployment | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout your repository using git | ||
uses: actions/checkout@v3 | ||
- name: Install, build, and upload your site | ||
uses: withastro/action@v1 | ||
# with: | ||
# path: . # 存储库中 Astro 项目的根位置。(可选) | ||
# node-version: 18 # 用于构建站点的特定 Node.js 版本,默认为 18。(可选) | ||
# package-manager: pnpm@latest # 应使用哪个 Node.js 包管理器来安装依赖项和构建站点。会根据存储库中的 lockfile 自动检测。(可选) | ||
|
||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
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,21 @@ | ||
# build output | ||
dist/ | ||
# generated types | ||
.astro/ | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
|
||
# environment variables | ||
.env | ||
.env.production | ||
|
||
# macOS-specific files | ||
.DS_Store |
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,141 @@ | ||
import { defineConfig } from 'astro/config'; | ||
import starlight from '@astrojs/starlight'; | ||
import remarkMath from 'remark-math'; | ||
import rehypeKatex from 'rehype-katex'; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
site: 'https://njuptfreeexams.github.io', | ||
base: '/NJUPT-General-Free-Exams', | ||
vite: { | ||
assetsInclude: ["**/*.ppt", "**/*.pptx", "**/*.doc", "**/*.docx"] | ||
}, | ||
integrations: [starlight({ | ||
title: 'NJUPTFreeExams', | ||
defaultLocale: 'root', | ||
locales: { | ||
root: { | ||
label: '简体中文', | ||
lang: 'zh-CN' | ||
} | ||
}, | ||
social: { | ||
github: 'https://github.com/NJUPTFreeExams/NJUPT-General-Free-Exams' | ||
}, | ||
customCss: ['./src/styles/custom.css'], | ||
sidebar: [ | ||
{label: '首页', link: 'homepage'}, | ||
{ | ||
label: '指南', collapsed: true, | ||
items: [ | ||
{label: 'UserGuide', link: '/homepage/userguide'}, | ||
{label: 'IssueGuide', link: '/homepage/issueguide'}, | ||
{label: 'UploadGuide', link: '/homepage/uploadguide'}, | ||
] | ||
}, | ||
//指向内部或外部页面的链接 | ||
{ | ||
label: '计算机学院', | ||
// 自动生成一个链接分组,用于 'CS' 目录。 | ||
autogenerate: { | ||
directory: 'CS' | ||
} | ||
}, { | ||
label: '理学院', | ||
// 自动生成一个链接分组,用于 'CS' 目录。 | ||
autogenerate: { | ||
directory: 'lxy' | ||
} | ||
}, { | ||
label: '通信与信息工程学院', | ||
autogenerate: { | ||
directory: 'SCIE' | ||
} | ||
}, { | ||
label: '经济学院', | ||
autogenerate: { | ||
directory: 'Economics' | ||
} | ||
}, { | ||
label: '集成电路科学与工程学院', | ||
autogenerate: { | ||
directory: 'IC' | ||
} | ||
}, { | ||
label: '管理学院', | ||
autogenerate: { | ||
directory: 'Management' | ||
} | ||
}, { | ||
label: '马克思主义学院', | ||
autogenerate: { | ||
directory: 'Marx' | ||
} | ||
}, { | ||
label: '外国语学院', | ||
// 自动生成一个链接分组,用于 'CS' 目录。 | ||
autogenerate: { | ||
directory: 'FLS' | ||
} | ||
}, { | ||
label: '教育与技术学院', | ||
// 自动生成一个链接分组,用于 'CS' 目录。 | ||
autogenerate: { | ||
directory: 'edu' | ||
} | ||
}, { | ||
label: '其他', | ||
autogenerate: { | ||
directory: 'others' | ||
} | ||
}, { | ||
label: '贡献文档', | ||
collapsed: true, | ||
autogenerate: { | ||
directory: 'reserve' | ||
} | ||
}, { | ||
label: '👉了解 Astro', | ||
link: 'https://astro.build/' | ||
}], | ||
head: [{ | ||
tag: 'link', | ||
attrs: { | ||
rel: "stylesheet", | ||
href: 'https://fastly.jsdelivr.net/npm/[email protected]/dist/katex.css', | ||
defer: true, | ||
'integrity': "sha384-WsHMgfkABRyG494OmuiNmkAOk8nhO1qE+Y6wns6v+EoNoTNxrWxYpl5ZYWFOLPCM", | ||
'crossorigin': "anonymous" | ||
} | ||
}, { | ||
tag: 'script', | ||
attrs: { | ||
'is:inline': true, | ||
src: 'https://cdn.staticfile.org/twikoo/1.6.30/twikoo.all.min.js' | ||
} | ||
}, { | ||
tag: 'script', | ||
attrs: { | ||
'async': true, | ||
src: '//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js' | ||
} | ||
}], | ||
expressiveCode: { | ||
styleOverrides: { | ||
borderRadius: '0.5rem' | ||
} | ||
}, | ||
components: { | ||
Footer: './src/components/Footer.astro', | ||
MarkdownContent: './src/components/MarkdownContent.astro' | ||
}, | ||
editLink: { | ||
baseUrl: 'https://github.com/withastro/starlight/edit/main/' | ||
}, | ||
lastUpdated: true | ||
})], | ||
markdown: { | ||
remarkPlugins: [remarkMath], | ||
rehypePlugins: [rehypeKatex] | ||
}, | ||
}); |
Oops, something went wrong.