Loading .github/workflows/vuepress-deploy.yml +8 −9 Changes for .github/workflows/vuepress-deploy.yml: 8 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -40,23 +40,22 @@ jobs: name: Build site steps: - name: Checkout uses: actions/checkout@v4 uses: actions/checkout@v7 with: fetch-depth: 0 - uses: szenius/set-timezone@v2.0 with: timezoneLinux: "Asia/Shanghai" - name: Set timezone run: sudo timedatectl set-timezone Asia/Shanghai - name: Check Time run: date - uses: actions/setup-node@v4 - uses: actions/setup-node@v7 name: Install Node.js with: node-version-file: '.nvmrc' - uses: pnpm/action-setup@v4 - uses: pnpm/action-setup@v6 name: Install pnpm with: version: 10 Loading @@ -77,7 +76,7 @@ jobs: pnpm docs:build - name: Upload artifact uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v7 with: name: 'sustech-online-build' path: './docs/.vuepress/dist/' Loading @@ -88,7 +87,7 @@ jobs: needs: build if: github.repository_owner == 'SUSTech-CRA' && github.ref == 'refs/heads/master' steps: - uses: actions/download-artifact@v4 - uses: actions/download-artifact@v8 with: name: sustech-online-build path: "./docs/.vuepress/dist/" Loading @@ -98,7 +97,7 @@ jobs: working-directory: "./docs/.vuepress/dist/" - name: Deploy to GitHub page uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs/.vuepress/dist/ Loading docs/.vuepress/client.js +5 −0 Changes for docs/.vuepress/client.js: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -18,9 +18,14 @@ import BusRouteV2 from './components/bus-v2/BusRouteV2.vue' import BusStopV2 from './components/bus-v2/BusStopV2.vue' import BusSchedulesV2 from './components/bus-v2/BusSchedulesV2.vue' import { busPageForPath, reportBusVisit } from './components/bus-v2/analytics.mjs' import { setWorkerUrl } from 'maplibre-gl' import maplibreWorkerUrl from 'maplibre-gl/dist/maplibre-gl-worker.mjs?worker&url' export default defineClientConfig({ enhance({ app, router }) { // MapLibre 6 的独立 Worker 需要由 Vite 打包并显式指定地址。 setWorkerUrl(maplibreWorkerUrl) router.afterEach((to) => { const page = busPageForPath(to.path) if (page) reportBusVisit(page) Loading docs/.vuepress/components/CampusMap.vue +1 −1 Changes for docs/.vuepress/components/CampusMap.vue: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ </template> <script> import maplibre from 'maplibre-gl'; import * as maplibre from 'maplibre-gl'; import axios from "axios"; import * as turf from '@turf/turf'; Loading docs/.vuepress/components/RealtimeMap.vue +1 −1 Changes for docs/.vuepress/components/RealtimeMap.vue: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ </template> <script> import maplibre from 'maplibre-gl'; import * as maplibre from 'maplibre-gl'; import axios from "axios"; import * as turf from '@turf/turf'; import { Protocol } from "pmtiles"; Loading docs/.vuepress/components/RealtimeMapv2.vue +1 −1 Changes for docs/.vuepress/components/RealtimeMapv2.vue: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ </template> <script> import maplibre from 'maplibre-gl'; import * as maplibre from 'maplibre-gl'; import axios from 'axios'; import * as turf from '@turf/turf'; import { Protocol } from 'pmtiles'; Loading Loading
.github/workflows/vuepress-deploy.yml +8 −9 Changes for .github/workflows/vuepress-deploy.yml: 8 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -40,23 +40,22 @@ jobs: name: Build site steps: - name: Checkout uses: actions/checkout@v4 uses: actions/checkout@v7 with: fetch-depth: 0 - uses: szenius/set-timezone@v2.0 with: timezoneLinux: "Asia/Shanghai" - name: Set timezone run: sudo timedatectl set-timezone Asia/Shanghai - name: Check Time run: date - uses: actions/setup-node@v4 - uses: actions/setup-node@v7 name: Install Node.js with: node-version-file: '.nvmrc' - uses: pnpm/action-setup@v4 - uses: pnpm/action-setup@v6 name: Install pnpm with: version: 10 Loading @@ -77,7 +76,7 @@ jobs: pnpm docs:build - name: Upload artifact uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v7 with: name: 'sustech-online-build' path: './docs/.vuepress/dist/' Loading @@ -88,7 +87,7 @@ jobs: needs: build if: github.repository_owner == 'SUSTech-CRA' && github.ref == 'refs/heads/master' steps: - uses: actions/download-artifact@v4 - uses: actions/download-artifact@v8 with: name: sustech-online-build path: "./docs/.vuepress/dist/" Loading @@ -98,7 +97,7 @@ jobs: working-directory: "./docs/.vuepress/dist/" - name: Deploy to GitHub page uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs/.vuepress/dist/ Loading
docs/.vuepress/client.js +5 −0 Changes for docs/.vuepress/client.js: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -18,9 +18,14 @@ import BusRouteV2 from './components/bus-v2/BusRouteV2.vue' import BusStopV2 from './components/bus-v2/BusStopV2.vue' import BusSchedulesV2 from './components/bus-v2/BusSchedulesV2.vue' import { busPageForPath, reportBusVisit } from './components/bus-v2/analytics.mjs' import { setWorkerUrl } from 'maplibre-gl' import maplibreWorkerUrl from 'maplibre-gl/dist/maplibre-gl-worker.mjs?worker&url' export default defineClientConfig({ enhance({ app, router }) { // MapLibre 6 的独立 Worker 需要由 Vite 打包并显式指定地址。 setWorkerUrl(maplibreWorkerUrl) router.afterEach((to) => { const page = busPageForPath(to.path) if (page) reportBusVisit(page) Loading
docs/.vuepress/components/CampusMap.vue +1 −1 Changes for docs/.vuepress/components/CampusMap.vue: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ </template> <script> import maplibre from 'maplibre-gl'; import * as maplibre from 'maplibre-gl'; import axios from "axios"; import * as turf from '@turf/turf'; Loading
docs/.vuepress/components/RealtimeMap.vue +1 −1 Changes for docs/.vuepress/components/RealtimeMap.vue: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ </template> <script> import maplibre from 'maplibre-gl'; import * as maplibre from 'maplibre-gl'; import axios from "axios"; import * as turf from '@turf/turf'; import { Protocol } from "pmtiles"; Loading
docs/.vuepress/components/RealtimeMapv2.vue +1 −1 Changes for docs/.vuepress/components/RealtimeMapv2.vue: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ </template> <script> import maplibre from 'maplibre-gl'; import * as maplibre from 'maplibre-gl'; import axios from 'axios'; import * as turf from '@turf/turf'; import { Protocol } from 'pmtiles'; Loading