From ff38a2cdac5f05b6ba7b69b625aab09879e69c85 Mon Sep 17 00:00:00 2001 From: prototypa Date: Sun, 6 Aug 2023 15:34:44 -0400 Subject: [PATCH 01/11] Remove astro-compress (was deleted from npm) until alternative --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 5d09291..531dd9a 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,6 @@ "@typescript-eslint/eslint-plugin": "^6.2.0", "@typescript-eslint/parser": "^6.2.0", "astro": "^2.9.3", - "astro-compress": "^1.1.50", "astro-icon": "^1.0.0-next.2", "eslint": "^8.45.0", "eslint-plugin-astro": "^0.27.2", From 632c2a84a74e91db60f3b2ad953941b816b3e559 Mon Sep 17 00:00:00 2001 From: prototypa Date: Sun, 6 Aug 2023 15:42:46 -0400 Subject: [PATCH 02/11] Remove astro-compress (was deleted from npm) until alternative --- astro.config.mjs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index 19d9c33..45b7e43 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -9,7 +9,7 @@ import image from '@astrojs/image'; import mdx from '@astrojs/mdx'; import icon from 'astro-icon'; import partytown from '@astrojs/partytown'; -import compress from 'astro-compress'; + import { readingTimeRemarkPlugin } from './src/utils/frontmatter.mjs'; import { SITE_CONFIG, ANALYTICS_CONFIG } from './src/utils/config.ts'; @@ -64,18 +64,6 @@ export default defineConfig({ config: { forward: ['dataLayer.push'] }, }) ), - - compress({ - css: true, - html: { - removeAttributeQuotes: false, - }, - img: false, - js: true, - svg: false, - - logger: 1, - }), ], markdown: { From 80291bb82480b3ec7a0e210f2dc31df4c8ce951d Mon Sep 17 00:00:00 2001 From: prototypa Date: Sun, 6 Aug 2023 15:52:20 -0400 Subject: [PATCH 03/11] Add setting compressHTML --- astro.config.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/astro.config.mjs b/astro.config.mjs index 45b7e43..47f76fe 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -29,6 +29,7 @@ export default defineConfig({ trailingSlash: SITE_CONFIG.trailingSlash ? 'always' : 'never', output: 'static', + compressHTML: true, integrations: [ tailwind({ From c4082cc10adf92ee9efda2253cdc5333bc19492f Mon Sep 17 00:00:00 2001 From: prototypa Date: Sun, 6 Aug 2023 15:54:09 -0400 Subject: [PATCH 04/11] Update dependencies (astro 2.10) --- package.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 531dd9a..f88953c 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "lint:eslint": "eslint . --ext .js,.ts,.astro" }, "devDependencies": { - "@astrojs/image": "^0.17.2", + "@astrojs/image": "^0.17.3", "@astrojs/mdx": "^0.19.7", "@astrojs/partytown": "^1.2.3", "@astrojs/rss": "^2.4.3", @@ -21,24 +21,24 @@ "@astrojs/tailwind": "^4.0.0", "@astrolib/analytics": "^0.3.0", "@astrolib/seo": "^0.4.0", - "@fontsource-variable/inter": "^5.0.5", - "@iconify-json/flat-color-icons": "^1.1.6", - "@iconify-json/ri": "^1.1.10", - "@iconify-json/tabler": "^1.1.85", + "@fontsource-variable/inter": "^5.0.8", + "@iconify-json/flat-color-icons": "^1.1.7", + "@iconify-json/ri": "^1.1.12", + "@iconify-json/tabler": "^1.1.87", "@tailwindcss/typography": "^0.5.9", "@types/lodash.merge": "^4.6.7", - "@typescript-eslint/eslint-plugin": "^6.2.0", - "@typescript-eslint/parser": "^6.2.0", - "astro": "^2.9.3", + "@typescript-eslint/eslint-plugin": "^6.2.1", + "@typescript-eslint/parser": "^6.2.1", + "astro": "^2.10.1", "astro-icon": "^1.0.0-next.2", - "eslint": "^8.45.0", - "eslint-plugin-astro": "^0.27.2", + "eslint": "^8.46.0", + "eslint-plugin-astro": "^0.28.0", "eslint-plugin-jsx-a11y": "^6.7.1", "js-yaml": "^4.1.0", "limax": "2.1.0", "lodash.merge": "^4.6.2", "mdast-util-to-string": "^4.0.0", - "prettier": "^3.0.0", + "prettier": "^3.0.1", "prettier-plugin-astro": "^0.11.0", "reading-time": "^1.5.0", "sharp": "^0.32.4", From de156f4b73564b86d354ef3ae20747465e30dfaa Mon Sep 17 00:00:00 2001 From: prototypa Date: Sun, 6 Aug 2023 15:54:49 -0400 Subject: [PATCH 05/11] Update message --- src/components/widgets/Announcement.astro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/widgets/Announcement.astro b/src/components/widgets/Announcement.astro index 673d2e8..ac59fc0 100644 --- a/src/components/widgets/Announcement.astro +++ b/src/components/widgets/Announcement.astro @@ -5,8 +5,8 @@ class="hidden md:block bg-blue-900 dark:bg-slate-800 dark:border-slate-800 dark:text-slate-400 border-b border-blue-900 text-sm px-3 py-2 text-gray-200 overflow-hidden whitespace-nowrap text-ellipsis not-prose" > NEW - Astro 2.9 is released. »Astro 2.10 is released. » Date: Sun, 6 Aug 2023 16:12:44 -0400 Subject: [PATCH 06/11] Update tailwind config for 4.x --- astro.config.mjs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index 47f76fe..18ab365 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -33,9 +33,7 @@ export default defineConfig({ integrations: [ tailwind({ - config: { - applyBaseStyles: false, - }, + applyBaseStyles: false }), sitemap(), image({ From 0853d9ef7513bee5a93547c323a645f5ea96d13c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20B?= <54446028+prototypa@users.noreply.github.com> Date: Sun, 6 Aug 2023 21:36:39 -0400 Subject: [PATCH 07/11] Update version to 0.9.9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f88953c..68a87d6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@onwidget/astrowind", "description": "A template to make your website using Astro + Tailwind CSS.", - "version": "0.9.8", + "version": "0.9.9", "private": true, "scripts": { "dev": "astro dev", From 259580062aedb53d0cba8616a7090742c07bb607 Mon Sep 17 00:00:00 2001 From: prototypa Date: Sun, 6 Aug 2023 22:05:30 -0400 Subject: [PATCH 08/11] Add support for new astro View Transitions --- astro.config.mjs | 4 ++++ src/layouts/Layout.astro | 3 +++ src/layouts/PageLayout.astro | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/astro.config.mjs b/astro.config.mjs index 18ab365..7f4cb66 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -69,6 +69,10 @@ export default defineConfig({ remarkPlugins: [readingTimeRemarkPlugin], }, + experimental: { + viewTransitions: true, + }, + vite: { resolve: { alias: { diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index a04140b..468cf72 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,4 +1,6 @@ --- +import { ViewTransitions } from 'astro:transitions'; + import '~/assets/styles/tailwind.css'; import { I18N_CONFIG } from "~/utils/config"; @@ -33,6 +35,7 @@ const { language, textDirection } = I18N_CONFIG; + diff --git a/src/layouts/PageLayout.astro b/src/layouts/PageLayout.astro index 7f5a47b..6e871b2 100644 --- a/src/layouts/PageLayout.astro +++ b/src/layouts/PageLayout.astro @@ -22,7 +22,7 @@ const { metadata } = Astro.props;
-
+
From 5ee7bd2a4f1661fd37600cc73510419ad7f4b5cc Mon Sep 17 00:00:00 2001 From: prototypa Date: Sun, 6 Aug 2023 23:53:23 -0400 Subject: [PATCH 09/11] Fix problem loading favicon.svg --- src/components/Favicons.astro | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Favicons.astro b/src/components/Favicons.astro index 062d3dc..748693a 100644 --- a/src/components/Favicons.astro +++ b/src/components/Favicons.astro @@ -1,8 +1,9 @@ --- import favIcon from '~/assets/favicons/favicon.ico'; import favIconSvg from '~/assets/favicons/favicon.svg'; + --- - - \ No newline at end of file + + \ No newline at end of file From 76e55f71154fb19b7f160fa0fc19c541f60583b9 Mon Sep 17 00:00:00 2001 From: prototypa Date: Mon, 7 Aug 2023 07:47:08 -0400 Subject: [PATCH 10/11] Revert (remove) astro View Transitions until stable --- astro.config.mjs | 4 ---- src/layouts/Layout.astro | 3 --- src/layouts/PageLayout.astro | 2 +- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index 7f4cb66..18ab365 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -69,10 +69,6 @@ export default defineConfig({ remarkPlugins: [readingTimeRemarkPlugin], }, - experimental: { - viewTransitions: true, - }, - vite: { resolve: { alias: { diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 468cf72..a04140b 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,6 +1,4 @@ --- -import { ViewTransitions } from 'astro:transitions'; - import '~/assets/styles/tailwind.css'; import { I18N_CONFIG } from "~/utils/config"; @@ -35,7 +33,6 @@ const { language, textDirection } = I18N_CONFIG; - diff --git a/src/layouts/PageLayout.astro b/src/layouts/PageLayout.astro index 6e871b2..7f5a47b 100644 --- a/src/layouts/PageLayout.astro +++ b/src/layouts/PageLayout.astro @@ -22,7 +22,7 @@ const { metadata } = Astro.props;
-
+
From 3ef024f14982556367cdb3b1b19b5cc580e6b819 Mon Sep 17 00:00:00 2001 From: prototypa Date: Mon, 7 Aug 2023 08:21:02 -0400 Subject: [PATCH 11/11] Allow child posts (or sub posts) --- src/utils/blog.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/blog.ts b/src/utils/blog.ts index c310966..5be45da 100644 --- a/src/utils/blog.ts +++ b/src/utils/blog.ts @@ -56,7 +56,7 @@ const getNormalizedPost = async (post: CollectionEntry<'post'>): Promise = metadata = {}, } = data; - const slug = cleanSlug(rawSlug.split('/').pop()); + const slug = cleanSlug(rawSlug); // cleanSlug(rawSlug.split('/').pop()); const publishDate = new Date(rawPublishDate); const updateDate = rawUpdateDate ? new Date(rawUpdateDate) : undefined; const category = rawCategory ? cleanSlug(rawCategory) : undefined;