Format with prettier

This commit is contained in:
prototypa
2023-07-27 14:47:30 -04:00
parent 6f5b5f5b2d
commit 8cd3985c5d
7 changed files with 33 additions and 23 deletions

View File

@ -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;
}

View File

@ -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'),
},
],
},

View File

@ -26,6 +26,6 @@ export const get = async () => {
pubDate: post.publishDate,
})),
trailingSlash: SITE.trailingSlash
trailingSlash: SITE.trailingSlash,
});
};

2
src/types.d.ts vendored
View File

@ -198,4 +198,4 @@ export interface Content extends Headline, Widget {
items?: Array<Item>;
columns?: number;
isReversed?: boolean;
}
}

View File

@ -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;
};
}

View File

@ -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 => {