Skip to content

Commit 0d1675e

Browse files
authored
Merge pull request #42 from DaveGoosem/feature/version-updates
Feature/version updates
2 parents b2aacab + d806761 commit 0d1675e

12 files changed

Lines changed: 7366 additions & 21322 deletions

File tree

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
- uses: actions/setup-node@v4
1414
with:
1515
node-version: 20
16-
cache: yarn
17-
- run: yarn install --frozen-lockfile
18-
- run: yarn run lint
16+
cache: npm
17+
- run: npm ci
18+
- run: npm run lint

.yarn/releases/yarn-3.6.1.cjs

Lines changed: 0 additions & 874 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

app/blog/[...slug]/page.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ const layouts = {
2626
export async function generateMetadata({
2727
params,
2828
}: {
29-
params: { slug: string[] }
29+
params: Promise<{ slug: string[] }>
3030
}): Promise<Metadata | undefined> {
31-
const slug = decodeURI(params.slug.join('/'))
31+
const { slug: slugArray } = await params
32+
const slug = decodeURI(slugArray.join('/'))
3233
const post = allBlogs.find((p) => p.slug === slug)
3334
const authorList = post?.authors || ['default']
3435
const authorDetails = authorList.map((author) => {
@@ -82,8 +83,9 @@ export const generateStaticParams = async () => {
8283
return paths
8384
}
8485

85-
export default async function Page({ params }: { params: { slug: string[] } }) {
86-
const slug = decodeURI(params.slug.join('/'))
86+
export default async function Page({ params }: { params: Promise<{ slug: string[] }> }) {
87+
const { slug: slugArray } = await params
88+
const slug = decodeURI(slugArray.join('/'))
8789
// Filter out drafts in production
8890
const sortedCoreContents = allCoreContent(sortPosts(allBlogs))
8991
const postIndex = sortedCoreContents.findIndex((p) => p.slug === slug)

app/blog/page/[page]/page.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ export const generateStaticParams = async () => {
1111
return paths
1212
}
1313

14-
export default function Page({ params }: { params: { page: string } }) {
14+
export default async function Page({ params }: { params: Promise<{ page: string }> }) {
15+
const { page } = await params
1516
const posts = allCoreContent(sortPosts(allBlogs))
16-
const pageNumber = parseInt(params.page as string)
17+
const pageNumber = parseInt(page as string)
1718
const initialDisplayPosts = posts.slice(
1819
POSTS_PER_PAGE * (pageNumber - 1),
1920
POSTS_PER_PAGE * pageNumber

app/tag-data.json

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1 @@
1-
{
2-
"sitecore": 10,
3-
"SXA": 1,
4-
"CI/CD": 1,
5-
"NextJS": 6,
6-
"DevOps": 1,
7-
"SOLR": 1,
8-
"Azure": 1,
9-
"Cloud": 1,
10-
"ASP.NET": 3,
11-
"Helix": 1,
12-
"Accessibility": 1,
13-
"Architecture": 1,
14-
"SearchStax": 1,
15-
"SitecoreSend": 1,
16-
"JSS": 1,
17-
"Headless": 1,
18-
"Sitecore Send": 1,
19-
"Vercel": 1
20-
}
1+
{"atomic-design":1,"sitecore":38,"headless-cms":1,"multi-site":2,"design-systems":1,"azure":5,"cloud":7,"xmcloud":8,"sitecoreai":8,"pages":1,"saas":6,"sxa":4,"jss":9,"headless":11,"devops":2,"searchstax":2,"solr":6,"cicd":4,"vercel":4,"helix":3,"react":1,"nextjs":5,"architecture":5,"sitecore-send":2,"cdp":1,"aws":1,"accessibility":1,"security":1,"storybook":2,"unit-testing":2,"aspnet":1,"seo":1,"github-workflows":1,"composable":1,"dxp":1,"ai":1,"strategy":1}

app/tags/[tag]/page.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ import tagData from 'app/tag-data.json'
77
import { genPageMetadata } from 'app/seo'
88
import { Metadata } from 'next'
99

10-
export async function generateMetadata({ params }: { params: { tag: string } }): Promise<Metadata> {
11-
const tag = decodeURI(params.tag)
10+
export async function generateMetadata({
11+
params,
12+
}: {
13+
params: Promise<{ tag: string }>
14+
}): Promise<Metadata> {
15+
const { tag: tagParam } = await params
16+
const tag = decodeURI(tagParam)
1217
return genPageMetadata({
1318
title: tag,
1419
description: `${siteMetadata.title} ${tag} tagged content`,
@@ -30,8 +35,9 @@ export const generateStaticParams = async () => {
3035
return paths
3136
}
3237

33-
export default function TagPage({ params }: { params: { tag: string } }) {
34-
const tag = decodeURI(params.tag)
38+
export default async function TagPage({ params }: { params: Promise<{ tag: string }> }) {
39+
const { tag: tagParam } = await params
40+
const tag = decodeURI(tagParam)
3541
// Capitalize first letter and convert space to dash
3642
const title = tag[0].toUpperCase() + tag.split(' ').join('-').slice(1)
3743
const filteredPosts = allCoreContent(

next-env.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
/// <reference path="./.next/types/routes.d.ts" />
34

45
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
6+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

0 commit comments

Comments
 (0)