diff --git a/.prettierrc b/.prettierrc index 74d86ae..754bc46 100644 --- a/.prettierrc +++ b/.prettierrc @@ -4,13 +4,5 @@ "singleQuote": true, "tabWidth": 2, "trailingComma": "es5", - "useTabs": true, - "overrides": [ - { - "files": [".*", "*.json", "*.md", "*.toml", "*.yml"], - "options": { - "useTabs": false - } - } - ] + "useTabs": false } diff --git a/README.md b/README.md index e3de0b9..a6f934c 100644 --- a/README.md +++ b/README.md @@ -157,7 +157,8 @@ const CONFIG = { language: 'en', // Default language textDirection: 'ltr', // Default html text direction - dateFormatter: new Intl.DateTimeFormat('en', { // Date format + dateFormatter: new Intl.DateTimeFormat('en', { + // Date format year: 'numeric', month: 'short', day: 'numeric', diff --git a/astro.config.mjs b/astro.config.mjs index 6844cc3..e612903 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -16,58 +16,58 @@ import { SITE } from './src/config.mjs'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); const whenExternalScripts = (items = []) => - SITE.googleAnalyticsId ? (Array.isArray(items) ? items.map((item) => item()) : [items()]) : []; + SITE.googleAnalyticsId ? (Array.isArray(items) ? items.map((item) => item()) : [items()]) : []; export default defineConfig({ - site: SITE.origin, - base: SITE.basePathname, - trailingSlash: SITE.trailingSlash ? 'always' : 'never', + site: SITE.origin, + base: SITE.basePathname, + trailingSlash: SITE.trailingSlash ? 'always' : 'never', - output: 'static', + output: 'static', - integrations: [ - tailwind({ - config: { - applyBaseStyles: false, - }, - }), - sitemap(), - image({ - serviceEntryPoint: '@astrojs/image/sharp', - }), - mdx(), + integrations: [ + tailwind({ + config: { + applyBaseStyles: false, + }, + }), + sitemap(), + image({ + serviceEntryPoint: '@astrojs/image/sharp', + }), + mdx(), - ...whenExternalScripts(() => - partytown({ - config: { forward: ['dataLayer.push'] }, - }) - ), + ...whenExternalScripts(() => + partytown({ + config: { forward: ['dataLayer.push'] }, + }) + ), - compress({ - css: true, - html: true, - img: false, - js: true, - svg: false, + compress({ + css: true, + html: true, + img: false, + js: true, + svg: false, - logger: 1, - }), - ], + logger: 1, + }), + ], - markdown: { - remarkPlugins: [remarkReadingTime], - extendDefaultPlugins: true, - }, + markdown: { + remarkPlugins: [remarkReadingTime], + extendDefaultPlugins: true, + }, - vite: { - resolve: { - alias: { - '~': path.resolve(__dirname, './src'), - }, - }, - }, + vite: { + resolve: { + alias: { + '~': path.resolve(__dirname, './src'), + }, + }, + }, - experimental: { - contentCollections: true, - }, + experimental: { + contentCollections: true, + }, }); diff --git a/src/assets/styles/base.css b/src/assets/styles/base.css index 0762253..7883b81 100644 --- a/src/assets/styles/base.css +++ b/src/assets/styles/base.css @@ -3,42 +3,42 @@ @tailwind utilities; @layer components { - .btn { - @apply inline-flex items-center justify-center rounded-md shadow-md border-gray-400 border bg-transparent font-medium text-center text-base text-gray-700 leading-snug transition py-3.5 px-6 md:px-7 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; - } + .btn { + @apply inline-flex items-center justify-center rounded-md shadow-md border-gray-400 border bg-transparent font-medium text-center text-base text-gray-700 leading-snug transition py-3.5 px-6 md:px-7 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; + } - .btn-ghost { - @apply border-none shadow-none text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white; - } + .btn-ghost { + @apply border-none shadow-none text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white; + } - .btn-primary { - @apply font-semibold bg-primary-800 text-white border-primary-800 hover:bg-primary-900 hover:border-primary-900 hover:text-white dark:text-white dark:bg-primary-700 dark:border-primary-700 dark:hover:border-primary-900 dark:hover:bg-primary-900; - } + .btn-primary { + @apply font-semibold bg-primary-800 text-white border-primary-800 hover:bg-primary-900 hover:border-primary-900 hover:text-white dark:text-white dark:bg-primary-700 dark:border-primary-700 dark:hover:border-primary-900 dark:hover:bg-primary-900; + } } #header.scroll { - @apply shadow-md md:shadow-lg bg-white md:bg-white/90 md:backdrop-blur-sm dark:bg-slate-900 dark:md:bg-slate-900/90; + @apply shadow-md md:shadow-lg bg-white md:bg-white/90 md:backdrop-blur-sm dark:bg-slate-900 dark:md:bg-slate-900/90; } .dropdown:hover .dropdown-menu { - display: block; + display: block; } [astro-icon].icon-light > * { - stroke-width: 1.2; + stroke-width: 1.2; } [astro-icon].icon-bold > * { - stroke-width: 2.4; + stroke-width: 2.4; } [data-aw-toggle-menu] path { - @apply transition; + @apply transition; } [data-aw-toggle-menu].expanded g > path:first-child { - @apply -rotate-45 translate-y-[15px] translate-x-[-3px]; + @apply -rotate-45 translate-y-[15px] translate-x-[-3px]; } [data-aw-toggle-menu].expanded g > path:last-child { - @apply rotate-45 translate-y-[-8px] translate-x-[14px]; + @apply rotate-45 translate-y-[-8px] translate-x-[14px]; } diff --git a/src/components/blog/Grid.astro b/src/components/blog/Grid.astro index 9504be3..1b62be4 100644 --- a/src/components/blog/Grid.astro +++ b/src/components/blog/Grid.astro @@ -3,12 +3,12 @@ import Item from '~/components/blog/GridItem.astro'; import type { Post } from '~/types'; export interface Props { - posts: Array; + posts: Array; } const { posts } = Astro.props; ---
- {posts.map((post) => )} + {posts.map((post) => )}
diff --git a/src/components/blog/GridItem.astro b/src/components/blog/GridItem.astro index 76fca52..492f0ca 100644 --- a/src/components/blog/GridItem.astro +++ b/src/components/blog/GridItem.astro @@ -8,7 +8,7 @@ import { findImage } from '~/utils/images'; import { getPermalink } from '~/utils/permalinks'; export interface Props { - post: Post; + post: Post; } const { post } = Astro.props; @@ -16,33 +16,33 @@ const image = await findImage(post.image); ---
- -

- { - BLOG?.post?.disabled ? ( - post.title - ) : ( - - {post.title} - - ) - } -

-

{post.excerpt || post.description}

+ +

+ { + BLOG?.post?.disabled ? ( + post.title + ) : ( + + {post.title} + + ) + } +

+

{post.excerpt || post.description}

diff --git a/src/components/blog/Headline.astro b/src/components/blog/Headline.astro index 838b578..9d42645 100644 --- a/src/components/blog/Headline.astro +++ b/src/components/blog/Headline.astro @@ -3,8 +3,12 @@ const { title = await Astro.slots.render('default'), subtitle = await Astro.slot ---
-

- {title} -

- {subtitle &&
} +

+ {title} +

+ { + subtitle && ( +
+ ) + }
diff --git a/src/components/blog/HighlightedPosts.astro b/src/components/blog/HighlightedPosts.astro index e58ad03..bddb1fd 100644 --- a/src/components/blog/HighlightedPosts.astro +++ b/src/components/blog/HighlightedPosts.astro @@ -5,49 +5,49 @@ import { getBlogPermalink } from '~/utils/permalinks'; import { findPostsByIds } from '~/utils/blog'; export interface Props { - title?: string; - allPostsText?: string; - allPostsLink?: string | URL; - information?: string; - postIds: string[]; + title?: string; + allPostsText?: string; + allPostsLink?: string | URL; + information?: string; + postIds: string[]; } const { - title = await Astro.slots.render('title'), - allPostsText = 'View all posts', - allPostsLink = getBlogPermalink(), - information = await Astro.slots.render('information'), - postIds = [], + title = await Astro.slots.render('title'), + allPostsText = 'View all posts', + allPostsLink = getBlogPermalink(), + information = await Astro.slots.render('information'), + postIds = [], } = Astro.props; const posts = await findPostsByIds(postIds); ---
-
-
- { - title && ( -

- ) - } - { - allPostsText && allPostsLink && ( - - {allPostsText} Β» - - ) - } -

+
+
+ { + title && ( +

+ ) + } + { + allPostsText && allPostsLink && ( + + {allPostsText} Β» + + ) + } +

- {information &&

} -

+ {information &&

} +

- +
diff --git a/src/components/blog/LatestPosts.astro b/src/components/blog/LatestPosts.astro index df47af8..ad8efa7 100644 --- a/src/components/blog/LatestPosts.astro +++ b/src/components/blog/LatestPosts.astro @@ -9,22 +9,22 @@ const posts = await findLatestPosts({ count }); ---
-
-

- Latest articles in our Blog - -

+
+

+ Latest articles in our Blog + +

-

- The blog will be used to display AstroWind documentation. Each new article will be an important step that you will - need to know to be an expert in creating a website using Astro + Tailwind CSS The blog does not exist yet, but - very soon. Astro is a very interesting technology. Thanks. -

-
+

+ The blog will be used to display AstroWind documentation. Each new article will be an important step that you will + need to know to be an expert in creating a website using Astro + Tailwind CSS The blog does not exist yet, but + very soon. Astro is a very interesting technology. Thanks. +

+
- +
diff --git a/src/components/blog/List.astro b/src/components/blog/List.astro index 3093d91..6a80ae3 100644 --- a/src/components/blog/List.astro +++ b/src/components/blog/List.astro @@ -3,18 +3,18 @@ import Item from '~/components/blog/ListItem.astro'; import type { Post } from '~/types'; export interface Props { - posts: Array; + posts: Array; } const { posts } = Astro.props; ---
    - { - posts.map((post) => ( -
  • - -
  • - )) - } + { + posts.map((post) => ( +
  • + +
  • + )) + }
diff --git a/src/components/blog/ListItem.astro b/src/components/blog/ListItem.astro index 3ed763f..d4697dd 100644 --- a/src/components/blog/ListItem.astro +++ b/src/components/blog/ListItem.astro @@ -11,7 +11,7 @@ import { findImage } from '~/utils/images'; import { getFormattedDate } from '~/utils/utils'; export interface Props { - post: Post; + post: Post; } const { post } = Astro.props; @@ -21,53 +21,49 @@ const link = !BLOG?.post?.disabled ? getPermalink(post.slug, 'post') : ''; ---
- { - image && ( - - - - ) - } -
-
-
- - - ~ - {Math.ceil(post.readingTime)} min read - -
-

- { - link ? ( - - {post.title} - - ) : ( - post.title - ) - } -

-
+ { + image && ( + + + + ) + } +
+
+
+ + + ~ + {Math.ceil(post.readingTime)} min read + +
+

+ { + link ? ( + + {post.title} + + ) : ( + post.title + ) + } +

+
- {post.excerpt &&

{post.excerpt}

} -
- - -
-
+ {post.excerpt &&

{post.excerpt}

} +
+ +
+
diff --git a/src/components/blog/SinglePost.astro b/src/components/blog/SinglePost.astro index 892ab89..3aa6756 100644 --- a/src/components/blog/SinglePost.astro +++ b/src/components/blog/SinglePost.astro @@ -10,70 +10,72 @@ import { getFormattedDate } from '~/utils/utils'; import type { Post } from '~/types'; export interface Props { - post: Post; - url: string | URL; + post: Post; + url: string | URL; } const { post, url } = Astro.props; ---
-
-
-
-

- - ~ { - Math.ceil(post.readingTime) - } min read -

-
-

- {post.title} -

-

- {post.excerpt} -

- - { - post.image ? ( - - ) : ( -
-
-
- ) - } -
-
- { - post.Content ? ( - <> - {/* @ts-ignore */} - - - ) : ( - - ) - } -
-
- - -
-
+
+
+
+

+ + ~ { + Math.ceil(post.readingTime) + } min read +

+
+

+ {post.title} +

+

+ {post.excerpt} +

+ + { + post.image ? ( + + ) : ( +
+
+
+ ) + } +
+
+ { + post.Content ? ( + <> + {/* @ts-ignore */} + + + ) : ( + + ) + } +
+
+ + +
+
diff --git a/src/components/blog/ToBlogLink.astro b/src/components/blog/ToBlogLink.astro index 2d80ff8..522201f 100644 --- a/src/components/blog/ToBlogLink.astro +++ b/src/components/blog/ToBlogLink.astro @@ -4,7 +4,7 @@ import { getBlogPermalink } from '~/utils/permalinks'; --- diff --git a/src/components/common/BasicScripts.astro b/src/components/common/BasicScripts.astro index c947f74..a94e924 100644 --- a/src/components/common/BasicScripts.astro +++ b/src/components/common/BasicScripts.astro @@ -3,117 +3,117 @@ import { SITE } from '~/config.mjs'; --- diff --git a/src/components/common/Logo.astro b/src/components/common/Logo.astro index 0768e7e..3b72d6e 100644 --- a/src/components/common/Logo.astro +++ b/src/components/common/Logo.astro @@ -2,5 +2,5 @@ --- - πŸš€ AstroWind diff --git a/src/components/common/MetaTags.astro b/src/components/common/MetaTags.astro index f8cfe62..cc7da0b 100644 --- a/src/components/common/MetaTags.astro +++ b/src/components/common/MetaTags.astro @@ -12,74 +12,74 @@ import Fonts from '~/components/common/Fonts.astro'; import SplitbeeAnalytics from './SplitbeeAnalytics.astro'; export interface Props extends MetaSEO { - dontUseTitleTemplate?: boolean; + dontUseTitleTemplate?: boolean; } const defaultImage = SITE.defaultImage - ? ( - await getImage({ - src: SITE.defaultImage, - alt: 'Default image', - width: 1200, - height: 628, - }) - ).src - : ''; + ? ( + await getImage({ + src: SITE.defaultImage, + alt: 'Default image', + width: 1200, + height: 628, + }) + ).src + : ''; const { - title = SITE.name, - description = '', - image: _image = defaultImage, + title = SITE.name, + description = '', + image: _image = defaultImage, - canonical = getCanonical(String(Astro.url.pathname)), - noindex = false, - nofollow = false, + canonical = getCanonical(String(Astro.url.pathname)), + noindex = false, + nofollow = false, - ogTitle = title, - ogType = 'website', + ogTitle = title, + ogType = 'website', - dontUseTitleTemplate = false, + dontUseTitleTemplate = false, } = Astro.props; const image = - typeof _image === 'string' - ? new URL(_image, Astro.site) - : _image && typeof _image['src'] !== 'undefined' - ? // @ts-ignore - new URL(getRelativeUrlByFilePath(_image.src), Astro.site) - : null; + typeof _image === 'string' + ? new URL(_image, Astro.site) + : _image && typeof _image['src'] !== 'undefined' + ? // @ts-ignore + new URL(getRelativeUrlByFilePath(_image.src), Astro.site) + : null; --- diff --git a/src/components/common/Pagination.astro b/src/components/common/Pagination.astro index c63b282..cdb3d5c 100644 --- a/src/components/common/Pagination.astro +++ b/src/components/common/Pagination.astro @@ -3,32 +3,32 @@ import { Icon } from 'astro-icon'; import { getPermalink } from '~/utils/permalinks'; export interface Props { - prevUrl: string; - nextUrl: string; - prevText?: string; - nextText?: string; + prevUrl: string; + nextUrl: string; + prevText?: string; + nextText?: string; } const { prevUrl, nextUrl, prevText = 'Newer posts', nextText = 'Older posts' } = Astro.props; --- { - (prevUrl || nextUrl) && ( - - ) + (prevUrl || nextUrl) && ( + + ) } diff --git a/src/components/common/SocialShare.astro b/src/components/common/SocialShare.astro index a90fe32..ae26912 100644 --- a/src/components/common/SocialShare.astro +++ b/src/components/common/SocialShare.astro @@ -2,29 +2,29 @@ import { Icon } from 'astro-icon'; export interface Props { - text: string; - url: string | URL; - class?: string; + text: string; + url: string | URL; + class?: string; } const { text, url, class: className = 'inline-block' } = Astro.props; ---
- Share: - - - - - + Share: + + + + +
diff --git a/src/components/common/Tags.astro b/src/components/common/Tags.astro index 160fd21..a285652 100644 --- a/src/components/common/Tags.astro +++ b/src/components/common/Tags.astro @@ -5,21 +5,30 @@ import { BLOG } from '~/config.mjs'; import type { Post } from '~/types'; export interface Props { - tags: Post['tags']; - class?: string; + tags: Post['tags']; + class?: string; } const { tags, class: className = 'text-sm' } = Astro.props; --- { - tags && Array.isArray(tags) && ( -
    - {tags.map((tag) => ( -
  • - {BLOG?.tag?.disabled ? tag : {tag}} -
  • - ))} -
- ) + tags && Array.isArray(tags) && ( +
    + {tags.map((tag) => ( +
  • + {BLOG?.tag?.disabled ? ( + tag + ) : ( + + {tag} + + )} +
  • + ))} +
+ ) } diff --git a/src/components/common/ToggleMenu.astro b/src/components/common/ToggleMenu.astro index 3c91a82..73d3473 100644 --- a/src/components/common/ToggleMenu.astro +++ b/src/components/common/ToggleMenu.astro @@ -2,21 +2,21 @@ import { Icon } from 'astro-icon'; export interface Props { - label?: string; - class?: string; - iconClass?: string; - iconName?: string; + label?: string; + class?: string; + iconClass?: string; + iconName?: string; } const { - label = 'Toggle Menu', - class: - className = 'ml-1.5 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-2.5 inline-flex items-center transition', - iconClass = 'w-6 h-6', - iconName = 'tabler:menu', + label = 'Toggle Menu', + class: + className = 'ml-1.5 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-2.5 inline-flex items-center transition', + iconClass = 'w-6 h-6', + iconName = 'tabler:menu', } = Astro.props; --- diff --git a/src/components/common/ToggleTheme.astro b/src/components/common/ToggleTheme.astro index 3dc54af..3ab33d8 100644 --- a/src/components/common/ToggleTheme.astro +++ b/src/components/common/ToggleTheme.astro @@ -2,21 +2,21 @@ import { Icon } from 'astro-icon'; export interface Props { - label?: string; - class?: string; - iconClass?: string; - iconName?: string; + label?: string; + class?: string; + iconClass?: string; + iconName?: string; } const { - label = 'Toggle between Dark and Light mode', - class: - className = 'text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-2.5 inline-flex items-center', - iconClass = 'w-6 h-6', - iconName = 'tabler:sun', + label = 'Toggle between Dark and Light mode', + class: + className = 'text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-2.5 inline-flex items-center', + iconClass = 'w-6 h-6', + iconName = 'tabler:sun', } = Astro.props; --- diff --git a/src/components/widgets/Announcement.astro b/src/components/widgets/Announcement.astro index c6990ee..be58a2b 100644 --- a/src/components/widgets/Announcement.astro +++ b/src/components/widgets/Announcement.astro @@ -3,26 +3,26 @@ import { getPermalink } from '~/utils/permalinks'; --- diff --git a/src/components/widgets/CallToAction.astro b/src/components/widgets/CallToAction.astro index d3d1994..584bfe7 100644 --- a/src/components/widgets/CallToAction.astro +++ b/src/components/widgets/CallToAction.astro @@ -2,54 +2,56 @@ import { Icon } from 'astro-icon'; interface CallToAction { - text: string; - href: string; - icon?: string; + text: string; + href: string; + icon?: string; } export interface Props { - title?: string; - description?: string; - callToAction?: string | CallToAction; + title?: string; + description?: string; + callToAction?: string | CallToAction; } const { - title = await Astro.slots.render('title'), - subtitle = await Astro.slots.render('subtitle'), - callToAction = await Astro.slots.render('callToAction'), + title = await Astro.slots.render('title'), + subtitle = await Astro.slots.render('subtitle'), + callToAction = await Astro.slots.render('callToAction'), } = Astro.props; ---
-
-
-
- { - title && ( -

- ) - } - {subtitle &&

} - { - typeof callToAction === 'string' ? ( - - ) : ( - callToAction && - callToAction.text && - callToAction.href && ( -

- ) - ) - } -

-
-
+
+
+
+ { + title && ( +

+ ) + } + {subtitle &&

} + { + typeof callToAction === 'string' ? ( + + ) : ( + callToAction && + callToAction.text && + callToAction.href && ( +

+ ) + ) + } +

+
+
diff --git a/src/components/widgets/Content.astro b/src/components/widgets/Content.astro index d743f2c..8dc0fba 100644 --- a/src/components/widgets/Content.astro +++ b/src/components/widgets/Content.astro @@ -1,107 +1,107 @@ --- -import Icon from "astro-icon" +import Icon from 'astro-icon'; import { Picture } from '@astrojs/image/components'; interface Item { - title: string; - description?: string; - icon?: string; + title: string; + description?: string; + icon?: string; } export interface Props { - title?: string; - subtitle?: string; - highlight?: string; - content?: string; - items?: Array; - image?: string | any; // TODO: find HTMLElementProps - isReversed?: boolean; - isAfterContent?: boolean; + title?: string; + subtitle?: string; + highlight?: string; + content?: string; + items?: Array; + image?: string | any; // TODO: find HTMLElementProps + isReversed?: boolean; + isAfterContent?: boolean; } const { - title = await Astro.slots.render('title'), - subtitle = await Astro.slots.render('subtitle'), - highlight, - content = await Astro.slots.render('content'), - items = [], - image = await Astro.slots.render('image'), - isReversed = false, - isAfterContent = false, + title = await Astro.slots.render('title'), + subtitle = await Astro.slots.render('subtitle'), + highlight, + content = await Astro.slots.render('content'), + items = [], + image = await Astro.slots.render('image'), + isReversed = false, + isAfterContent = false, } = Astro.props; ---
-
- { - (title || subtitle || highlight) && ( -
- {highlight && ( -

- )} - {title && ( -

- )} +
+ { + (title || subtitle || highlight) && ( +
+ {highlight && ( +

+ )} + {title && ( +

+ )} - {subtitle && ( -

- )} -

- ) - } -
-
-
-
- {content &&
} + {subtitle && ( +

+ )} +

+ ) + } +
+
+
+
+ {content &&
} - { - items && ( -
- {items.map(({ title: title2, description, icon }) => ( -
-
-
- -
-
-
- {title2 &&

{title2}

} - {description &&

} -

-
- ))} -
- ) - } -
- -
-
+ { + items && ( +
+ {items.map(({ title: title2, description, icon }) => ( +
+
+
+ +
+
+
+ {title2 &&

{title2}

} + {description &&

} +

+
+ ))} +
+ ) + } +
+ +
+

diff --git a/src/components/widgets/FAQs.astro b/src/components/widgets/FAQs.astro index 8a072de..caf3b8b 100644 --- a/src/components/widgets/FAQs.astro +++ b/src/components/widgets/FAQs.astro @@ -2,65 +2,65 @@ import { Icon } from 'astro-icon'; interface Item { - question: string; - answer: string; + question: string; + answer: string; } export interface Props { - title?: string; - subtitle?: string; - highlight?: string; - items: Array>; + title?: string; + subtitle?: string; + highlight?: string; + items: Array>; } const { - title = await Astro.slots.render('title'), - subtitle = await Astro.slots.render('subtitle'), - highlight, - items = [], + title = await Astro.slots.render('title'), + subtitle = await Astro.slots.render('subtitle'), + highlight, + items = [], } = Astro.props; ---
-
- { - (title || subtitle || highlight) && ( -
- {highlight && ( -

- )} - {title && ( -

- )} - {subtitle &&

} -

- ) - } -
-
-
- { - items && - items.map((subitems) => ( -
- {subitems.map(({ question, answer }) => ( -
-

- - {question} -

- {answer &&
} -
- ))} -
- )) - } -
-
+
+ { + (title || subtitle || highlight) && ( +
+ {highlight && ( +

+ )} + {title && ( +

+ )} + {subtitle &&

} +

+ ) + } +
+
+
+ { + items && + items.map((subitems) => ( +
+ {subitems.map(({ question, answer }) => ( +
+

+ + {question} +

+ {answer &&
} +
+ ))} +
+ )) + } +
+
diff --git a/src/components/widgets/Features.astro b/src/components/widgets/Features.astro index 71017fc..8b7caab 100644 --- a/src/components/widgets/Features.astro +++ b/src/components/widgets/Features.astro @@ -2,70 +2,70 @@ import { Icon } from 'astro-icon'; interface Item { - title: string; - description: string; - icon?: string; + title: string; + description: string; + icon?: string; } export interface Props { - title?: string; - subtitle?: string; - highlight?: string; - items: Array>; + title?: string; + subtitle?: string; + highlight?: string; + items: Array>; } const { - title = await Astro.slots.render('title'), - subtitle = await Astro.slots.render('subtitle'), - highlight, - items = [], + title = await Astro.slots.render('title'), + subtitle = await Astro.slots.render('subtitle'), + highlight, + items = [], } = Astro.props; ---
-
- { - (title || subtitle || highlight) && ( -
- {highlight && ( -

- )} - {title && ( -

- )} +
+ { + (title || subtitle || highlight) && ( +
+ {highlight && ( +

+ )} + {title && ( +

+ )} - {subtitle && ( -

- )} -

- ) - } -
- { - items.map((subitems) => ( -
- {subitems.map(({ title, description, icon }) => ( -
-
-
- {icon && } -
-
-
-

{title}

-

-

-
- ))} -
- )) - } -
-
+ {subtitle && ( +

+ )} +

+ ) + } +
+ { + items.map((subitems) => ( +
+ {subitems.map(({ title, description, icon }) => ( +
+
+
+ {icon && } +
+
+
+

{title}

+

+

+
+ ))} +
+ )) + } +
+
diff --git a/src/components/widgets/Features2.astro b/src/components/widgets/Features2.astro index 44b2da5..23505af 100644 --- a/src/components/widgets/Features2.astro +++ b/src/components/widgets/Features2.astro @@ -2,65 +2,68 @@ import { Icon } from 'astro-icon'; interface Item { - title?: string; - description?: string; - icon?: string; + title?: string; + description?: string; + icon?: string; } export interface Props { - title?: string; - subtitle?: string; - highlight?: string; - items: Array; + title?: string; + subtitle?: string; + highlight?: string; + items: Array; } const { - title = await Astro.slots.render('title'), - subtitle = await Astro.slots.render('subtitle'), - highlight, - items = [], + title = await Astro.slots.render('title'), + subtitle = await Astro.slots.render('subtitle'), + highlight, + items = [], } = Astro.props; ---
- -
-
- { - (title || subtitle || highlight) && ( -
- {highlight && ( -

- )} - {title && ( -

- )} - - {subtitle && ( -

- )} -

- ) - } -
- { - items.map(({ title, description, icon }) => ( -
-
- -
{title}
-
- {description &&

} -

- )) - } -
-
-
+ +
+
+ { + (title || subtitle || highlight) && ( +
+ {highlight && ( +

+ )} + {title && ( +

+ )} + + {subtitle && ( +

+ )} +

+ ) + } +
+ { + items.map(({ title, description, icon }) => ( +
+
+ +
{title}
+
+ {description &&

} +

+ )) + } +
+
+
diff --git a/src/components/widgets/Footer.astro b/src/components/widgets/Footer.astro index 609ce10..acc924e 100644 --- a/src/components/widgets/Footer.astro +++ b/src/components/widgets/Footer.astro @@ -3,126 +3,126 @@ import { Icon } from 'astro-icon'; import { getHomePermalink, getPermalink } from '~/utils/permalinks'; const links = [ - { - title: 'Product', - items: [ - { title: 'Features', href: '#' }, - { title: 'Security', href: '#' }, - { title: 'Team', href: '#' }, - { title: 'Enterprise', href: '#' }, - { title: 'Customer stories', href: '#' }, - { title: 'Pricing', href: '#' }, - { title: 'Resources', href: '#' }, - ], - }, - { - title: 'Platform', - items: [ - { title: 'Developer API', href: '#' }, - { title: 'Partners', href: '#' }, - { title: 'Atom', href: '#' }, - { title: 'Electron', href: '#' }, - { title: 'AstroWind Desktop', href: '#' }, - ], - }, - { - title: 'Support', - items: [ - { title: 'Docs', href: '#' }, - { title: 'Community Forum', href: '#' }, - { title: 'Professional Services', href: '#' }, - { title: 'Skills', href: '#' }, - { title: 'Status', href: '#' }, - ], - }, - { - title: 'Company', - items: [ - { title: 'About', href: '#' }, - { title: 'Blog', href: '#' }, - { title: 'Careers', href: '#' }, - { title: 'Press', href: '#' }, - { title: 'Inclusion', href: '#' }, - { title: 'Social Impact', href: '#' }, - { title: 'Shop', href: '#' }, - ], - }, + { + title: 'Product', + items: [ + { title: 'Features', href: '#' }, + { title: 'Security', href: '#' }, + { title: 'Team', href: '#' }, + { title: 'Enterprise', href: '#' }, + { title: 'Customer stories', href: '#' }, + { title: 'Pricing', href: '#' }, + { title: 'Resources', href: '#' }, + ], + }, + { + title: 'Platform', + items: [ + { title: 'Developer API', href: '#' }, + { title: 'Partners', href: '#' }, + { title: 'Atom', href: '#' }, + { title: 'Electron', href: '#' }, + { title: 'AstroWind Desktop', href: '#' }, + ], + }, + { + title: 'Support', + items: [ + { title: 'Docs', href: '#' }, + { title: 'Community Forum', href: '#' }, + { title: 'Professional Services', href: '#' }, + { title: 'Skills', href: '#' }, + { title: 'Status', href: '#' }, + ], + }, + { + title: 'Company', + items: [ + { title: 'About', href: '#' }, + { title: 'Blog', href: '#' }, + { title: 'Careers', href: '#' }, + { title: 'Press', href: '#' }, + { title: 'Inclusion', href: '#' }, + { title: 'Social Impact', href: '#' }, + { title: 'Shop', href: '#' }, + ], + }, ]; const social = [ - { label: 'Twitter', icon: 'tabler:brand-twitter', href: '#' }, - { label: 'Instagram', icon: 'tabler:brand-instagram', href: '#' }, - { label: 'Facebook', icon: 'tabler:brand-facebook', href: '#' }, - { label: 'RSS', icon: 'tabler:rss', href: getPermalink('/rss.xml') }, - { label: 'Github', icon: 'tabler:brand-github', href: 'https://github.com/onwidget/astrowind' }, + { label: 'Twitter', icon: 'tabler:brand-twitter', href: '#' }, + { label: 'Instagram', icon: 'tabler:brand-instagram', href: '#' }, + { label: 'Facebook', icon: 'tabler:brand-facebook', href: '#' }, + { label: 'RSS', icon: 'tabler:rss', href: getPermalink('/rss.xml') }, + { label: 'Github', icon: 'tabler:brand-github', href: 'https://github.com/onwidget/astrowind' }, ]; ---
-
-
-
-
- AstroWind -
-
- Terms Β· - Privacy Policy -
-
- { - links.map(({ title, items }) => ( -
-
{title}
- {items && Array.isArray(items) && items.length > 0 && ( - - )} -
- )) - } -
-
-
    - { - social.map(({ label, href, icon }) => ( -
  • - - - -
  • - )) - } -
+
+
+
+
+ AstroWind +
+
+ Terms Β· + Privacy Policy +
+
+ { + links.map(({ title, items }) => ( +
+
{title}
+ {items && Array.isArray(items) && items.length > 0 && ( + + )} +
+ )) + } +
+
+
    + { + social.map(({ label, href, icon }) => ( +
  • + + + +
  • + )) + } +
-
- - - Made by onWidget Β· - All rights reserved. -
-
-
+
+ + + Made by onWidget Β· + All rights reserved. +
+
+
diff --git a/src/components/widgets/Header.astro b/src/components/widgets/Header.astro index 06511be..b92d371 100644 --- a/src/components/widgets/Header.astro +++ b/src/components/widgets/Header.astro @@ -7,117 +7,117 @@ import ToggleMenu from '~/components/common/ToggleMenu.astro'; import { getHomePermalink, getBlogPermalink, getPermalink } from '~/utils/permalinks'; const links = [ - { - text: 'Pages', - links: [ - { - text: 'Features', - href: "#", - }, - { - text: 'Pricing', - href: "#", - }, - { - text: 'About us', - href: "#", - }, - { - text: 'Contact', - href: "#", - }, - { - text: 'Terms', - href: getPermalink('/terms'), - }, - { - text: 'Privacy policy', - href: getPermalink('/privacy'), - }, - ], - }, - { - text: 'Resources', - href: getPermalink('useful-resources-to-create-websites', 'post'), - }, - { - text: 'Blog', - href: getBlogPermalink(), - }, + { + text: 'Pages', + links: [ + { + text: 'Features', + href: '#', + }, + { + text: 'Pricing', + href: '#', + }, + { + text: 'About us', + href: '#', + }, + { + text: 'Contact', + href: '#', + }, + { + text: 'Terms', + href: getPermalink('/terms'), + }, + { + text: 'Privacy policy', + href: getPermalink('/privacy'), + }, + ], + }, + { + text: 'Resources', + href: getPermalink('useful-resources-to-create-websites', 'post'), + }, + { + text: 'Blog', + href: getBlogPermalink(), + }, ]; --- diff --git a/src/components/widgets/Hero.astro b/src/components/widgets/Hero.astro index 510fdfd..581adfd 100644 --- a/src/components/widgets/Hero.astro +++ b/src/components/widgets/Hero.astro @@ -3,96 +3,104 @@ import { Icon } from 'astro-icon'; import { Picture } from '@astrojs/image/components'; interface CallToAction { - text: string; - href: string; - icon?: string; + text: string; + href: string; + icon?: string; } export interface Props { - title?: string; - subtitle?: string; - callToAction?: string | CallToAction; - callToAction2?: string | CallToAction; - image?: string | any; // TODO: find HTMLElementProps + title?: string; + subtitle?: string; + callToAction?: string | CallToAction; + callToAction2?: string | CallToAction; + image?: string | any; // TODO: find HTMLElementProps } const { - title = await Astro.slots.render('title'), - subtitle = await Astro.slots.render('subtitle'), - callToAction = await Astro.slots.render('callToAction'), - callToAction2 = await Astro.slots.render('callToAction2'), - image = await Astro.slots.render('image'), + title = await Astro.slots.render('title'), + subtitle = await Astro.slots.render('subtitle'), + callToAction = await Astro.slots.render('callToAction'), + callToAction2 = await Astro.slots.render('callToAction2'), + image = await Astro.slots.render('image'), } = Astro.props; ---
-
-
-
- { - title && ( -

- ) - } -
- {subtitle &&

} -

- { - callToAction && ( -
- {typeof callToAction === 'string' ? ( - - ) : ( - - {callToAction?.icon && <>{' '}} - {callToAction?.text} - - )} -
- ) - } - { - callToAction2 && ( -
- {typeof callToAction2 === 'string' ? ( - - ) : ( - - {callToAction2?.icon && <>{' '}} - {callToAction2.text} - - )} -
- ) - } -
-
-

-
- { - image && ( -
- {typeof image === 'string' ? ( - - ) : ( - - )} -
- ) - } -
-
-
+
+
+
+ { + title && ( +

+ ) + } +
+ {subtitle &&

} +

+ { + callToAction && ( +
+ {typeof callToAction === 'string' ? ( + + ) : ( + + {callToAction?.icon && ( + <> + {' '} + + )} + {callToAction?.text} + + )} +
+ ) + } + { + callToAction2 && ( +
+ {typeof callToAction2 === 'string' ? ( + + ) : ( + + {callToAction2?.icon && ( + <> + {' '} + + )} + {callToAction2.text} + + )} +
+ ) + } +
+
+

+
+ { + image && ( +
+ {typeof image === 'string' ? ( + + ) : ( + + )} +
+ ) + } +
+
+
diff --git a/src/components/widgets/Note.astro b/src/components/widgets/Note.astro index 216e882..861c927 100644 --- a/src/components/widgets/Note.astro +++ b/src/components/widgets/Note.astro @@ -3,9 +3,9 @@ import { Icon } from 'astro-icon'; ---
-
- - Philosophy: Simplicity, Best Practices and High Performance -
+
+ + Philosophy: Simplicity, Best Practices and High Performance +
diff --git a/src/components/widgets/Pricing.astro b/src/components/widgets/Pricing.astro index 56aab7f..0161e91 100644 --- a/src/components/widgets/Pricing.astro +++ b/src/components/widgets/Pricing.astro @@ -3,272 +3,272 @@
- -
-

Pricing

-

- Whatever your status, our offers evolve according to your needs. -

-
- + +
+

Pricing

+

+ Whatever your status, our offers evolve according to your needs. +

+
+ - -
- -
-

Free

- Free -

Forever free

+ +
+ +
+

Free

+ Free +

Forever free

-
    -
  • - - - - 1 user -
  • +
      +
    • + + + + 1 user +
    • -
    • - - - - Plan features -
    • +
    • + + + + Plan features +
    • -
    • - - - - Product support -
    • -
    +
  • + + + + Product support +
  • +
- -
- + +
+ - -
-

- Most popular -

-

Startup

- - $ - 39 - -

All the basics for starting a new business

+ +
+

+ Most popular +

+

Startup

+ + $ + 39 + +

All the basics for starting a new business

-
    -
  • - - - - 2 users -
  • +
      +
    • + + + + 2 users +
    • -
    • - - - - Plan features -
    • +
    • + + + + Plan features +
    • -
    • - - - - Product support -
    • -
    +
  • + + + + Product support +
  • +
- -
- + +
+ - -
-

Team

- - $ - 89 - -

Everything you need for a growing business

+ +
+

Team

+ + $ + 89 + +

Everything you need for a growing business

-
    -
  • - - - - 5 users -
  • +
      +
    • + + + + 5 users +
    • -
    • - - - - Plan features -
    • +
    • + + + + Plan features +
    • -
    • - - - - Product support -
    • -
    +
  • + + + + Product support +
  • +
- -
- + +
+ - -
-

Enterprise

- - $ - 149 - -

Advanced features for scaling your business

+ +
+

Enterprise

+ + $ + 149 + +

Advanced features for scaling your business

-
    -
  • - - - - 10 users -
  • +
      +
    • + + + + 10 users +
    • -
    • - - - - Plan features -
    • +
    • + + + + Plan features +
    • -
    • - - - - Product support -
    • -
    +
  • + + + + Product support +
  • +
- -
- -
- + +
+ +
+
diff --git a/src/components/widgets/Stats.astro b/src/components/widgets/Stats.astro index e8b642a..ed716b4 100644 --- a/src/components/widgets/Stats.astro +++ b/src/components/widgets/Stats.astro @@ -1,55 +1,57 @@ --- interface Item { - name: string; - value: string; + name: string; + value: string; } export interface Props { - title?: string; - subtitle?: string; - highlight?: string; - items?: Array; + title?: string; + subtitle?: string; + highlight?: string; + items?: Array; } const { - title = await Astro.slots.render('title'), - subtitle = await Astro.slots.render('subtitle'), - highlight, - items = [], + title = await Astro.slots.render('title'), + subtitle = await Astro.slots.render('subtitle'), + highlight, + items = [], } = Astro.props; ---
- { - (title || subtitle || highlight) && ( -
- {highlight && ( -

- {highlight} -

- )} - {title && ( -

- )} - {subtitle && ( -

- )} -

- ) - } -
- { - items.map(({ name, value }) => ( -
-
{value}
-

- {name} -

-
- )) - } -
+ { + (title || subtitle || highlight) && ( +
+ {highlight && ( +

+ {highlight} +

+ )} + {title && ( +

+ )} + {subtitle && ( +

+ )} +

+ ) + } +
+ { + items.map(({ name, value }) => ( +
+
+ {value} +
+

+ {name} +

+
+ )) + } +
diff --git a/src/components/widgets/Steps.astro b/src/components/widgets/Steps.astro index 0713ec9..3e3ba66 100644 --- a/src/components/widgets/Steps.astro +++ b/src/components/widgets/Steps.astro @@ -3,70 +3,70 @@ import { Icon } from 'astro-icon'; import { Picture } from '@astrojs/image/components'; interface Item { - title: string; - description?: string; - icon?: string; + title: string; + description?: string; + icon?: string; } export interface Props { - title?: string; - items: Array; - image?: string | any; // TODO: find HTMLElementProps + title?: string; + items: Array; + image?: string | any; // TODO: find HTMLElementProps } const { - title = await Astro.slots.render('title'), - items = [], - image = await Astro.slots.render('image'), + title = await Astro.slots.render('title'), + items = [], + image = await Astro.slots.render('image'), } = Astro.props; ---
-
-
- {title &&

} - { - items && - items.length && - items.map(({ title, description, icon }, index) => ( -
-
-
- {index !== items.length - 1 ? ( -
- {icon && } -
- ) : ( -
- -
- )} -
-
-
-
- {title &&

} - {description &&

} -

-
- )) - } -
-
- { - image && - (typeof image === 'string' ? ( - - ) : ( - - )) - } -
-

+
+
+ {title &&

} + { + items && + items.length && + items.map(({ title, description, icon }, index) => ( +
+
+
+ {index !== items.length - 1 ? ( +
+ {icon && } +
+ ) : ( +
+ +
+ )} +
+
+
+
+ {title &&

} + {description &&

} +

+
+ )) + } +
+
+ { + image && + (typeof image === 'string' ? ( + + ) : ( + + )) + } +
+

diff --git a/src/components/widgets/Steps2.astro b/src/components/widgets/Steps2.astro index af08f32..05be448 100644 --- a/src/components/widgets/Steps2.astro +++ b/src/components/widgets/Steps2.astro @@ -2,31 +2,31 @@ import { Icon } from 'astro-icon'; interface Item { - title: string; - description: string; - icon?: string; + title: string; + description: string; + icon?: string; } interface CallToAction { - text: string; - href: string; - icon?: string; + text: string; + href: string; + icon?: string; } export interface Props { - title?: string; - subtitle?: string; - highlight?: string; - callToAction?: string | CallToAction; - items: Array; + title?: string; + subtitle?: string; + highlight?: string; + callToAction?: string | CallToAction; + items: Array; } const { - title = await Astro.slots.render('title'), - subtitle = await Astro.slots.render('subtitle'), - highlight, - callToAction = await Astro.slots.render('callToAction'), - items = [], + title = await Astro.slots.render('title'), + subtitle = await Astro.slots.render('subtitle'), + highlight, + callToAction = await Astro.slots.render('callToAction'), + items = [], } = Astro.props; /** @@ -64,64 +64,64 @@ const { ---
-
-
-
-
-
-
- { - highlight && ( -

- ) - } - {title &&

} - {subtitle &&

} +

+
+
+
+
+
+ { + highlight && ( +

+ ) + } + {title &&

} + {subtitle &&

} -

- { - typeof callToAction === 'string' ? ( - - ) : ( - callToAction && - callToAction.text && - callToAction.href && ( - - {callToAction.icon && } - {callToAction.text} - - ) - ) - } -
-

-
-
-
    - { - items && items.length - ? items.map(({ title: title2, description, icon }, index) => ( -
  • -
    - - {icon ? : index + 1} - -
    -
    -

    -

    -

    -
  • - )) - : '' - } -
-
-
-
-
-
+
+ { + typeof callToAction === 'string' ? ( + + ) : ( + callToAction && + callToAction.text && + callToAction.href && ( + + {callToAction.icon && } + {callToAction.text} + + ) + ) + } +
+

+
+
+
    + { + items && items.length + ? items.map(({ title: title2, description, icon }, index) => ( +
  • +
    + + {icon ? : index + 1} + +
    +
    +

    +

    +

    +
  • + )) + : '' + } +
+
+
+
+
+
diff --git a/src/config.mjs b/src/config.mjs index 19163e9..2ff79fc 100644 --- a/src/config.mjs +++ b/src/config.mjs @@ -1,61 +1,62 @@ import defaultImage from './assets/images/default.png'; const CONFIG = { - name: 'AstroWind', + name: 'AstroWind', - origin: 'https://astrowind.vercel.app', - basePathname: '/', - trailingSlash: false, + origin: 'https://astrowind.vercel.app', + basePathname: '/', + trailingSlash: false, - title: 'AstroWind β€” Free template for create a website with Astro + Tailwind CSS', - description: 'πŸš€ Suitable for Startups, Small Business, Sass Websites, Professional Portfolios, Marketing Websites, Landing Pages & Blogs.', - defaultImage: defaultImage, + title: 'AstroWind β€” Free template for create a website with Astro + Tailwind CSS', + description: + 'πŸš€ Suitable for Startups, Small Business, Sass Websites, Professional Portfolios, Marketing Websites, Landing Pages & Blogs.', + defaultImage: defaultImage, - defaultTheme: 'system', // Values: "system" | "light" | "dark" | "light:only" | "dark:only" + defaultTheme: 'system', // Values: "system" | "light" | "dark" | "light:only" | "dark:only" - language: 'en', - textDirection: 'ltr', + language: 'en', + textDirection: 'ltr', - dateFormatter: new Intl.DateTimeFormat('en', { - year: 'numeric', - month: 'short', - day: 'numeric', - timeZone: 'UTC', - }), + dateFormatter: new Intl.DateTimeFormat('en', { + year: 'numeric', + month: 'short', + day: 'numeric', + timeZone: 'UTC', + }), - googleAnalyticsId: false, // or "G-XXXXXXXXXX", - googleSiteVerificationId: 'orcPxI47GSa-cRvY11tUe6iGg2IO_RPvnA1q95iEM3M', + googleAnalyticsId: false, // or "G-XXXXXXXXXX", + googleSiteVerificationId: 'orcPxI47GSa-cRvY11tUe6iGg2IO_RPvnA1q95iEM3M', - blog: { - disabled: false, - postsPerPage: 4, + blog: { + disabled: false, + postsPerPage: 4, - list: { - pathname: 'blog', // blog main path, you can change this to "articles" (/articles) - noindex: false, - disabled: false, - }, + list: { + pathname: 'blog', // blog main path, you can change this to "articles" (/articles) + noindex: false, + disabled: false, + }, - post: { - pathname: '', // empty for /some-post, value for /pathname/some-post - noindex: false, - disabled: false, - }, + post: { + pathname: '', // empty for /some-post, value for /pathname/some-post + noindex: false, + disabled: false, + }, - category: { - pathname: 'category', // set empty to change from /category/some-category to /some-category - noindex: true, - disabled: false, - }, + category: { + pathname: 'category', // set empty to change from /category/some-category to /some-category + noindex: true, + disabled: false, + }, - tag: { - pathname: 'tag', // set empty to change from /tag/some-tag to /some-tag - noindex: true, - disabled: false, - }, - }, + tag: { + pathname: 'tag', // set empty to change from /tag/some-tag to /some-tag + noindex: true, + disabled: false, + }, + }, }; export const SITE = { ...CONFIG, blog: undefined }; export const BLOG = CONFIG.blog; -export const DATE_FORMATTER = CONFIG.dateFormatter; \ No newline at end of file +export const DATE_FORMATTER = CONFIG.dateFormatter; diff --git a/src/content/blog/markdown-elements-demo-post.mdx b/src/content/blog/markdown-elements-demo-post.mdx index f9da0f7..e18fce2 100644 --- a/src/content/blog/markdown-elements-demo-post.mdx +++ b/src/content/blog/markdown-elements-demo-post.mdx @@ -184,7 +184,7 @@ import Logo from "~/components/atoms/Logo.astro"; ```
- +
[[Top]](#top) diff --git a/src/content/config.ts b/src/content/config.ts index f76181e..3cd43f7 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -1,29 +1,27 @@ import { z, defineCollection } from 'astro:content'; const blog = defineCollection({ - schema: { - title: z.string(), - description: z.string().optional(), - image: z.string().optional(), + schema: { + title: z.string(), + description: z.string().optional(), + image: z.string().optional(), - canonical: z.string().url().optional(), - permalink: z.string().optional(), + canonical: z.string().url().optional(), + permalink: z.string().optional(), - publishDate: z - .date().or(z.string()) - .optional(), - draft: z.boolean().optional(), + publishDate: z.date().or(z.string()).optional(), + draft: z.boolean().optional(), - excerpt: z.string().optional(), - category: z.string().optional(), - tags: z.array(z.string()).optional(), - author: z.string().optional(), - }, - slug: ({ defaultSlug, data }) => { - return data.permalink || defaultSlug; - }, + excerpt: z.string().optional(), + category: z.string().optional(), + tags: z.array(z.string()).optional(), + author: z.string().optional(), + }, + slug: ({ defaultSlug, data }) => { + return data.permalink || defaultSlug; + }, }); export const collections = { - blog: blog, + blog: blog, }; diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index e1ff83e..80ff7a2 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -8,7 +8,7 @@ import { MetaSEO } from '~/types'; import { SITE } from '~/config.mjs'; export interface Props { - meta?: MetaSEO; + meta?: MetaSEO; } const { meta = {} } = Astro.props; @@ -17,17 +17,17 @@ const { language = 'en', textDirection = 'ltr' } = SITE; - - - + + + - - - - - + + + + + diff --git a/src/layouts/MarkdownLayout.astro b/src/layouts/MarkdownLayout.astro index c9f9a17..d339178 100644 --- a/src/layouts/MarkdownLayout.astro +++ b/src/layouts/MarkdownLayout.astro @@ -11,22 +11,22 @@ export interface Props {} const { frontmatter } = Astro.props; const meta: MetaSEO = { - title: frontmatter?.title, + title: frontmatter?.title, }; --- - -
-
-
-

{frontmatter.title}

-
- -
-
-
-