mirror of
https://github.com/10h30/astroplate.git
synced 2026-07-19 14:43:29 +09:00
tags pages added
This commit is contained in:
@@ -3,15 +3,15 @@ import ImageMod from "@/components/ImageMod.astro";
|
||||
import config from "@/config/config.json";
|
||||
import Base from "@/layouts/Base.astro";
|
||||
import { getListPage } from "@/lib/contentParser.astro";
|
||||
import { supportedLang } from "@/lib/utils/i18nUtils";
|
||||
import { markdownify } from "@/lib/utils/textConverter";
|
||||
import CallToAction from "@/partials/CallToAction.astro";
|
||||
import Testimonial from "@/partials/Testimonial.astro";
|
||||
import type { Button, Feature } from "@/types";
|
||||
import type { ContentEntryMap } from "astro:content";
|
||||
import type { ContentCollectionKey, ContentEntryMap } from "astro:content";
|
||||
import { getCollection } from "astro:content";
|
||||
import { FaCheck } from "react-icons/fa";
|
||||
const { defaultLang } = config.language;
|
||||
import { supportedLang } from "@/lib/utils/i18nUtils";
|
||||
const { default_language } = config.settings;
|
||||
|
||||
interface Homepage {
|
||||
banner: {
|
||||
@@ -31,22 +31,25 @@ export function getStaticPaths() {
|
||||
}
|
||||
|
||||
const { lang } = Astro.params;
|
||||
const homepage = await getListPage("homepage", lang);
|
||||
const { banner, features }: Homepage = homepage[0].data;
|
||||
const homepage: any = await getListPage(
|
||||
"homepage" as ContentCollectionKey,
|
||||
lang as keyof ContentEntryMap,
|
||||
);
|
||||
const { banner, features } = homepage[0].data;
|
||||
|
||||
const testimonial = await getCollection(
|
||||
(lang as keyof ContentEntryMap) || defaultLang,
|
||||
(lang as keyof ContentEntryMap) || default_language,
|
||||
({ id }: any) => {
|
||||
return id.startsWith("sections/testimonial") && !id.endsWith("-index.md");
|
||||
}
|
||||
},
|
||||
);
|
||||
const call_to_action = await getCollection(
|
||||
(lang as keyof ContentEntryMap) || defaultLang,
|
||||
(lang as keyof ContentEntryMap) || default_language,
|
||||
({ id }: any) => {
|
||||
return (
|
||||
id.startsWith("sections/call-to-action") && !id.endsWith("-index.md")
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
---
|
||||
|
||||
@@ -96,7 +99,7 @@ const call_to_action = await getCollection(
|
||||
|
||||
<!-- Features -->
|
||||
{
|
||||
features.map((feature, index: number) => (
|
||||
features.map((feature: Feature, index: number) => (
|
||||
<section class={`section-sm ${index % 2 === 0 && "bg-gradient"}`}>
|
||||
<div class="container">
|
||||
<div class="row items-center justify-between">
|
||||
|
||||
Reference in New Issue
Block a user