Migrate to astro-icon v1

This commit is contained in:
prototypa
2023-07-27 06:36:12 -04:00
parent ce4dfa0a69
commit 139ca46a9c
22 changed files with 35 additions and 22 deletions

View File

@ -7,6 +7,7 @@ import tailwind from '@astrojs/tailwind';
import sitemap from '@astrojs/sitemap'; import sitemap from '@astrojs/sitemap';
import image from '@astrojs/image'; import image from '@astrojs/image';
import mdx from '@astrojs/mdx'; import mdx from '@astrojs/mdx';
import icon from "astro-icon";
import partytown from '@astrojs/partytown'; import partytown from '@astrojs/partytown';
import compress from 'astro-compress'; import compress from 'astro-compress';
import { readingTimeRemarkPlugin } from './src/utils/frontmatter.mjs'; import { readingTimeRemarkPlugin } from './src/utils/frontmatter.mjs';
@ -40,6 +41,13 @@ export default defineConfig({
serviceEntryPoint: '@astrojs/image/sharp', serviceEntryPoint: '@astrojs/image/sharp',
}), }),
mdx(), mdx(),
icon({
include: {
tabler: ["*"],
"flat-color-icons": ["template", "gallery", "approval", "document", "advertising", "currency-exchange", "voice-presentation", "business-contact", "database"],
ri: ["twitter-fill", "facebook-box-fill", "linkedin-box-fill", "whatsapp-fill", "mail-fill"],
},
}),
...whenExternalScripts(() => ...whenExternalScripts(() =>
partytown({ partytown({

View File

@ -27,7 +27,7 @@
"@typescript-eslint/parser": "^6.2.0", "@typescript-eslint/parser": "^6.2.0",
"astro": "^2.9.3", "astro": "^2.9.3",
"astro-compress": "^1.1.49", "astro-compress": "^1.1.49",
"astro-icon": "^0.8.1", "astro-icon": "^1.0.0-next.2",
"eslint": "^8.45.0", "eslint": "^8.45.0",
"eslint-plugin-astro": "^0.27.2", "eslint-plugin-astro": "^0.27.2",
"eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-jsx-a11y": "^6.7.1",
@ -43,5 +43,10 @@
}, },
"engines": { "engines": {
"node": ">=16.12.0" "node": ">=16.12.0"
},
"dependencies": {
"@iconify-json/flat-color-icons": "^1.1.6",
"@iconify-json/ri": "^1.1.10",
"@iconify-json/tabler": "^1.1.85"
} }
} }

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
import { Picture } from '@astrojs/image/components'; import { Picture } from '@astrojs/image/components';
import PostTags from '~/components/blog/Tags.astro'; import PostTags from '~/components/blog/Tags.astro';

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
import { getPermalink } from '~/utils/permalinks'; import { getPermalink } from '~/utils/permalinks';
export interface Props { export interface Props {

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
import { Picture } from '@astrojs/image/components'; import { Picture } from '@astrojs/image/components';
import PostTags from '~/components/blog/Tags.astro'; import PostTags from '~/components/blog/Tags.astro';

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
import { getBlogPermalink } from '~/utils/permalinks'; import { getBlogPermalink } from '~/utils/permalinks';
--- ---

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
export interface Props { export interface Props {
text: string; text: string;

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
export interface Props { export interface Props {
label?: string; label?: string;

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
import { SITE } from '~/config.mjs'; import { SITE } from '~/config.mjs';

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
export interface CallToAction { export interface CallToAction {
text: string; text: string;

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
import { Picture } from '@astrojs/image/components'; import { Picture } from '@astrojs/image/components';
interface Item { interface Item {

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
interface Item { interface Item {
question: string; question: string;

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
interface Item { interface Item {
title: string; title: string;

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
interface Item { interface Item {
title?: string; title?: string;

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
import { SITE } from '~/config.mjs'; import { SITE } from '~/config.mjs';
import { getHomePermalink } from '~/utils/permalinks'; import { getHomePermalink } from '~/utils/permalinks';

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
import Logo from '~/components/Logo.astro'; import Logo from '~/components/Logo.astro';
import ToggleTheme from '~/components/common/ToggleTheme.astro'; import ToggleTheme from '~/components/common/ToggleTheme.astro';
import ToggleMenu from '~/components/common/ToggleMenu.astro'; import ToggleMenu from '~/components/common/ToggleMenu.astro';

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
import { Picture } from '@astrojs/image/components'; import { Picture } from '@astrojs/image/components';
import type { CallToAction } from '~/components/widgets/CallToAction.astro'; import type { CallToAction } from '~/components/widgets/CallToAction.astro';

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
import { Picture } from '@astrojs/image/components'; import { Picture } from '@astrojs/image/components';
import type { CallToAction } from '~/components/widgets/CallToAction.astro'; import type { CallToAction } from '~/components/widgets/CallToAction.astro';

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
--- ---
<section class="bg-blue-50 dark:bg-slate-800 not-prose"> <section class="bg-blue-50 dark:bg-slate-800 not-prose">

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
import { Picture } from '@astrojs/image/components'; import { Picture } from '@astrojs/image/components';
interface Item { interface Item {

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon/components';
import type { CallToAction } from '~/components/widgets/CallToAction.astro'; import type { CallToAction } from '~/components/widgets/CallToAction.astro';
interface Item { interface Item {

View File

@ -218,7 +218,7 @@ const meta = {
title: 'Features', title: 'Features',
description: description:
'Display your product in action and how the Features actually create a solution for your target customer.', 'Display your product in action and how the Features actually create a solution for your target customer.',
icon: 'flat-color-icons:todo-list', icon: 'flat-color-icons:approval',
}, },
{ {
title: 'Content', title: 'Content',
@ -254,7 +254,7 @@ const meta = {
title: 'Footers', title: 'Footers',
description: description:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore.', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore.',
icon: 'icon-park:page-template', icon: 'flat-color-icons:database',
}, },
]} ]}
/> />