diff --git a/astro.config.mjs b/astro.config.mjs index 9946ed0..929aef6 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -7,7 +7,7 @@ import tailwind from '@astrojs/tailwind'; import sitemap from '@astrojs/sitemap'; import image from '@astrojs/image'; import mdx from '@astrojs/mdx'; -import icon from "astro-icon"; +import icon from 'astro-icon'; import partytown from '@astrojs/partytown'; import compress from 'astro-compress'; import { readingTimeRemarkPlugin } from './src/utils/frontmatter.mjs'; @@ -43,9 +43,19 @@ export default defineConfig({ 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"], + 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'], }, }), diff --git a/src/assets/styles/tailwind.css b/src/assets/styles/tailwind.css index e120622..0b56fa0 100644 --- a/src/assets/styles/tailwind.css +++ b/src/assets/styles/tailwind.css @@ -2,7 +2,9 @@ @tailwind components; @tailwind utilities; -.dd *:first-child { margin-top: 0;} +.dd *:first-child { + margin-top: 0; +} @layer components { .text-page { @@ -21,7 +23,6 @@ @apply bg-slate-900; } - .btn { @apply inline-flex items-center justify-center rounded-full shadow-md border-gray-400 border bg-transparent font-medium text-center text-base text-page leading-snug transition py-3.5 px-6 md:px-8 ease-in duration-200 focus:ring-blue-500 focus:ring-offset-blue-200 focus:ring-2 focus:ring-offset-2 hover:bg-gray-100 hover:border-gray-600 dark:text-slate-300 dark:border-slate-500 dark:hover:bg-slate-800 dark:hover:border-slate-800; } diff --git a/src/navigation.js b/src/navigation.js index 051df20..996287e 100644 --- a/src/navigation.js +++ b/src/navigation.js @@ -53,27 +53,27 @@ export const headerData = { ], }, { - text: "Blog", + text: 'Blog', links: [ { - text: "Blog List", + text: 'Blog List', href: getBlogPermalink(), }, { - text: "Article", - href: getPermalink("get-started-website-with-astro-tailwind-css", "post"), + text: 'Article', + href: getPermalink('get-started-website-with-astro-tailwind-css', 'post'), }, { - text: "Article (with MDX)", - href: getPermalink("markdown-elements-demo-post", "post"), + text: 'Article (with MDX)', + href: getPermalink('markdown-elements-demo-post', 'post'), }, { - text: "Category Page", - href: getPermalink("tutorials", "category"), + text: 'Category Page', + href: getPermalink('tutorials', 'category'), }, { - text: "Tag Page", - href: getPermalink("astro", "tag"), + text: 'Tag Page', + href: getPermalink('astro', 'tag'), }, ], }, diff --git a/src/pages/rss.xml.ts b/src/pages/rss.xml.ts index d92ce05..7d6108f 100644 --- a/src/pages/rss.xml.ts +++ b/src/pages/rss.xml.ts @@ -26,6 +26,6 @@ export const get = async () => { pubDate: post.publishDate, })), - trailingSlash: SITE.trailingSlash + trailingSlash: SITE.trailingSlash, }); }; diff --git a/src/types.d.ts b/src/types.d.ts index 8fb830a..c8e239e 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -198,4 +198,4 @@ export interface Content extends Headline, Widget { items?: Array; columns?: number; isReversed?: boolean; -} \ No newline at end of file +} diff --git a/src/utils/frontmatter.mjs b/src/utils/frontmatter.mjs index 6da302f..096d2a0 100644 --- a/src/utils/frontmatter.mjs +++ b/src/utils/frontmatter.mjs @@ -6,6 +6,6 @@ export function readingTimeRemarkPlugin() { const textOnPage = toString(tree); const readingTime = Math.ceil(getReadingTime(textOnPage).minutes); - file.data.astro.frontmatter.readingTime = readingTime + file.data.astro.frontmatter.readingTime = readingTime; }; } diff --git a/src/utils/permalinks.ts b/src/utils/permalinks.ts index c4d89f4..e4afce1 100644 --- a/src/utils/permalinks.ts +++ b/src/utils/permalinks.ts @@ -30,13 +30,12 @@ export const TAG_BASE = cleanSlug(BLOG?.tag?.pathname) || 'tag'; export const getCanonical = (path = ''): string | URL => { const url = String(new URL(path, SITE.origin)); if (SITE.trailingSlash == false && path && url.endsWith('/')) { - return url.slice(0,-1) - } - else if (SITE.trailingSlash == true && path && !url.endsWith('/') ) { + return url.slice(0, -1); + } else if (SITE.trailingSlash == true && path && !url.endsWith('/')) { return url + '/'; } return url; -} +}; /** */ export const getPermalink = (slug = '', type = 'page'): string => {