Format with prettier
This commit is contained in:
@ -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'],
|
||||
},
|
||||
}),
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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'),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -26,6 +26,6 @@ export const get = async () => {
|
||||
pubDate: post.publishDate,
|
||||
})),
|
||||
|
||||
trailingSlash: SITE.trailingSlash
|
||||
trailingSlash: SITE.trailingSlash,
|
||||
});
|
||||
};
|
||||
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
@ -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 => {
|
||||
|
Reference in New Issue
Block a user