From ec37c91520f1705e2b35494b3e3d2f0a14f0159f Mon Sep 17 00:00:00 2001 From: thehrz Date: Sat, 12 Aug 2023 23:04:22 +0800 Subject: [PATCH] pref: update layout --- package.json | 2 +- pnpm-lock.yaml | 210 +++++++++++++++++++----------------- src/composables/usePosts.ts | 5 +- src/main.ts | 2 +- tsconfig.json | 5 +- vite.config.ts | 5 +- 6 files changed, 119 insertions(+), 110 deletions(-) diff --git a/package.json b/package.json index ae3098c..11beed7 100644 --- a/package.json +++ b/package.json @@ -63,8 +63,8 @@ "vite-plugin-pages": "^0.31.0", "vite-plugin-vue-component-preview": "^1.1.6", "vite-plugin-vue-inspector": "^3.5.0", + "vite-plugin-vue-layouts": "^0.8.0", "vite-plugin-vue-markdown": "^0.23.7", - "vite-plugin-vue-meta-layouts": "^0.2.2", "vite-ssg": "^0.22.2", "vite-ssg-sitemap": "^0.5.1", "vitest": "^0.34.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 08c9f64..891bde1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -142,12 +142,12 @@ devDependencies: vite-plugin-vue-inspector: specifier: ^3.5.0 version: 3.5.0(vite@4.4.8) + vite-plugin-vue-layouts: + specifier: ^0.8.0 + version: 0.8.0(vite@4.4.8)(vue-router@4.2.4)(vue@3.3.4) vite-plugin-vue-markdown: specifier: ^0.23.7 version: 0.23.7(rollup@3.27.0)(vite@4.4.8) - vite-plugin-vue-meta-layouts: - specifier: ^0.2.2 - version: 0.2.2(vite@4.4.8)(vue-router@4.2.4) vite-ssg: specifier: ^0.22.2 version: 0.22.2(@vueuse/head@1.1.26)(critters@0.0.16)(vite@4.4.8)(vue-router@4.2.4)(vue@3.3.4) @@ -176,7 +176,7 @@ packages: '@jridgewell/trace-mapping': 0.3.18 dev: true - /@antfu/eslint-config-basic@0.40.0(@typescript-eslint/eslint-plugin@6.2.1)(@typescript-eslint/parser@6.2.1)(eslint@8.46.0)(typescript@5.1.6): + /@antfu/eslint-config-basic@0.40.0(@typescript-eslint/eslint-plugin@6.3.0)(@typescript-eslint/parser@6.3.0)(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-SAwz/0pVvGyWX4bpd2HpGw3Otl2SQu0ayGnuDgKTnolqYHQsVTHLMU7+keGP9hBLlyFAGz+keuNwgJz1K6NGdQ==} peerDependencies: eslint: '>=7.4.0' @@ -185,14 +185,14 @@ packages: eslint-plugin-antfu: 0.40.0(eslint@8.46.0)(typescript@5.1.6) eslint-plugin-eslint-comments: 3.2.0(eslint@8.46.0) eslint-plugin-html: 7.1.0 - eslint-plugin-import: /eslint-plugin-i@2.27.5-4(@typescript-eslint/parser@6.2.1)(eslint@8.46.0) + eslint-plugin-import: /eslint-plugin-i@2.27.5-4(@typescript-eslint/parser@6.3.0)(eslint@8.46.0) eslint-plugin-jsonc: 2.9.0(eslint@8.46.0) eslint-plugin-markdown: 3.0.1(eslint@8.46.0) eslint-plugin-n: 16.0.1(eslint@8.46.0) eslint-plugin-no-only-tests: 3.1.0 eslint-plugin-promise: 6.1.1(eslint@8.46.0) eslint-plugin-unicorn: 48.0.1(eslint@8.46.0) - eslint-plugin-unused-imports: 3.0.0(@typescript-eslint/eslint-plugin@6.2.1)(eslint@8.46.0) + eslint-plugin-unused-imports: 3.0.0(@typescript-eslint/eslint-plugin@6.3.0)(eslint@8.46.0) eslint-plugin-yml: 1.8.0(eslint@8.46.0) jsonc-eslint-parser: 2.3.0 yaml-eslint-parser: 1.2.2 @@ -211,11 +211,11 @@ packages: eslint: '>=7.4.0' typescript: '>=3.9' dependencies: - '@antfu/eslint-config-basic': 0.40.0(@typescript-eslint/eslint-plugin@6.2.1)(@typescript-eslint/parser@6.2.1)(eslint@8.46.0)(typescript@5.1.6) - '@typescript-eslint/eslint-plugin': 6.2.1(@typescript-eslint/parser@6.2.1)(eslint@8.46.0)(typescript@5.1.6) - '@typescript-eslint/parser': 6.2.1(eslint@8.46.0)(typescript@5.1.6) + '@antfu/eslint-config-basic': 0.40.0(@typescript-eslint/eslint-plugin@6.3.0)(@typescript-eslint/parser@6.3.0)(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/eslint-plugin': 6.3.0(@typescript-eslint/parser@6.3.0)(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.3.0(eslint@8.46.0)(typescript@5.1.6) eslint: 8.46.0 - eslint-plugin-jest: 27.2.3(@typescript-eslint/eslint-plugin@6.2.1)(eslint@8.46.0)(typescript@5.1.6) + eslint-plugin-jest: 27.2.3(@typescript-eslint/eslint-plugin@6.3.0)(eslint@8.46.0)(typescript@5.1.6) typescript: 5.1.6 transitivePeerDependencies: - eslint-import-resolver-typescript @@ -224,12 +224,12 @@ packages: - supports-color dev: true - /@antfu/eslint-config-vue@0.40.0(@typescript-eslint/eslint-plugin@6.2.1)(@typescript-eslint/parser@6.2.1)(eslint@8.46.0)(typescript@5.1.6): + /@antfu/eslint-config-vue@0.40.0(@typescript-eslint/eslint-plugin@6.3.0)(@typescript-eslint/parser@6.3.0)(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-9SVPincP0FkVqkwYKe2qadfQZflOUFLVFEYJSAMIcfupz3gezjTJSTzdIQocep+DECB9Lt0n1Qkx/w2thr+QFw==} peerDependencies: eslint: '>=7.4.0' dependencies: - '@antfu/eslint-config-basic': 0.40.0(@typescript-eslint/eslint-plugin@6.2.1)(@typescript-eslint/parser@6.2.1)(eslint@8.46.0)(typescript@5.1.6) + '@antfu/eslint-config-basic': 0.40.0(@typescript-eslint/eslint-plugin@6.3.0)(@typescript-eslint/parser@6.3.0)(eslint@8.46.0)(typescript@5.1.6) '@antfu/eslint-config-ts': 0.40.0(eslint@8.46.0)(typescript@5.1.6) eslint: 8.46.0 eslint-plugin-vue: 9.16.1(eslint@8.46.0) @@ -249,13 +249,13 @@ packages: peerDependencies: eslint: '>=7.4.0' dependencies: - '@antfu/eslint-config-vue': 0.40.0(@typescript-eslint/eslint-plugin@6.2.1)(@typescript-eslint/parser@6.2.1)(eslint@8.46.0)(typescript@5.1.6) - '@typescript-eslint/eslint-plugin': 6.2.1(@typescript-eslint/parser@6.2.1)(eslint@8.46.0)(typescript@5.1.6) - '@typescript-eslint/parser': 6.2.1(eslint@8.46.0)(typescript@5.1.6) + '@antfu/eslint-config-vue': 0.40.0(@typescript-eslint/eslint-plugin@6.3.0)(@typescript-eslint/parser@6.3.0)(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/eslint-plugin': 6.3.0(@typescript-eslint/parser@6.3.0)(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.3.0(eslint@8.46.0)(typescript@5.1.6) eslint: 8.46.0 eslint-plugin-eslint-comments: 3.2.0(eslint@8.46.0) eslint-plugin-html: 7.1.0 - eslint-plugin-import: /eslint-plugin-i@2.27.5-4(@typescript-eslint/parser@6.2.1)(eslint@8.46.0) + eslint-plugin-import: /eslint-plugin-i@2.27.5-4(@typescript-eslint/parser@6.3.0)(eslint@8.46.0) eslint-plugin-jsonc: 2.9.0(eslint@8.46.0) eslint-plugin-n: 16.0.1(eslint@8.46.0) eslint-plugin-promise: 6.1.1(eslint@8.46.0) @@ -307,13 +307,13 @@ packages: '@ampproject/remapping': 2.2.1 '@babel/code-frame': 7.22.5 '@babel/generator': 7.22.9 - '@babel/helper-compilation-targets': 7.22.9(@babel/core@7.22.9) + '@babel/helper-compilation-targets': 7.22.10 '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.9) '@babel/helpers': 7.22.6 '@babel/parser': 7.22.7 '@babel/template': 7.22.5 '@babel/traverse': 7.22.8 - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 convert-source-map: 1.9.0 debug: 4.3.4(supports-color@8.1.1) gensync: 1.0.0-beta.2 @@ -327,7 +327,7 @@ packages: resolution: {integrity: sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.18 jsesc: 2.5.2 @@ -337,17 +337,14 @@ packages: resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true - /@babel/helper-compilation-targets@7.22.9(@babel/core@7.22.9): - resolution: {integrity: sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw==} + /@babel/helper-compilation-targets@7.22.10: + resolution: {integrity: sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 dependencies: '@babel/compat-data': 7.22.9 - '@babel/core': 7.22.9 '@babel/helper-validator-option': 7.22.5 browserslist: 4.21.10 lru-cache: 5.1.1 @@ -382,28 +379,28 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.5 - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-member-expression-to-functions@7.22.5: resolution: {integrity: sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-module-imports@7.22.5: resolution: {integrity: sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-module-transforms@7.22.9(@babel/core@7.22.9): @@ -424,7 +421,7 @@ packages: resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-plugin-utils@7.22.5: @@ -448,21 +445,21 @@ packages: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-skip-transparent-expression-wrappers@7.22.5: resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-split-export-declaration@7.22.6: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-string-parser@7.22.5: @@ -484,7 +481,7 @@ packages: dependencies: '@babel/template': 7.22.5 '@babel/traverse': 7.22.8 - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 transitivePeerDependencies: - supports-color dev: true @@ -553,7 +550,7 @@ packages: dependencies: '@babel/code-frame': 7.22.5 '@babel/parser': 7.22.7 - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/traverse@7.22.8: @@ -567,13 +564,22 @@ packages: '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.22.7 - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 debug: 4.3.4(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color dev: true + /@babel/types@7.22.10: + resolution: {integrity: sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.22.5 + '@babel/helper-validator-identifier': 7.22.5 + to-fast-properties: 2.0.0 + dev: true + /@babel/types@7.22.5: resolution: {integrity: sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==} engines: {node: '>=6.9.0'} @@ -1582,12 +1588,12 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 16.18.39 + '@types/node': 20.4.6 dev: true optional: true - /@typescript-eslint/eslint-plugin@6.2.1(@typescript-eslint/parser@6.2.1)(eslint@8.46.0)(typescript@5.1.6): - resolution: {integrity: sha512-iZVM/ALid9kO0+I81pnp1xmYiFyqibAHzrqX4q5YvvVEyJqY+e6rfTXSCsc2jUxGNqJqTfFSSij/NFkZBiBzLw==} + /@typescript-eslint/eslint-plugin@6.3.0(@typescript-eslint/parser@6.3.0)(eslint@8.46.0)(typescript@5.1.6): + resolution: {integrity: sha512-IZYjYZ0ifGSLZbwMqIip/nOamFiWJ9AH+T/GYNZBWkVcyNQOFGtSMoWV7RvY4poYCMZ/4lHzNl796WOSNxmk8A==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha @@ -1598,11 +1604,11 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.6.2 - '@typescript-eslint/parser': 6.2.1(eslint@8.46.0)(typescript@5.1.6) - '@typescript-eslint/scope-manager': 6.2.1 - '@typescript-eslint/type-utils': 6.2.1(eslint@8.46.0)(typescript@5.1.6) - '@typescript-eslint/utils': 6.2.1(eslint@8.46.0)(typescript@5.1.6) - '@typescript-eslint/visitor-keys': 6.2.1 + '@typescript-eslint/parser': 6.3.0(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/scope-manager': 6.3.0 + '@typescript-eslint/type-utils': 6.3.0(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/utils': 6.3.0(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/visitor-keys': 6.3.0 debug: 4.3.4(supports-color@8.1.1) eslint: 8.46.0 graphemer: 1.4.0 @@ -1616,8 +1622,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@6.2.1(eslint@8.46.0)(typescript@5.1.6): - resolution: {integrity: sha512-Ld+uL1kYFU8e6btqBFpsHkwQ35rw30IWpdQxgOqOh4NfxSDH6uCkah1ks8R/RgQqI5hHPXMaLy9fbFseIe+dIg==} + /@typescript-eslint/parser@6.3.0(eslint@8.46.0)(typescript@5.1.6): + resolution: {integrity: sha512-ibP+y2Gr6p0qsUkhs7InMdXrwldjxZw66wpcQq9/PzAroM45wdwyu81T+7RibNCh8oc0AgrsyCwJByncY0Ongg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1626,10 +1632,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.2.1 - '@typescript-eslint/types': 6.2.1 - '@typescript-eslint/typescript-estree': 6.2.1(typescript@5.1.6) - '@typescript-eslint/visitor-keys': 6.2.1 + '@typescript-eslint/scope-manager': 6.3.0 + '@typescript-eslint/types': 6.3.0 + '@typescript-eslint/typescript-estree': 6.3.0(typescript@5.1.6) + '@typescript-eslint/visitor-keys': 6.3.0 debug: 4.3.4(supports-color@8.1.1) eslint: 8.46.0 typescript: 5.1.6 @@ -1645,16 +1651,16 @@ packages: '@typescript-eslint/visitor-keys': 5.62.0 dev: true - /@typescript-eslint/scope-manager@6.2.1: - resolution: {integrity: sha512-UCqBF9WFqv64xNsIEPfBtenbfodPXsJ3nPAr55mGPkQIkiQvgoWNo+astj9ZUfJfVKiYgAZDMnM6dIpsxUMp3Q==} + /@typescript-eslint/scope-manager@6.3.0: + resolution: {integrity: sha512-WlNFgBEuGu74ahrXzgefiz/QlVb+qg8KDTpknKwR7hMH+lQygWyx0CQFoUmMn1zDkQjTBBIn75IxtWss77iBIQ==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.2.1 - '@typescript-eslint/visitor-keys': 6.2.1 + '@typescript-eslint/types': 6.3.0 + '@typescript-eslint/visitor-keys': 6.3.0 dev: true - /@typescript-eslint/type-utils@6.2.1(eslint@8.46.0)(typescript@5.1.6): - resolution: {integrity: sha512-fTfCgomBMIgu2Dh2Or3gMYgoNAnQm3RLtRp+jP7A8fY+LJ2+9PNpi5p6QB5C4RSP+U3cjI0vDlI3mspAkpPVbQ==} + /@typescript-eslint/type-utils@6.3.0(eslint@8.46.0)(typescript@5.1.6): + resolution: {integrity: sha512-7Oj+1ox1T2Yc8PKpBvOKWhoI/4rWFd1j7FA/rPE0lbBPXTKjdbtC+7Ev0SeBjEKkIhKWVeZSP+mR7y1Db1CdfQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1663,8 +1669,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.2.1(typescript@5.1.6) - '@typescript-eslint/utils': 6.2.1(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 6.3.0(typescript@5.1.6) + '@typescript-eslint/utils': 6.3.0(eslint@8.46.0)(typescript@5.1.6) debug: 4.3.4(supports-color@8.1.1) eslint: 8.46.0 ts-api-utils: 1.0.1(typescript@5.1.6) @@ -1678,8 +1684,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/types@6.2.1: - resolution: {integrity: sha512-528bGcoelrpw+sETlyM91k51Arl2ajbNT9L4JwoXE2dvRe1yd8Q64E4OL7vHYw31mlnVsf+BeeLyAZUEQtqahQ==} + /@typescript-eslint/types@6.3.0: + resolution: {integrity: sha512-K6TZOvfVyc7MO9j60MkRNWyFSf86IbOatTKGrpTQnzarDZPYPVy0oe3myTMq7VjhfsUAbNUW8I5s+2lZvtx1gg==} engines: {node: ^16.0.0 || >=18.0.0} dev: true @@ -1704,8 +1710,8 @@ packages: - supports-color dev: true - /@typescript-eslint/typescript-estree@6.2.1(typescript@5.1.6): - resolution: {integrity: sha512-G+UJeQx9AKBHRQBpmvr8T/3K5bJa485eu+4tQBxFq0KoT22+jJyzo1B50JDT9QdC1DEmWQfdKsa8ybiNWYsi0Q==} + /@typescript-eslint/typescript-estree@6.3.0(typescript@5.1.6): + resolution: {integrity: sha512-Xh4NVDaC4eYKY4O3QGPuQNp5NxBAlEvNQYOqJquR2MePNxO11E5K3t5x4M4Mx53IZvtpW+mBxIT0s274fLUocg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -1713,8 +1719,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.2.1 - '@typescript-eslint/visitor-keys': 6.2.1 + '@typescript-eslint/types': 6.3.0 + '@typescript-eslint/visitor-keys': 6.3.0 debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 @@ -1745,8 +1751,8 @@ packages: - typescript dev: true - /@typescript-eslint/utils@6.2.1(eslint@8.46.0)(typescript@5.1.6): - resolution: {integrity: sha512-eBIXQeupYmxVB6S7x+B9SdBeB6qIdXKjgQBge2J+Ouv8h9Cxm5dHf/gfAZA6dkMaag+03HdbVInuXMmqFB/lKQ==} + /@typescript-eslint/utils@6.3.0(eslint@8.46.0)(typescript@5.1.6): + resolution: {integrity: sha512-hLLg3BZE07XHnpzglNBG8P/IXq/ZVXraEbgY7FM0Cnc1ehM8RMdn9mat3LubJ3KBeYXXPxV1nugWbQPjGeJk6Q==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1754,9 +1760,9 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 6.2.1 - '@typescript-eslint/types': 6.2.1 - '@typescript-eslint/typescript-estree': 6.2.1(typescript@5.1.6) + '@typescript-eslint/scope-manager': 6.3.0 + '@typescript-eslint/types': 6.3.0 + '@typescript-eslint/typescript-estree': 6.3.0(typescript@5.1.6) eslint: 8.46.0 semver: 7.5.4 transitivePeerDependencies: @@ -1772,11 +1778,11 @@ packages: eslint-visitor-keys: 3.4.2 dev: true - /@typescript-eslint/visitor-keys@6.2.1: - resolution: {integrity: sha512-iTN6w3k2JEZ7cyVdZJTVJx2Lv7t6zFA8DCrJEHD2mwfc16AEvvBWVhbFh34XyG2NORCd0viIgQY1+u7kPI0WpA==} + /@typescript-eslint/visitor-keys@6.3.0: + resolution: {integrity: sha512-kEhRRj7HnvaSjux1J9+7dBen15CdWmDnwrpyiHsFX6Qx2iW5LOBUgNefOFeh2PjWPlNwN8TOn6+4eBU3J/gupw==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.2.1 + '@typescript-eslint/types': 6.3.0 eslint-visitor-keys: 3.4.2 dev: true @@ -2095,7 +2101,7 @@ packages: resolution: {integrity: sha512-XcDZhJrY87VNfWuo9Z6qy1BY5CArT2Qjn/V+VcKNHLrBQ2UmSg6qKhdANzWXihXjAA8z9jHP+MLwbn+nAYo7Bw==} engines: {node: '>=16.14.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 '@vue-macros/common': 1.6.2(rollup@3.27.0)(vue@3.3.4) resolve.exports: 2.0.2 transitivePeerDependencies: @@ -2135,7 +2141,7 @@ packages: vue: optional: true dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 '@rollup/pluginutils': 5.0.2(rollup@3.27.0) '@vue/compiler-sfc': 3.3.4 ast-kit: 0.9.4(rollup@3.27.0) @@ -2429,7 +2435,7 @@ packages: '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.9) '@babel/template': 7.22.5 '@babel/traverse': 7.22.8 - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 '@vue/babel-helper-vue-transform-on': 1.1.5 camelcase: 6.3.0 html-tags: 3.3.1 @@ -2834,7 +2840,7 @@ packages: engines: {node: '>=16.14.0'} dependencies: '@babel/parser': 7.22.7 - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /astral-regex@2.0.0: @@ -3912,12 +3918,12 @@ packages: dependencies: debug: 3.2.7(supports-color@8.1.1) is-core-module: 2.12.1 - resolve: 1.22.2 + resolve: 1.22.3 transitivePeerDependencies: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.2.1)(eslint-import-resolver-node@0.3.7)(eslint@8.46.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.3.0)(eslint-import-resolver-node@0.3.7)(eslint@8.46.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -3938,7 +3944,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.2.1(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.3.0(eslint@8.46.0)(typescript@5.1.6) debug: 3.2.7(supports-color@8.1.1) eslint: 8.46.0 eslint-import-resolver-node: 0.3.7 @@ -3949,7 +3955,7 @@ packages: /eslint-plugin-antfu@0.40.0(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-2L218fh+ILn+SC0vbIgoK1UCP5XVoCHqm3fJskLfpYJYjjm4BEaqEWKhmTOX0V1tDeySSbTEuInfALpfZry3Aw==} dependencies: - '@typescript-eslint/utils': 6.2.1(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/utils': 6.3.0(eslint@8.46.0)(typescript@5.1.6) transitivePeerDependencies: - eslint - supports-color @@ -3993,7 +3999,7 @@ packages: htmlparser2: 8.0.2 dev: true - /eslint-plugin-i@2.27.5-4(@typescript-eslint/parser@6.2.1)(eslint@8.46.0): + /eslint-plugin-i@2.27.5-4(@typescript-eslint/parser@6.3.0)(eslint@8.46.0): resolution: {integrity: sha512-X3Z+dp9nZw7d/y41EDO6JyFw4WVMOT91SFuoJvL0C0/4M1l6NxQ5mLTjXHuYhq0AazW75pAmj25yMk5wPMzjsw==} engines: {node: '>=12'} peerDependencies: @@ -4003,7 +4009,7 @@ packages: doctrine: 2.1.0 eslint: 8.46.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.2.1)(eslint-import-resolver-node@0.3.7)(eslint@8.46.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.3.0)(eslint-import-resolver-node@0.3.7)(eslint@8.46.0) get-tsconfig: 4.6.2 is-glob: 4.0.3 minimatch: 3.1.2 @@ -4016,7 +4022,7 @@ packages: - supports-color dev: true - /eslint-plugin-jest@27.2.3(@typescript-eslint/eslint-plugin@6.2.1)(eslint@8.46.0)(typescript@5.1.6): + /eslint-plugin-jest@27.2.3(@typescript-eslint/eslint-plugin@6.3.0)(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-sRLlSCpICzWuje66Gl9zvdF6mwD5X86I4u55hJyFBsxYOsBCmT5+kSUjf+fkFWVMMgpzNEupjW8WzUqi83hJAQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -4029,7 +4035,7 @@ packages: jest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 6.2.1(@typescript-eslint/parser@6.2.1)(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/eslint-plugin': 6.3.0(@typescript-eslint/parser@6.3.0)(eslint@8.46.0)(typescript@5.1.6) '@typescript-eslint/utils': 5.62.0(eslint@8.46.0)(typescript@5.1.6) eslint: 8.46.0 transitivePeerDependencies: @@ -4074,7 +4080,7 @@ packages: ignore: 5.2.4 is-core-module: 2.12.1 minimatch: 3.1.2 - resolve: 1.22.2 + resolve: 1.22.3 semver: 7.5.4 dev: true @@ -4116,7 +4122,7 @@ packages: strip-indent: 3.0.0 dev: true - /eslint-plugin-unused-imports@3.0.0(@typescript-eslint/eslint-plugin@6.2.1)(eslint@8.46.0): + /eslint-plugin-unused-imports@3.0.0(@typescript-eslint/eslint-plugin@6.3.0)(eslint@8.46.0): resolution: {integrity: sha512-sduiswLJfZHeeBJ+MQaG+xYzSWdRXoSw61DpU13mzWumCkR0ufD0HmO4kdNokjrkluMHpj/7PJeN35pgbhW3kw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -4126,7 +4132,7 @@ packages: '@typescript-eslint/eslint-plugin': optional: true dependencies: - '@typescript-eslint/eslint-plugin': 6.2.1(@typescript-eslint/parser@6.2.1)(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/eslint-plugin': 6.3.0(@typescript-eslint/parser@6.3.0)(eslint@8.46.0)(typescript@5.1.6) eslint: 8.46.0 eslint-rule-composer: 0.3.0 dev: true @@ -6109,7 +6115,7 @@ packages: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: hosted-git-info: 2.8.9 - resolve: 1.22.2 + resolve: 1.22.3 semver: 5.7.2 validate-npm-package-license: 3.0.4 dev: true @@ -7995,6 +8001,23 @@ packages: - supports-color dev: true + /vite-plugin-vue-layouts@0.8.0(vite@4.4.8)(vue-router@4.2.4)(vue@3.3.4): + resolution: {integrity: sha512-UZW2nSV2LraTSe7gsAL46hfdi7a0X1RvkGGoJVtA2O8beu7anzpXFwQLou8+kHy31CzVycT4gIPySBsHhtBN5g==} + peerDependencies: + vite: ^2.5.0 || ^3.0.0-0 || ^4.0.0 + vue: ^2.6.12 || ^3.2.4 + vue-router: ^3.5.1 || ^4.0.11 + dependencies: + '@vue/compiler-sfc': 3.3.4 + debug: 4.3.4(supports-color@8.1.1) + fast-glob: 3.3.1 + vite: 4.4.8(@types/node@20.4.6) + vue: 3.3.4 + vue-router: 4.2.4(vue@3.3.4) + transitivePeerDependencies: + - supports-color + dev: true + /vite-plugin-vue-markdown@0.22.6(rollup@3.27.0)(vite@4.4.8): resolution: {integrity: sha512-BB0/yYoRO+4hceFZRgU/iAOpgklFvo/eHLapOkavIoDkP0jeoQubOMTEF8K4FuYRX9jaN5WcP2TrfhUgc7RuUg==} peerDependencies: @@ -8029,17 +8052,6 @@ packages: - rollup dev: true - /vite-plugin-vue-meta-layouts@0.2.2(vite@4.4.8)(vue-router@4.2.4): - resolution: {integrity: sha512-u3WHlSzqE7tfOFFN7IygkQXDgnhVYD+GSfSXeMk1m/xI/gMtJtLeVwjBTow4kOn3oEkJcj/I9yCZoWpQeRHTFw==} - peerDependencies: - vite: '>=2.0.0' - vue-router: '>=4.0.14' - dependencies: - local-pkg: 0.4.3 - vite: 4.4.8(@types/node@20.4.6) - vue-router: 4.2.4(vue@3.3.4) - dev: true - /vite-plugin-vuetify@1.0.2(vite@4.4.8)(vue@3.3.4)(vuetify@3.3.11): resolution: {integrity: sha512-MubIcKD33O8wtgQXlbEXE7ccTEpHZ8nPpe77y9Wy3my2MWw/PgehP9VqTp92BLqr0R1dSL970Lynvisx3UxBFw==} engines: {node: '>=12'} diff --git a/src/composables/usePosts.ts b/src/composables/usePosts.ts index fc14203..f19b3de 100644 --- a/src/composables/usePosts.ts +++ b/src/composables/usePosts.ts @@ -1,4 +1,3 @@ -import { createGetRoutes } from 'virtual:meta-layouts' import type { RouteMeta } from 'vue-router' import type { Post } from '~/common/interfaces/Post' @@ -13,8 +12,8 @@ type Meta = { export default (): Post[] => { const router = useRouter() - const routes = createGetRoutes(router)().filter((route) => { - return route.path.startsWith('/posts/') + const routes = router.getRoutes().filter((route) => { + return route.path.startsWith('/posts/') && route.children.length }) return routes.map((route) => { diff --git a/src/main.ts b/src/main.ts index 52ccdd6..fdf89ed 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,5 @@ import { ViteSSG } from 'vite-ssg' -import { setupLayouts } from 'virtual:meta-layouts' +import { setupLayouts } from 'virtual:generated-layouts' import generatedRoutes from 'virtual:generated-pages' import App from './App.vue' diff --git a/tsconfig.json b/tsconfig.json index 34368cc..cf87979 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,7 @@ "esModuleInterop": true, "jsx": "preserve", "skipLibCheck": true, - "moduleResolution": "bundler", + "moduleResolution": "node", "resolveJsonModule": true, "noUnusedLocals": true, "strictNullChecks": true, @@ -19,10 +19,9 @@ "vite/client", "vue/ref-macros", "vite-plugin-vue-component-preview/client", - // "vite-plugin-vue-layouts/client", + "vite-plugin-vue-layouts/client", "vite-plugin-pages/client", "unplugin-vue-macros/macros-global", - "vite-plugin-vue-meta-layouts/client.d.ts" ], "paths": { "~/*": ["src/*"] diff --git a/vite.config.ts b/vite.config.ts index 40bcf21..277850c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -7,9 +7,8 @@ import Pages from 'vite-plugin-pages' import generateSitemap from 'vite-ssg-sitemap' import MarkdownIt from 'markdown-it' -// import Layouts from 'vite-plugin-vue-layouts' +import Layouts from 'vite-plugin-vue-layouts' import { Vuetify3Resolver } from 'unplugin-vue-components/resolvers' -import MetaLayouts from 'vite-plugin-vue-meta-layouts' import Components from 'unplugin-vue-components/vite' import AutoImport from 'unplugin-auto-import/vite' import Markdown from 'vite-plugin-vue-markdown' @@ -69,7 +68,7 @@ export default defineConfig({ }), // https://github.com/JohnCampionJr/vite-plugin-vue-layouts - MetaLayouts(), + Layouts(), // https://github.com/antfu/unplugin-auto-import AutoImport({