diff --git a/package.json b/package.json
index 656b226..41a1123 100755
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "astroplate",
- "version": "1.1.4",
+ "version": "1.1.5",
"description": "Astro and Tailwindcss boilerplate",
"author": "zeon.studio",
"license": "MIT",
@@ -9,20 +9,20 @@
"dev": "astro dev",
"build": "astro build",
"json": "node scripts/jsonGenerator.js",
- "format": "prettier -w ."
+ "format": "prettier -w ./src"
},
"dependencies": {
- "@astrojs/image": "^0.16.8",
- "@astrojs/mdx": "^0.19.1",
- "@astrojs/react": "^2.1.3",
- "@astrojs/rss": "^2.4.1",
+ "@astrojs/image": "^0.16.9",
+ "@astrojs/mdx": "^0.19.2",
+ "@astrojs/react": "^2.2.0",
+ "@astrojs/rss": "^2.4.2",
"@astrojs/sitemap": "^1.3.1",
- "@astrojs/tailwind": "^3.1.2",
+ "@astrojs/tailwind": "^3.1.3",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.9",
- "@types/marked": "^4.3.0",
+ "@types/marked": "^5.0.0",
"@types/react": "^18.2.6",
- "astro": "^2.4.5",
+ "astro": "^2.5.1",
"astro-auto-import": "^0.3.0",
"date-fns": "^2.30.0",
"date-fns-tz": "^2.0.0",
@@ -33,8 +33,8 @@
"marked": "^5.0.2",
"postcss": "^8.4.23",
"prettier": "^2.8.8",
- "prettier-plugin-astro": "^0.8.1",
- "prettier-plugin-tailwindcss": "^0.2.8",
+ "prettier-plugin-astro": "^0.9.0",
+ "prettier-plugin-tailwindcss": "^0.3.0",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
@@ -44,7 +44,7 @@
"remark-toc": "^8.0.1",
"sass": "^1.62.1",
"sharp": "^0.32.1",
- "swiper": "^9.3.1",
+ "swiper": "^9.3.2",
"tailwind-bootstrap-grid": "^5.0.1",
"tailwindcss": "^3.3.2"
}
diff --git a/src/content/homepage/index.md b/src/content/homepage/index.md
index 6296fd8..ee44f4c 100755
--- a/src/content/homepage/index.md
+++ b/src/content/homepage/index.md
@@ -15,12 +15,12 @@ features:
image: "/images/service-1.png"
content: "Astroplate is a comprehensive starter template that includes everything you need to get started with your Astro project. What's Included in Astroplate"
bulletpoints:
- - "10+ Pre-build pages"
- - "95+ Google Pagespeed Score"
- - "Build with Astro and TailwindCSS for easy and customizable styling"
- - "Fully responsive on all devices"
- - "SEO-optimized for better search engine rankings"
- - "**Open-source and free** for personal and commercial use"
+ - "10+ Pre-build pages"
+ - "95+ Google Pagespeed Score"
+ - "Build with Astro and TailwindCSS for easy and customizable styling"
+ - "Fully responsive on all devices"
+ - "SEO-optimized for better search engine rankings"
+ - "**Open-source and free** for personal and commercial use"
button:
enable: false
label: "Get Started Now"
@@ -30,9 +30,9 @@ features:
image: "/images/service-2.png"
content: "Astro is an all-in-one web framework for building fast, content-focused websites. It offers a range of exciting features for developers and website creators. Some of the key features are:"
bulletpoints:
- - "Zero JS, by default: No JavaScript runtime overhead to slow you down."
- - "Customizable: Tailwind, MDX, and 100+ other integrations to choose from."
- - "UI-agnostic: Supports React, Preact, Svelte, Vue, Solid, Lit and more."
+ - "Zero JS, by default: No JavaScript runtime overhead to slow you down."
+ - "Customizable: Tailwind, MDX, and 100+ other integrations to choose from."
+ - "UI-agnostic: Supports React, Preact, Svelte, Vue, Solid, Lit and more."
button:
enable: true
label: "Get Started Now"
@@ -42,10 +42,10 @@ features:
image: "/images/service-3.png"
content: "With Astro, you can build modern and content-focused websites without sacrificing performance or ease of use."
bulletpoints:
- - "Instantly load static sites for better user experience and SEO."
- - "Intuitive syntax and support for popular frameworks make learning and using Astro a breeze."
- - "Use any front-end library or framework, or build custom components, for any project size."
- - "Built on cutting-edge technology to keep your projects up-to-date with the latest web standards."
+ - "Instantly load static sites for better user experience and SEO."
+ - "Intuitive syntax and support for popular frameworks make learning and using Astro a breeze."
+ - "Use any front-end library or framework, or build custom components, for any project size."
+ - "Built on cutting-edge technology to keep your projects up-to-date with the latest web standards."
button:
enable: false
label: ""
diff --git a/src/content/pages/elements.mdx b/src/content/pages/elements.mdx
index 723aa30..f1265d8 100755
--- a/src/content/pages/elements.mdx
+++ b/src/content/pages/elements.mdx
@@ -103,7 +103,8 @@ Some text to show that the reference links can follow later.
About
-`}
+
+`}
```
---
@@ -126,7 +127,7 @@ img {
```javascript
window.addEventListener("load", (e) => {
document.querySelector(".preloader").style.display = "none";
-})
+});
```
---
@@ -146,19 +147,19 @@ window.addEventListener("load", (e) => {
### Notice
- This is a simple note.
+This is a simple note.
- This is a simple note.
+This is a simple note.
- This is a simple note.
+This is a simple note.
- This is a simple note.
+This is a simple note.
---
@@ -172,6 +173,7 @@ window.addEventListener("load", (e) => {
#### Did you come here for something in particular?
Did you come here for something in particular or just general Riker-bashing? And blowing into maximum warp speed, you appeared for an instant to be in two places at once. We have a saboteur aboard. We know you’re dealing in stolen ore. But I wanna talk about the assassination attempt on Lieutenant Worf.
+
@@ -181,6 +183,7 @@ Did you come here for something in particular or just general Riker-bashing? And
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
+
@@ -190,6 +193,7 @@ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo
+
@@ -206,7 +210,7 @@ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
---
-### Collapse
+### Accordion
@@ -254,4 +258,7 @@ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
### Custom video
-
+
diff --git a/src/content/sections/call-to-action.md b/src/content/sections/call-to-action.md
index fe1a661..86d4662 100644
--- a/src/content/sections/call-to-action.md
+++ b/src/content/sections/call-to-action.md
@@ -7,4 +7,4 @@ button:
enable: true
label: "Get Started Now"
link: "https://github.com/zeon-studio/astroplate"
----
\ No newline at end of file
+---
diff --git a/src/content/sections/testimonial.md b/src/content/sections/testimonial.md
index 8de2491..b47c6b2 100644
--- a/src/content/sections/testimonial.md
+++ b/src/content/sections/testimonial.md
@@ -5,23 +5,23 @@ description: "Don't just take our word for it - hear from some of our satisfied
# Testimonials
testimonials:
-- name: "Marvin McKinney"
- designation: "Web Designer"
- avatar: "/images/avatar-sm.png"
- content: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui iusto illo molestias, assumenda expedita commodi inventore non itaque molestiae voluptatum dolore, facilis sapiente, repellat veniam."
+ - name: "Marvin McKinney"
+ designation: "Web Designer"
+ avatar: "/images/avatar-sm.png"
+ content: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui iusto illo molestias, assumenda expedita commodi inventore non itaque molestiae voluptatum dolore, facilis sapiente, repellat veniam."
-- name: "Marvin McKinney"
- designation: "Web Designer"
- avatar: "/images/avatar-sm.png"
- content: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui iusto illo molestias, assumenda expedita commodi inventore non itaque molestiae voluptatum dolore, facilis sapiente, repellat veniam."
+ - name: "Marvin McKinney"
+ designation: "Web Designer"
+ avatar: "/images/avatar-sm.png"
+ content: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui iusto illo molestias, assumenda expedita commodi inventore non itaque molestiae voluptatum dolore, facilis sapiente, repellat veniam."
-- name: "Marvin McKinney"
- designation: "Web Designer"
- avatar: "/images/avatar-sm.png"
- content: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui iusto illo molestias, assumenda expedita commodi inventore non itaque molestiae voluptatum dolore, facilis sapiente, repellat veniam."
-
-- name: "Marvin McKinney"
- designation: "Web Designer"
- avatar: "/images/avatar-sm.png"
- content: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui iusto illo molestias, assumenda expedita commodi inventore non itaque molestiae voluptatum dolore, facilis sapiente, repellat veniam."
----
\ No newline at end of file
+ - name: "Marvin McKinney"
+ designation: "Web Designer"
+ avatar: "/images/avatar-sm.png"
+ content: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui iusto illo molestias, assumenda expedita commodi inventore non itaque molestiae voluptatum dolore, facilis sapiente, repellat veniam."
+
+ - name: "Marvin McKinney"
+ designation: "Web Designer"
+ avatar: "/images/avatar-sm.png"
+ content: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui iusto illo molestias, assumenda expedita commodi inventore non itaque molestiae voluptatum dolore, facilis sapiente, repellat veniam."
+---
diff --git a/src/hooks/useTheme.ts b/src/hooks/useTheme.ts
index 65393f1..6fac03b 100644
--- a/src/hooks/useTheme.ts
+++ b/src/hooks/useTheme.ts
@@ -1,10 +1,12 @@
-import { useEffect, useState } from 'react';
+import { useEffect, useState } from "react";
const useTheme = (): string => {
const [themeValue, setThemeValue] = useState("");
useEffect(() => {
- setThemeValue(document.documentElement.classList.contains('dark')? 'dark' : 'light');
+ setThemeValue(
+ document.documentElement.classList.contains("dark") ? "dark" : "light"
+ );
}, []);
return themeValue;
diff --git a/src/layouts/PostSingle.astro b/src/layouts/PostSingle.astro
index b89994e..f0f92aa 100755
--- a/src/layouts/PostSingle.astro
+++ b/src/layouts/PostSingle.astro
@@ -6,12 +6,12 @@ import Disqus from "@/function-components/Disqus";
import { getSinglePage } from "@/lib/contentParser.astro";
import dateFormat from "@/lib/utils/dateFormat";
import similerItems from "@/lib/utils/similarItems";
-import { humanize,markdownify,slugify } from "@/lib/utils/textConverter";
+import { humanize, markdownify, slugify } from "@/lib/utils/textConverter";
import { Image } from "@astrojs/image/components";
import {
-FaRegClock,
-FaRegFolder,
-FaRegUserCircle,
+ FaRegClock,
+ FaRegFolder,
+ FaRegUserCircle,
} from "react-icons/fa/index.js";
const { blog_folder } = config.settings;
diff --git a/src/layouts/components/BlogCard.astro b/src/layouts/components/BlogCard.astro
index bdb01cc..979b309 100644
--- a/src/layouts/components/BlogCard.astro
+++ b/src/layouts/components/BlogCard.astro
@@ -4,7 +4,10 @@ import config from "@/config/config.json";
import { humanize, plainify, slugify } from "@/lib/utils/textConverter";
import { FaRegFolder, FaRegUserCircle } from "react-icons/fa/index.js";
-const { summary_length, blog_folder }: {summary_length: number, blog_folder: string} = config.settings;
+const {
+ summary_length,
+ blog_folder,
+}: { summary_length: number; blog_folder: string } = config.settings;
const { data } = Astro.props;
const { title, image, date, author, categories } = data.data;
---
diff --git a/src/layouts/components/Breadcrumbs.astro b/src/layouts/components/Breadcrumbs.astro
index 9b746aa..a04953f 100644
--- a/src/layouts/components/Breadcrumbs.astro
+++ b/src/layouts/components/Breadcrumbs.astro
@@ -1,7 +1,7 @@
---
import { humanize } from "@/lib/utils/textConverter";
-const { className }: {className?: string} = Astro.props;
+const { className }: { className?: string } = Astro.props;
const paths = Astro.url.pathname.split("/").filter((x) => x);
let parts = [
diff --git a/src/layouts/components/Logo.astro b/src/layouts/components/Logo.astro
index faaa435..1f47c6b 100644
--- a/src/layouts/components/Logo.astro
+++ b/src/layouts/components/Logo.astro
@@ -2,7 +2,8 @@
import { Image } from "@astrojs/image/components";
import config from "@/config/config.json";
-const { src, srcDarkmode } : {src?: string, srcDarkmode?: string} = Astro.props;
+const { src, srcDarkmode }: { src?: string; srcDarkmode?: string } =
+ Astro.props;
const {
logo,
logo_darkmode,
diff --git a/src/layouts/components/Pagination.astro b/src/layouts/components/Pagination.astro
index 874c52a..3e42979 100644
--- a/src/layouts/components/Pagination.astro
+++ b/src/layouts/components/Pagination.astro
@@ -1,8 +1,10 @@
---
type Pagination = {
- section?: string, currentPage?: number, totalPages?: number
-}
-const { section, currentPage=1, totalPages=1 }: Pagination = Astro.props;
+ section?: string;
+ currentPage?: number;
+ totalPages?: number;
+};
+const { section, currentPage = 1, totalPages = 1 }: Pagination = Astro.props;
const indexPageLink = currentPage === 2;
const hasPrevPage = currentPage > 1;
diff --git a/src/layouts/components/Share.astro b/src/layouts/components/Share.astro
index 9193c02..448b419 100644
--- a/src/layouts/components/Share.astro
+++ b/src/layouts/components/Share.astro
@@ -7,8 +7,14 @@ import {
IoLogoTwitter,
} from "react-icons/io5/index.js";
-const { base_url }: {base_url: string} = config.site;
-const { title, description, slug, className }: {title?: string, description?: string, slug?: string, className?: string} = Astro.props;
+const { base_url }: { base_url: string } = config.site;
+const {
+ title,
+ description,
+ slug,
+ className,
+}: { title?: string; description?: string; slug?: string; className?: string } =
+ Astro.props;
---
diff --git a/src/layouts/components/Social.astro b/src/layouts/components/Social.astro
index a4a6d2b..a5358e8 100755
--- a/src/layouts/components/Social.astro
+++ b/src/layouts/components/Social.astro
@@ -36,38 +36,38 @@ import {
} from "react-icons/io5/index.js";
type SocialLink = {
- facebook: string,
- twitter: string,
- mastodon: string,
- instagram: string,
- youtube: string,
- linkedin: string,
- github: string,
- gitlab: string,
- discord: string,
- slack: string,
- medium: string,
- codepen: string,
- bitbucket: string,
- dribbble: string,
- behance: string,
- pinterest: string,
- soundcloud: string,
- tumblr: string,
- reddit: string,
- vk: string,
- whatsapp: string,
- snapchat: string,
- vimeo: string,
- tiktok: string,
- foursquare: string,
- rss: string,
- email: string,
- phone: string,
- address: string,
- skype: string,
- website: string,
-}
+ facebook: string;
+ twitter: string;
+ mastodon: string;
+ instagram: string;
+ youtube: string;
+ linkedin: string;
+ github: string;
+ gitlab: string;
+ discord: string;
+ slack: string;
+ medium: string;
+ codepen: string;
+ bitbucket: string;
+ dribbble: string;
+ behance: string;
+ pinterest: string;
+ soundcloud: string;
+ tumblr: string;
+ reddit: string;
+ vk: string;
+ whatsapp: string;
+ snapchat: string;
+ vimeo: string;
+ tiktok: string;
+ foursquare: string;
+ rss: string;
+ email: string;
+ phone: string;
+ address: string;
+ skype: string;
+ website: string;
+};
const {
facebook,
twitter,
diff --git a/src/layouts/components/ThemeSwitcher.astro b/src/layouts/components/ThemeSwitcher.astro
index 7d49179..04266a3 100755
--- a/src/layouts/components/ThemeSwitcher.astro
+++ b/src/layouts/components/ThemeSwitcher.astro
@@ -1,47 +1,46 @@
---
import config from "@/config/config.json";
-const { theme_switcher, default_theme }: { theme_switcher: boolean, default_theme: string } = config.settings;
-const {className}: {className?: string} = Astro.props;
+const {
+ theme_switcher,
+ default_theme,
+}: { theme_switcher: boolean; default_theme: string } = config.settings;
+const { className }: { className?: string } = Astro.props;
---
{
theme_switcher && (
-
-
-
- theme switcher
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ theme switcher
+
+
+
+
+
+
+
+
+
+
)
}
diff --git a/src/layouts/components/TwSizeIndicator.astro b/src/layouts/components/TwSizeIndicator.astro
index 0f82a73..3bf4a44 100755
--- a/src/layouts/components/TwSizeIndicator.astro
+++ b/src/layouts/components/TwSizeIndicator.astro
@@ -3,7 +3,7 @@
{
process.env.NODE_ENV === "development" && (
-
+
all
sm
md
diff --git a/src/layouts/partials/Footer.astro b/src/layouts/partials/Footer.astro
index b8c57b6..998b76f 100755
--- a/src/layouts/partials/Footer.astro
+++ b/src/layouts/partials/Footer.astro
@@ -6,7 +6,7 @@ import menu from "@/config/menu.json";
import social from "@/config/social.json";
import { markdownify } from "@/lib/utils/textConverter";
-const {footer}: {footer: {name: string, url: string}[]} = menu;
+const { footer }: { footer: { name: string; url: string }[] } = menu;
---
diff --git a/src/layouts/partials/PageHeader.astro b/src/layouts/partials/PageHeader.astro
index 4a36179..971e1bd 100644
--- a/src/layouts/partials/PageHeader.astro
+++ b/src/layouts/partials/PageHeader.astro
@@ -2,7 +2,7 @@
import Breadcrumbs from "@/components/Breadcrumbs.astro";
import { humanize } from "@/lib/utils/textConverter";
-const { title="" }: {title?: string} = Astro.props;
+const { title = "" }: { title?: string } = Astro.props;
---
diff --git a/src/layouts/shortcodes/Button.tsx b/src/layouts/shortcodes/Button.tsx
index f39ba89..58edd6a 100755
--- a/src/layouts/shortcodes/Button.tsx
+++ b/src/layouts/shortcodes/Button.tsx
@@ -9,7 +9,7 @@ const Button = ({
href: string;
style: string | null;
rel: string | null;
- children: any;
+ children: string;
}) => {
return (
{children}
diff --git a/src/layouts/shortcodes/Tabs.tsx b/src/layouts/shortcodes/Tabs.tsx
index 92a4829..bfc2867 100644
--- a/src/layouts/shortcodes/Tabs.tsx
+++ b/src/layouts/shortcodes/Tabs.tsx
@@ -1,7 +1,12 @@
import { marked } from "marked";
import React, { useEffect, useRef, useState } from "react";
-const Tabs = ({ children }: {children: React.ReactElement}) => {
+marked.use({
+ mangle: false,
+ headerIds: false,
+});
+
+const Tabs = ({ children }: { children: React.ReactElement }) => {
const [active, setActive] = useState(0);
const [defaultFocus, setDefaultFocus] = useState(false);
@@ -22,7 +27,10 @@ const Tabs = ({ children }: {children: React.ReactElement}) => {
(match: RegExpMatchArray) => ({ name: match[1], children: match[0] })
);
- const handleKeyDown = (event: React.KeyboardEvent, index: number) => {
+ const handleKeyDown = (
+ event: React.KeyboardEvent,
+ index: number
+ ) => {
if (event.key === "Enter" || event.key === " ") {
setActive(index);
} else if (event.key === "ArrowRight") {
@@ -35,26 +43,29 @@ const Tabs = ({ children }: {children: React.ReactElement}) => {
return (
- {tabLinks.map((item: {name: string, children: string}, index: number) => (
- handleKeyDown(event, index)}
- onClick={() => setActive(index)}
- //@ts-ignore
- ref={(ref) => (tabRefs.current[index] = ref)}
- >
- {item.name}
-
- ))}
+ {tabLinks.map(
+ (item: { name: string; children: string }, index: number) => (
+ handleKeyDown(event, index)}
+ onClick={() => setActive(index)}
+ //@ts-ignore
+ ref={(ref) => (tabRefs.current[index] = ref)}
+ >
+ {item.name}
+
+ )
+ )}
- {tabLinks.map((item: {name: string, children: string}, i: number) => (
+ {tabLinks.map((item: { name: string; children: string }, i: number) => (
))}
diff --git a/src/lib/utils/dateFormat.ts b/src/lib/utils/dateFormat.ts
index 65b2397..dd4664f 100755
--- a/src/lib/utils/dateFormat.ts
+++ b/src/lib/utils/dateFormat.ts
@@ -1,6 +1,9 @@
import { formatInTimeZone } from "date-fns-tz";
-const dateFormat = (date:Date | string, format:string = "dd MMM, yyyy"): string => {
+const dateFormat = (
+ date: Date | string,
+ format: string = "dd MMM, yyyy"
+): string => {
return formatInTimeZone(date, "America/New_York", format);
};
diff --git a/src/lib/utils/sortFunctions.ts b/src/lib/utils/sortFunctions.ts
index 9f8c1d7..b14f075 100644
--- a/src/lib/utils/sortFunctions.ts
+++ b/src/lib/utils/sortFunctions.ts
@@ -1,7 +1,7 @@
// sort by date
export const sortByDate = (array: any[]) => {
const sortedArray = array.sort(
- (a:any, b:any) =>
+ (a: any, b: any) =>
new Date(b.data.date && b.data.date).valueOf() -
new Date(a.data.date && a.data.date).valueOf()
);
diff --git a/src/lib/utils/textConverter.ts b/src/lib/utils/textConverter.ts
index a2354cb..e3f9edd 100644
--- a/src/lib/utils/textConverter.ts
+++ b/src/lib/utils/textConverter.ts
@@ -1,4 +1,4 @@
-import { slug } from 'github-slugger';
+import { slug } from "github-slugger";
import { marked } from "marked";
marked.use({
@@ -8,18 +8,16 @@ marked.use({
// slugify
export const slugify = (content: string): string => {
-
return slug(content);
};
// markdownify
-export const markdownify = (content: string, div?:boolean): string => {
- return div? marked.parse(content) : marked.parseInline(content);
+export const markdownify = (content: string, div?: boolean): string => {
+ return div ? marked.parse(content) : marked.parseInline(content);
};
// humanize
export const humanize = (content: string): string => {
-
return content
.replace(/^[\s_]+|[\s_]+$/g, "")
.replace(/[_\s]+/g, " ")
diff --git a/src/pages/[regular].astro b/src/pages/[regular].astro
index 43bb11c..7879c79 100755
--- a/src/pages/[regular].astro
+++ b/src/pages/[regular].astro
@@ -3,7 +3,7 @@ import Base from "@/layouts/Base.astro";
import { getSinglePage } from "@/lib/contentParser.astro";
import PageHeader from "@/partials/PageHeader.astro";
-export async function getStaticPaths(): Promise<{params: {regular: string}}[]> {
+export async function getStaticPaths() {
const pages = await getSinglePage("pages");
const paths = pages.map((page) => ({
diff --git a/src/pages/authors/[single].astro b/src/pages/authors/[single].astro
index c27f583..f71b1e2 100755
--- a/src/pages/authors/[single].astro
+++ b/src/pages/authors/[single].astro
@@ -1,14 +1,15 @@
---
-import { Image } from "@astrojs/image/components";
import BlogCard from "@/components/BlogCard.astro";
import Social from "@/components/Social.astro";
import config from "@/config/config.json";
import Base from "@/layouts/Base.astro";
import { getSinglePage } from "@/lib/contentParser.astro";
import { slugify } from "@/lib/utils/textConverter";
-import type { Blog_folder } from "types";
+import { Image } from "@astrojs/image/components";
-export async function getStaticPaths(): Promise<{params: {single: string}, props: {author: string}}[]> {
+export async function getStaticPaths(): Promise<
+ { params: { single: string }; props: { author: string } }[]
+> {
const authors = await getSinglePage("authors");
const paths = authors.map((author) => ({
@@ -20,7 +21,7 @@ export async function getStaticPaths(): Promise<{params: {single: string}, props
return paths;
}
-const { blog_folder }: Blog_folder = config.settings;
+const { blog_folder }: { blog_folder: string } = config.settings;
const { author } = Astro.props;
const { title, social, meta_title, description, image } = author.data;
const { Content } = await author.render();
diff --git a/src/pages/categories/[category].astro b/src/pages/categories/[category].astro
index d6b9d9c..8a62dc6 100755
--- a/src/pages/categories/[category].astro
+++ b/src/pages/categories/[category].astro
@@ -7,7 +7,9 @@ import { getTaxonomy } from "@/lib/taxonomyParser.astro";
import taxonomyFilter from "@/lib/utils/taxonomyFilter";
import PageHeader from "@/partials/PageHeader.astro";
-export async function getStaticPaths(): Promise<{params: {category: string}}[]> {
+export async function getStaticPaths(): Promise<
+ { params: { category: string } }[]
+> {
const categories = await getTaxonomy(
config.settings.blog_folder,
"categories"
diff --git a/src/pages/categories/index.astro b/src/pages/categories/index.astro
index 107cdd6..82161fb 100755
--- a/src/pages/categories/index.astro
+++ b/src/pages/categories/index.astro
@@ -4,9 +4,8 @@ import Base from "@/layouts/Base.astro";
import { getAllTaxonomy, getTaxonomy } from "@/lib/taxonomyParser.astro";
import { humanize } from "@/lib/utils/textConverter";
import PageHeader from "@/partials/PageHeader.astro";
-import type { Blog_folder } from "types";
-const { blog_folder }: Blog_folder = config.settings;
+const { blog_folder }: { blog_folder: string } = config.settings;
const categories = await getTaxonomy(blog_folder, "categories");
const allCategories = await getAllTaxonomy(blog_folder, "categories");
---
diff --git a/src/pages/contact.astro b/src/pages/contact.astro
index 2a66c73..7e91a94 100644
--- a/src/pages/contact.astro
+++ b/src/pages/contact.astro
@@ -5,7 +5,7 @@ import PageHeader from "@/partials/PageHeader.astro";
import { getEntryBySlug } from "astro:content";
const entry = await getEntryBySlug("pages", "contact");
-const { contact_form_action }: {contact_form_action: string} = config.params;
+const { contact_form_action }: { contact_form_action: string } = config.params;
const { title, description, meta_title, image } = entry.data;
---
diff --git a/src/pages/index.astro b/src/pages/index.astro
index dcad88f..cdb38dc 100755
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -10,12 +10,12 @@ import type { Button, Feature } from "types";
interface Homepage {
banner: {
- title: string
- content: string,
- image: string,
- button: Button,
- }
- features: Feature[]
+ title: string;
+ content: string;
+ image: string;
+ button: Button;
+ };
+ features: Feature[];
}
const homepage = await getEntryBySlug("homepage", "index");
@@ -59,55 +59,43 @@ const { banner, features }: Homepage = homepage.data;
{
- features.map(
- (
- feature,
- index: number
- ) => (
-
-
-
-
-
-
-
-
-
-
- {feature.bulletpoints.map((bullet: string) => (
-
-
-
-
- ))}
-
- {feature.button.enable && (
-
- {feature.button.label}
-
- )}
-
+ features.map((feature, index: number) => (
+
+
+
+
+
+
+
+
+
+
+ {feature.bulletpoints.map((bullet: string) => (
+
+
+
+
+ ))}
+
+ {feature.button.enable && (
+
+ {feature.button.label}
+
+ )}
-
- )
- )
+
+
+ ))
}
diff --git a/src/pages/posts/[single].astro b/src/pages/posts/[single].astro
index 4d7b28d..c4a9770 100755
--- a/src/pages/posts/[single].astro
+++ b/src/pages/posts/[single].astro
@@ -4,7 +4,9 @@ import Base from "@/layouts/Base.astro";
import PostSingle from "@/layouts/PostSingle.astro";
import { getSinglePage } from "@/lib/contentParser.astro";
-export async function getStaticPaths(): Promise<{params: {single: string}, props: {post: any}}[]> {
+export async function getStaticPaths(): Promise<
+ { params: { single: string }; props: { post: any } }[]
+> {
const posts = await getSinglePage(config.settings.blog_folder);
const paths = posts.map((post) => ({
diff --git a/src/pages/tags/index.astro b/src/pages/tags/index.astro
index f00ac14..ceccffa 100755
--- a/src/pages/tags/index.astro
+++ b/src/pages/tags/index.astro
@@ -4,9 +4,8 @@ import Base from "@/layouts/Base.astro";
import { getAllTaxonomy, getTaxonomy } from "@/lib/taxonomyParser.astro";
import { humanize } from "@/lib/utils/textConverter";
import PageHeader from "@/partials/PageHeader.astro";
-import type { Blog_folder } from "types";
-const { blog_folder }: Blog_folder = config.settings;
+const { blog_folder }: { blog_folder: string } = config.settings;
const tags = await getTaxonomy(blog_folder, "tags");
const allTags = await getAllTaxonomy(blog_folder, "tags");
---
diff --git a/types/index.d.ts b/types/index.d.ts
index ade2158..acb3d63 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -1,15 +1,13 @@
-export type Feature = {
- button: button
- image: string
- bulletpoints: string[]
- content: string
- title: string
-}
+export type Feature = {
+ button: button;
+ image: string;
+ bulletpoints: string[];
+ content: string;
+ title: string;
+};
export type Button = {
- enable: boolean
- label: string
- link: string
-}
-
-export type Blog_folder = {blog_folder: string};
\ No newline at end of file
+ enable: boolean;
+ label: string;
+ link: string;
+};