From 50a0a9e24022717d4bb12be2fbf5cbe4b1e6a283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20M=C3=A4hr?= Date: Wed, 10 Jan 2024 09:32:28 +0100 Subject: [PATCH] User feedback: Navigation order and new window for external links (#49) * feat: sort navigation alphabetically * feat: remove unecessary preprocessing and update dependencies * feat: remove unnecessary options * ci: remove nasty workaround * chore: dependencies updated & formatting --- .github/workflows/sveltekitci.yml | 3 +- mdsvex.config.js | 11 +--- package.json | 4 +- pnpm-lock.yaml | 86 +++++----------------------- src/lib/components/Navigation.svelte | 4 +- svelte.config.js | 9 +-- 6 files changed, 22 insertions(+), 95 deletions(-) diff --git a/.github/workflows/sveltekitci.yml b/.github/workflows/sveltekitci.yml index 7dd0c58f..72b5a234 100644 --- a/.github/workflows/sveltekitci.yml +++ b/.github/workflows/sveltekitci.yml @@ -68,9 +68,8 @@ jobs: - name: Prebuild run: pnpm run prebuild - # FIXME: Remove timeout - name: Build - run: timeout 90 pnpm run build || true + run: pnpm run build - name: Postbuild if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' diff --git a/mdsvex.config.js b/mdsvex.config.js index 22b3fe65..0aaba164 100644 --- a/mdsvex.config.js +++ b/mdsvex.config.js @@ -1,10 +1,8 @@ import rehypeAutolinkHeadings from 'rehype-autolink-headings'; import rehypeSlug from 'rehype-slug'; import { defineMDSveXConfig as defineConfig } from 'mdsvex'; -import { rehypeMdsvexImageAutoimport } from 'rehype-mdsvex-image-autoimport'; import rehypeExternalLinks from 'rehype-external-links'; import remarkCaptions from 'remark-captions'; -import remarkUnwrapImages from 'remark-unwrap-images'; const config = defineConfig({ extensions: ['.svelte.md', '.md', '.svx'], @@ -13,13 +11,8 @@ const config = defineConfig({ dashes: 'oldschool' }, - remarkPlugins: [remarkCaptions, remarkUnwrapImages], - rehypePlugins: [ - rehypeExternalLinks, // Adds 'target' and 'rel' to external links - rehypeSlug, // Adds 'id' attributes to Headings (h1,h2,etc) - rehypeAutolinkHeadings, - rehypeMdsvexImageAutoimport - ] + remarkPlugins: [remarkCaptions], + rehypePlugins: [rehypeSlug, [rehypeExternalLinks, { target: '_blank' }], rehypeAutolinkHeadings] }); export default config; diff --git a/package.json b/package.json index d81a648d..eaf06db9 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@skeletonlabs/skeleton": "^2.7.0", "@skeletonlabs/tw-plugin": "^0.3.1", "@sveltejs/adapter-static": "^3.0.1", - "@sveltejs/kit": "^2.0.6", + "@sveltejs/kit": "^2.1.2", "@sveltejs/vite-plugin-svelte": "^3.0.1", "@tailwindcss/typography": "^0.5.10", "autoprefixer": "^10.4.16", @@ -52,10 +52,8 @@ "prettier-plugin-tailwindcss": "^0.5.11", "rehype-autolink-headings": "^7.1.0", "rehype-external-links": "^3.0.0", - "rehype-mdsvex-image-autoimport": "^1.1.0", "rehype-slug": "^6.0.0", "remark-captions": "^2.2.3", - "remark-unwrap-images": "^4.0.0", "svelte": "^4.2.8", "svelte-check": "^3.6.2", "svelte-maplibre": "^0.7.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c134da79..c6438c77 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,10 +19,10 @@ devDependencies: version: 0.3.1(tailwindcss@3.4.1) '@sveltejs/adapter-static': specifier: ^3.0.1 - version: 3.0.1(@sveltejs/kit@2.0.6) + version: 3.0.1(@sveltejs/kit@2.1.2) '@sveltejs/kit': - specifier: ^2.0.6 - version: 2.0.6(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.8)(vite@5.0.11) + specifier: ^2.1.2 + version: 2.1.2(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.8)(vite@5.0.11) '@sveltejs/vite-plugin-svelte': specifier: ^3.0.1 version: 3.0.1(svelte@4.2.8)(vite@5.0.11) @@ -80,18 +80,12 @@ devDependencies: rehype-external-links: specifier: ^3.0.0 version: 3.0.0 - rehype-mdsvex-image-autoimport: - specifier: ^1.1.0 - version: 1.1.0(mdsvex@0.11.0) rehype-slug: specifier: ^6.0.0 version: 6.0.0 remark-captions: specifier: ^2.2.3 version: 2.2.3 - remark-unwrap-images: - specifier: ^4.0.0 - version: 4.0.0 svelte: specifier: ^4.2.8 version: 4.2.8 @@ -975,16 +969,16 @@ packages: tailwindcss: 3.4.1 dev: true - /@sveltejs/adapter-static@3.0.1(@sveltejs/kit@2.0.6): + /@sveltejs/adapter-static@3.0.1(@sveltejs/kit@2.1.2): resolution: {integrity: sha512-6lMvf7xYEJ+oGeR5L8DFJJrowkefTK6ZgA4JiMqoClMkKq0s6yvsd3FZfCFvX1fQ0tpCD7fkuRVHsnUVgsHyNg==} peerDependencies: '@sveltejs/kit': ^2.0.0 dependencies: - '@sveltejs/kit': 2.0.6(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.8)(vite@5.0.11) + '@sveltejs/kit': 2.1.2(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.8)(vite@5.0.11) dev: true - /@sveltejs/kit@2.0.6(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.8)(vite@5.0.11): - resolution: {integrity: sha512-dnHtyjBLGXx+hrZQ9GuqLlSfTBixewJaByUVWai7LmB4dgV3FwkK155OltEgONDQW6KW64hLNS/uojdx3uC2/g==} + /@sveltejs/kit@2.1.2(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.8)(vite@5.0.11): + resolution: {integrity: sha512-xVzjhJwEhUN7qHQY3rqPZ3OZmTmCav6Dwl/QYgTSjkljOl7HC/G0UWyfEc83YvDT0YW5E8k5m+Rnc5KjLmTKnQ==} engines: {node: '>=18.13'} hasBin: true requiresBuild: true @@ -998,6 +992,7 @@ packages: cookie: 0.6.0 devalue: 4.3.2 esm-env: 1.0.0 + import-meta-resolve: 4.0.0 kleur: 4.1.5 magic-string: 0.30.5 mrmime: 2.0.0 @@ -1219,12 +1214,6 @@ packages: '@types/pbf': 3.0.5 dev: true - /@types/mdast@4.0.3: - resolution: {integrity: sha512-LsjtqsyF+d2/yFOYaN22dHZI1Cpwkrj+g06G8+qtUKlhovPW89YhqSnfKtMbkgmEtYpH2gydRNULd6y8mciAFg==} - dependencies: - '@types/unist': 3.0.2 - dev: true - /@types/pbf@3.0.5: resolution: {integrity: sha512-j3pOPiEcWZ34R6a6mN07mUkM4o4Lwf6hPNt8eilOeZhTFbxFXmKhvXl9Y28jotFPaI1bpPDJsbCprUoNke6OrA==} dev: true @@ -1505,7 +1494,7 @@ packages: hasBin: true dependencies: caniuse-lite: 1.0.30001576 - electron-to-chromium: 1.4.623 + electron-to-chromium: 1.4.625 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.22.2) dev: true @@ -1974,8 +1963,8 @@ packages: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true - /electron-to-chromium@1.4.623: - resolution: {integrity: sha512-lKoz10iCYlP1WtRYdh5MvocQPWVRoI7ysp6qf18bmeBgR8abE6+I2CsfyNKztRDZvhdWc+krKT6wS7Neg8sw3A==} + /electron-to-chromium@1.4.625: + resolution: {integrity: sha512-DENMhh3MFgaPDoXWrVIqSPInQoLImywfCwrSmVl3cf9QHzoZSiutHwGaB/Ql3VkqcQV30rzgdM+BjKqBAJxo5Q==} dev: true /emoji-regex@10.3.0: @@ -2534,12 +2523,6 @@ packages: '@types/hast': 3.0.3 dev: true - /hast-util-whitespace@3.0.0: - resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} - dependencies: - '@types/hast': 3.0.3 - dev: true - /html-encoding-sniffer@4.0.0: resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==} engines: {node: '>=18'} @@ -2634,6 +2617,10 @@ packages: resolve-from: 4.0.0 dev: true + /import-meta-resolve@4.0.0: + resolution: {integrity: sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==} + dev: true + /imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -3913,16 +3900,6 @@ packages: unist-util-visit: 5.0.0 dev: true - /rehype-mdsvex-image-autoimport@1.1.0(mdsvex@0.11.0): - resolution: {integrity: sha512-/QCHdtIOeeN0LWuaZghmyk2o/NyLz69cWEoBbF+/cipN7Z3U43HPZ4sXC/TN/goRJoNtEZlVz91TmTr2fFeLsA==} - peerDependencies: - mdsvex: ^0.9.8 - dependencies: - mdsvex: 0.11.0(svelte@4.2.8) - unist-util-visit: 4.1.2 - urijs: 1.19.11 - dev: true - /rehype-slug@6.0.0: resolution: {integrity: sha512-lWyvf/jwu+oS5+hL5eClVd3hNdmwM1kAC0BUvEGD19pajQMIzcNUd/k9GsfQ+FfECvX+JE+e9/btsKH0EjJT6A==} dependencies: @@ -3946,14 +3923,6 @@ packages: xtend: 4.0.2 dev: true - /remark-unwrap-images@4.0.0: - resolution: {integrity: sha512-Ilr5ZhrhZSvnjemy1rRuxlTC0I/39YyWDRiE9d5vF079APcwdYYzwcZL8RGehlCtQCiik8hWMyo4Xhz2Fq0JhA==} - dependencies: - '@types/mdast': 4.0.3 - hast-util-whitespace: 3.0.0 - unist-util-visit: 5.0.0 - dev: true - /require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} @@ -4792,12 +4761,6 @@ packages: resolution: {integrity: sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==} dev: true - /unist-util-is@5.2.1: - resolution: {integrity: sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==} - dependencies: - '@types/unist': 2.0.10 - dev: true - /unist-util-is@6.0.0: resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==} dependencies: @@ -4823,13 +4786,6 @@ packages: unist-util-is: 4.1.0 dev: true - /unist-util-visit-parents@5.1.3: - resolution: {integrity: sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==} - dependencies: - '@types/unist': 2.0.10 - unist-util-is: 5.2.1 - dev: true - /unist-util-visit-parents@6.0.1: resolution: {integrity: sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==} dependencies: @@ -4845,14 +4801,6 @@ packages: unist-util-visit-parents: 3.1.1 dev: true - /unist-util-visit@4.1.2: - resolution: {integrity: sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==} - dependencies: - '@types/unist': 2.0.10 - unist-util-is: 5.2.1 - unist-util-visit-parents: 5.1.3 - dev: true - /unist-util-visit@5.0.0: resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==} dependencies: @@ -4887,10 +4835,6 @@ packages: punycode: 2.3.1 dev: true - /urijs@1.19.11: - resolution: {integrity: sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==} - dev: true - /url-parse@1.5.10: resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} dependencies: diff --git a/src/lib/components/Navigation.svelte b/src/lib/components/Navigation.svelte index 1ae1b41d..a13a588e 100644 --- a/src/lib/components/Navigation.svelte +++ b/src/lib/components/Navigation.svelte @@ -7,9 +7,9 @@ const drawerClose = () => drawerStore.close(); const navItems = [ { label: 'Startseite', path: '/' }, - { label: 'Blog', path: '/blog' }, - { label: 'Bände', path: '/baende' }, { label: 'Agenda', path: '/agenda' }, + { label: 'Bände', path: '/baende' }, + { label: 'Blog', path: '/blog' }, { label: 'Partner', path: '/partner' }, { label: 'Projekt', path: '/projekt' }, { label: 'Über uns', path: '/ueber-uns' } diff --git a/svelte.config.js b/svelte.config.js index a8e44f3c..805046d6 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -19,14 +19,7 @@ const config = { // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. // If your environment is not supported or you settled on a specific environment, switch out the adapter. // See https://kit.svelte.dev/docs/adapters for more information about adapters. - adapter: adapter({ - // does not work with JamPack - // precompress: true - }), - // do abort on build errors - prerender: { - handleHttpError: 'fail' - } + adapter: adapter() } }; export default config;