Merge branch 'main' of https://github.com/widgeter/astrowind
This commit is contained in:
@ -9,7 +9,7 @@ import image from '@astrojs/image';
|
|||||||
import mdx from '@astrojs/mdx';
|
import mdx from '@astrojs/mdx';
|
||||||
import icon from 'astro-icon';
|
import icon from 'astro-icon';
|
||||||
import partytown from '@astrojs/partytown';
|
import partytown from '@astrojs/partytown';
|
||||||
import compress from 'astro-compress';
|
|
||||||
import { readingTimeRemarkPlugin } from './src/utils/frontmatter.mjs';
|
import { readingTimeRemarkPlugin } from './src/utils/frontmatter.mjs';
|
||||||
|
|
||||||
import { SITE_CONFIG, ANALYTICS_CONFIG } from './src/utils/config.ts';
|
import { SITE_CONFIG, ANALYTICS_CONFIG } from './src/utils/config.ts';
|
||||||
@ -29,12 +29,11 @@ export default defineConfig({
|
|||||||
trailingSlash: SITE_CONFIG.trailingSlash ? 'always' : 'never',
|
trailingSlash: SITE_CONFIG.trailingSlash ? 'always' : 'never',
|
||||||
|
|
||||||
output: 'static',
|
output: 'static',
|
||||||
|
compressHTML: true,
|
||||||
|
|
||||||
integrations: [
|
integrations: [
|
||||||
tailwind({
|
tailwind({
|
||||||
config: {
|
applyBaseStyles: false
|
||||||
applyBaseStyles: false,
|
|
||||||
},
|
|
||||||
}),
|
}),
|
||||||
sitemap(),
|
sitemap(),
|
||||||
image({
|
image({
|
||||||
@ -64,18 +63,6 @@ export default defineConfig({
|
|||||||
config: { forward: ['dataLayer.push'] },
|
config: { forward: ['dataLayer.push'] },
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
|
|
||||||
compress({
|
|
||||||
css: true,
|
|
||||||
html: {
|
|
||||||
removeAttributeQuotes: false,
|
|
||||||
},
|
|
||||||
img: false,
|
|
||||||
js: true,
|
|
||||||
svg: false,
|
|
||||||
|
|
||||||
logger: 1,
|
|
||||||
}),
|
|
||||||
],
|
],
|
||||||
|
|
||||||
markdown: {
|
markdown: {
|
||||||
|
25
package.json
25
package.json
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@onwidget/astrowind",
|
"name": "@onwidget/astrowind",
|
||||||
"description": "A template to make your website using Astro + Tailwind CSS.",
|
"description": "A template to make your website using Astro + Tailwind CSS.",
|
||||||
"version": "0.9.8",
|
"version": "0.9.9",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
@ -13,7 +13,7 @@
|
|||||||
"lint:eslint": "eslint . --ext .js,.ts,.astro"
|
"lint:eslint": "eslint . --ext .js,.ts,.astro"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@astrojs/image": "^0.17.2",
|
"@astrojs/image": "^0.17.3",
|
||||||
"@astrojs/mdx": "^0.19.7",
|
"@astrojs/mdx": "^0.19.7",
|
||||||
"@astrojs/partytown": "^1.2.3",
|
"@astrojs/partytown": "^1.2.3",
|
||||||
"@astrojs/rss": "^2.4.3",
|
"@astrojs/rss": "^2.4.3",
|
||||||
@ -21,25 +21,24 @@
|
|||||||
"@astrojs/tailwind": "^4.0.0",
|
"@astrojs/tailwind": "^4.0.0",
|
||||||
"@astrolib/analytics": "^0.3.0",
|
"@astrolib/analytics": "^0.3.0",
|
||||||
"@astrolib/seo": "^0.4.0",
|
"@astrolib/seo": "^0.4.0",
|
||||||
"@fontsource-variable/inter": "^5.0.5",
|
"@fontsource-variable/inter": "^5.0.8",
|
||||||
"@iconify-json/flat-color-icons": "^1.1.6",
|
"@iconify-json/flat-color-icons": "^1.1.7",
|
||||||
"@iconify-json/ri": "^1.1.10",
|
"@iconify-json/ri": "^1.1.12",
|
||||||
"@iconify-json/tabler": "^1.1.85",
|
"@iconify-json/tabler": "^1.1.87",
|
||||||
"@tailwindcss/typography": "^0.5.9",
|
"@tailwindcss/typography": "^0.5.9",
|
||||||
"@types/lodash.merge": "^4.6.7",
|
"@types/lodash.merge": "^4.6.7",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
"@typescript-eslint/eslint-plugin": "^6.2.1",
|
||||||
"@typescript-eslint/parser": "^6.2.0",
|
"@typescript-eslint/parser": "^6.2.1",
|
||||||
"astro": "^2.9.3",
|
"astro": "^2.10.1",
|
||||||
"astro-compress": "^1.1.50",
|
|
||||||
"astro-icon": "^1.0.0-next.2",
|
"astro-icon": "^1.0.0-next.2",
|
||||||
"eslint": "^8.45.0",
|
"eslint": "^8.46.0",
|
||||||
"eslint-plugin-astro": "^0.27.2",
|
"eslint-plugin-astro": "^0.28.0",
|
||||||
"eslint-plugin-jsx-a11y": "^6.7.1",
|
"eslint-plugin-jsx-a11y": "^6.7.1",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"limax": "2.1.0",
|
"limax": "2.1.0",
|
||||||
"lodash.merge": "^4.6.2",
|
"lodash.merge": "^4.6.2",
|
||||||
"mdast-util-to-string": "^4.0.0",
|
"mdast-util-to-string": "^4.0.0",
|
||||||
"prettier": "^3.0.0",
|
"prettier": "^3.0.1",
|
||||||
"prettier-plugin-astro": "^0.11.0",
|
"prettier-plugin-astro": "^0.11.0",
|
||||||
"reading-time": "^1.5.0",
|
"reading-time": "^1.5.0",
|
||||||
"sharp": "^0.32.4",
|
"sharp": "^0.32.4",
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
---
|
---
|
||||||
import favIcon from '~/assets/favicons/favicon.ico';
|
import favIcon from '~/assets/favicons/favicon.ico';
|
||||||
import favIconSvg from '~/assets/favicons/favicon.svg';
|
import favIconSvg from '~/assets/favicons/favicon.svg';
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<link rel="shortcut icon" href={favIcon} />
|
<link rel="shortcut icon" href={favIcon} />
|
||||||
<link rel="icon" type="image/svg+xml" href={favIcon} />
|
<link rel="icon" type="image/svg+xml" href={favIconSvg.src} />
|
||||||
<link rel="mask-icon" href={String(favIconSvg)} color="#8D46E7" />
|
<link rel="mask-icon" href={favIconSvg.src} color="#8D46E7" />
|
@ -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"
|
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"
|
||||||
>
|
>
|
||||||
<span class="text-xs py-0.5 px-1 bg-primary dark:bg-slate-700 dark:text-slate-300 font-semibold">NEW</span>
|
<span class="text-xs py-0.5 px-1 bg-primary dark:bg-slate-700 dark:text-slate-300 font-semibold">NEW</span>
|
||||||
<a href="https://astro.build/blog/astro-290/" class="hover:underline text-gray-200 dark:text-slate-400"
|
<a href="https://astro.build/blog/astro-2100/" class="hover:underline text-gray-200 dark:text-slate-400"
|
||||||
>Astro 2.9 is released. »</a
|
>Astro 2.10 is released. »</a
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
@ -56,7 +56,7 @@ const getNormalizedPost = async (post: CollectionEntry<'post'>): Promise<Post> =
|
|||||||
metadata = {},
|
metadata = {},
|
||||||
} = data;
|
} = data;
|
||||||
|
|
||||||
const slug = cleanSlug(rawSlug.split('/').pop());
|
const slug = cleanSlug(rawSlug); // cleanSlug(rawSlug.split('/').pop());
|
||||||
const publishDate = new Date(rawPublishDate);
|
const publishDate = new Date(rawPublishDate);
|
||||||
const updateDate = rawUpdateDate ? new Date(rawUpdateDate) : undefined;
|
const updateDate = rawUpdateDate ? new Date(rawUpdateDate) : undefined;
|
||||||
const category = rawCategory ? cleanSlug(rawCategory) : undefined;
|
const category = rawCategory ? cleanSlug(rawCategory) : undefined;
|
||||||
|
Reference in New Issue
Block a user