From b04689353ff2e9daca2c9fb2ab8cd5a0b7309f93 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 17 Jul 2023 17:26:18 -0400 Subject: New page; Post now sorts by dates --- app/page.js | 16 +++++++++++++--- app/services/page.js | 38 +++++++++++++++++++++++++++++++++++++- app/updates/[slug]/page.js | 14 ++++++++++++-- 3 files changed, 62 insertions(+), 6 deletions(-) (limited to 'app') diff --git a/app/page.js b/app/page.js index ec05d34..60f5965 100644 --- a/app/page.js +++ b/app/page.js @@ -1,8 +1,16 @@ +import getPostMetadata from "@/components/updates/getPostMetadata"; +import PostPreview from "@/components/updates/PostPreview"; +import Link from "next/link"; + export const metadata = { title: 'Home - Government of Alure Regions', description: 'The official website of the Government of Alure Regions', } export default function Home() { + const postMetadata = getPostMetadata(); + const postPreviews = postMetadata.slice(0,3).map((post) => ( + + )); return (
@@ -51,10 +59,12 @@ export default function Home() {

About Alure Regions

-

Founded in July 2023, the goal of Alure Regions is to have more freedom on our regions.

-

Originally Alee Isle Regions then formed to become Southeastern Islands and then split from it.

-

We strife on trying to become stronger and better, as small regions.

+

Alure Regions was founded in July 2023 with the goal of achieving greater autonomy in our regions.

+

Originally known as Alee Isle Regions, we later became Southeastern Islands before branching out on our own.

+

We are committed to continuous improvement and growth as small regions.

Latest Updates

+
{postPreviews}
+

View more

) diff --git a/app/services/page.js b/app/services/page.js index 3e0044d..c91b92e 100644 --- a/app/services/page.js +++ b/app/services/page.js @@ -2,13 +2,49 @@ import Header from "@/components/Header"; export const metadata = { title: 'Services', - description: 'Information whether its safe to travel to other countries', + description: 'Local services that we have here in Alure Regions', } export default function Services() { return (
+
+
    +
  • +
    +
    +

    Alure Post

    +

    Local and international postal service

    +
    +
    +
  • +
  • +
    +
    +

    ExploreAlure

    +

    Tourism service

    +
    +
    +
  • +
  • +
    +
    +

    MinePot

    +

    International restaurant

    +
    +
    +
  • +
  • +
    +
    +

    Intel Computer Shop

    +

    International computer shop

    +
    +
    +
  • +
+
) } diff --git a/app/updates/[slug]/page.js b/app/updates/[slug]/page.js index aa0ef9b..d91440e 100644 --- a/app/updates/[slug]/page.js +++ b/app/updates/[slug]/page.js @@ -11,6 +11,16 @@ const getPostContent = (slug) => { return matter(content); } +export function generateMetadata(props) { + const slug = props.params.slug; + const post = getPostContent(slug); + + return { + title: post.data.title, + description: post.data.description + } +} + export const generateStaticParams = async () => { const posts = getPostMetadata(); return posts.map((post) => ({ @@ -26,12 +36,12 @@ export default function PostPage(props) {

{post.data.title}

-

{post.data.author} | {DateFormatter(post.data.date)}

+ {post.data.author} | {DateFormatter(post.data.date)}

{post.data.description}

-
+
{post.content}
-- cgit v1.2.3