Skip to content

Commit

Permalink
我反悔了,手动生成了份新的资源
Browse files Browse the repository at this point in the history
  • Loading branch information
Big-Cake-jpg committed May 2, 2024
1 parent 5bd69ac commit f6a7c2f
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 53 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/preview-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ jobs:
# vitepress build command does not have --debug option, so we need to set it manually where the debug package is used.
# DEBUG: 'vitepress:*'
VUE_PROD_HYDRATION_MISMATCH_DETAILS_FLAG: '1'
PWA_NAME: 'CrashMC 文档(预览)'
DEPLOYMENT_STATUS: 'preview'

- name: Publish to Cloudflare Pages
id: deploy
Expand Down
46 changes: 22 additions & 24 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,26 +79,27 @@ const pwaConfig: PwaOptions = {
categories: ["minecraft", "crash"],
icons: [
{
src: "logo-new.webp",
sizes: "1024x1024",
type: "image/webp",
},
{
src: "pwa-512x512.webp",
sizes: "512x512",
type: "image/webp",
src: "pwa-64x64.png",
sizes: "64x64",
type: "image/png"
},
{
src: "pwa-192x192.webp",
src: "pwa-192x192.png",
sizes: "192x192",
type: "image/webp",
type: "image/png"
},
{
src: "pwa-64x64.webp",
sizes: "64x64",
type: "image/webp",
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png"
},
],
{
src: "maskable-icon-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable"
}
]
},
workbox: {
globPatterns: ["**/*.{css,js,html,svg,webp,ico,txt,woff2}"],
Expand Down Expand Up @@ -149,11 +150,6 @@ const pwaConfig: PwaOptions = {
},
],
},
pwaAssets: {
config: true,
overrideManifestIcons: true,
injectThemeColor: true,
},
}

const themeConfig: DefaultTheme.Config = {
Expand Down Expand Up @@ -324,12 +320,12 @@ export default withPwa(
config: (md) => {
// @ts-expect-error TS2769
md.use(BiDirectionalLinks({
dir: "docs",
baseDir: "/",
}),
dir: "docs",
baseDir: "/",
}),
),
// @ts-expect-error TS2769
md.use(InlineLinkPreviewElementTransform)
// @ts-expect-error TS2769
md.use(InlineLinkPreviewElementTransform)
},
},

Expand All @@ -338,6 +334,8 @@ export default withPwa(
},

head: [
['link', { rel: 'icon', href: '/favicon.ico' }],
['link', { rel: 'apple-touch-icon', href: '/apple-touch-icon-180x180.png' }],
[
"script",
{
Expand Down
Binary file added docs/public/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/favicon.ico
Binary file not shown.
Binary file added docs/public/maskable-icon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/pwa-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/public/pwa-192x192.webp
Binary file not shown.
Binary file added docs/public/pwa-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/public/pwa-512x512.webp
Binary file not shown.
Binary file added docs/public/pwa-64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/public/pwa-64x64.webp
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"docs:eslint": "eslint --ignore-path .gitignore --ext .ts,.vue \".vitepress/**/*.{ts,vue}\"",
"docs:zhlint": "zhlint 'docs/**/*.md' --fix",
"docs:tsc": "tsc --build && vue-tsc --noEmit",
"prepare": "husky install"
"prepare": "husky install",
"generate-pwa-assets": "pwa-assets-generator --preset minimal-2023 docs/public/logo-new.webp"
},
"name": "mccrash-docs",
"version": "0.0.0",
Expand Down
28 changes: 0 additions & 28 deletions pwa-assets.config.ts

This file was deleted.

0 comments on commit f6a7c2f

Please sign in to comment.