Skip to content

Removed not required dependencies / setup build in docs #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,25 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
# - uses: pnpm/action-setup@v3 # Uncomment this if you're using pnpm
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm # or pnpm / yarn
cache: npm

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Install dependencies
run: npm ci # or pnpm install / yarn install / bun install
run: npm ci
working-directory: docs

- name: Build with VitePress
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
run: npm run docs:build
working-directory: docs

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand All @@ -61,4 +66,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
4 changes: 0 additions & 4 deletions docs/.vitepress/config/shared.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { defineConfig } from "vitepress";
import { tabsMarkdownPlugin } from "vitepress-plugin-tabs";

import { search as zhSearch } from "./zh.mjs";

Expand All @@ -21,9 +20,6 @@ export const shared = defineConfig({
lazyLoading: true,
},
lineNumbers: true,
config(md) {
md.use(tabsMarkdownPlugin);
},
container: {
tipLabel: "提示",
warningLabel: "警告",
Expand Down
File renamed without changes.
17 changes: 2 additions & 15 deletions docs/.vitepress/theme/index.mjs
Original file line number Diff line number Diff line change
@@ -1,29 +1,16 @@
// .vitepress/theme/index.js
import DefaultTheme from "vitepress/theme";
import { enhanceAppWithTabs } from "vitepress-plugin-tabs/client";
import { onMounted, watch, nextTick } from "vue";
import { watch } from "vue";
import { useRoute } from "vitepress";
import mediumZoom from "medium-zoom";

import "./custom.scss";
import "./custom.css";

export default {
...DefaultTheme,
enhanceApp({ app }) {
enhanceAppWithTabs(app);
},
setup() {
const route = useRoute();
const initZoom = () => {
mediumZoom("[data-zoomable]", { background: "var(--vp-c-bg)" });
// mediumZoom(".main img", { background: "var(--vp-c-bg)" });
};
onMounted(() => {
initZoom();
});
watch(
() => route.path,
() => nextTick(() => initZoom())
);
},
};
Loading