Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
- run: yarn install --frozen-lockfile
- run: yarn run lint
cache: npm
- run: npm ci
- run: npm run lint
874 changes: 0 additions & 874 deletions .yarn/releases/yarn-3.6.1.cjs

This file was deleted.

3 changes: 0 additions & 3 deletions .yarnrc.yml

This file was deleted.

10 changes: 6 additions & 4 deletions app/blog/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ const layouts = {
export async function generateMetadata({
params,
}: {
params: { slug: string[] }
params: Promise<{ slug: string[] }>
}): Promise<Metadata | undefined> {
const slug = decodeURI(params.slug.join('/'))
const { slug: slugArray } = await params
const slug = decodeURI(slugArray.join('/'))
const post = allBlogs.find((p) => p.slug === slug)
const authorList = post?.authors || ['default']
const authorDetails = authorList.map((author) => {
Expand Down Expand Up @@ -82,8 +83,9 @@ export const generateStaticParams = async () => {
return paths
}

export default async function Page({ params }: { params: { slug: string[] } }) {
const slug = decodeURI(params.slug.join('/'))
export default async function Page({ params }: { params: Promise<{ slug: string[] }> }) {
const { slug: slugArray } = await params
const slug = decodeURI(slugArray.join('/'))
// Filter out drafts in production
const sortedCoreContents = allCoreContent(sortPosts(allBlogs))
const postIndex = sortedCoreContents.findIndex((p) => p.slug === slug)
Expand Down
5 changes: 3 additions & 2 deletions app/blog/page/[page]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ export const generateStaticParams = async () => {
return paths
}

export default function Page({ params }: { params: { page: string } }) {
export default async function Page({ params }: { params: Promise<{ page: string }> }) {
const { page } = await params
const posts = allCoreContent(sortPosts(allBlogs))
const pageNumber = parseInt(params.page as string)
const pageNumber = parseInt(page as string)
const initialDisplayPosts = posts.slice(
POSTS_PER_PAGE * (pageNumber - 1),
POSTS_PER_PAGE * pageNumber
Expand Down
21 changes: 1 addition & 20 deletions app/tag-data.json
Original file line number Diff line number Diff line change
@@ -1,20 +1 @@
{
"sitecore": 10,
"SXA": 1,
"CI/CD": 1,
"NextJS": 6,
"DevOps": 1,
"SOLR": 1,
"Azure": 1,
"Cloud": 1,
"ASP.NET": 3,
"Helix": 1,
"Accessibility": 1,
"Architecture": 1,
"SearchStax": 1,
"SitecoreSend": 1,
"JSS": 1,
"Headless": 1,
"Sitecore Send": 1,
"Vercel": 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}
14 changes: 10 additions & 4 deletions app/tags/[tag]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ import tagData from 'app/tag-data.json'
import { genPageMetadata } from 'app/seo'
import { Metadata } from 'next'

export async function generateMetadata({ params }: { params: { tag: string } }): Promise<Metadata> {
const tag = decodeURI(params.tag)
export async function generateMetadata({
params,
}: {
params: Promise<{ tag: string }>
}): Promise<Metadata> {
const { tag: tagParam } = await params
const tag = decodeURI(tagParam)
return genPageMetadata({
title: tag,
description: `${siteMetadata.title} ${tag} tagged content`,
Expand All @@ -30,8 +35,9 @@ export const generateStaticParams = async () => {
return paths
}

export default function TagPage({ params }: { params: { tag: string } }) {
const tag = decodeURI(params.tag)
export default async function TagPage({ params }: { params: Promise<{ tag: string }> }) {
const { tag: tagParam } = await params
const tag = decodeURI(tagParam)
// Capitalize first letter and convert space to dash
const title = tag[0].toUpperCase() + tag.split(' ').join('-').slice(1)
const filteredPosts = allCoreContent(
Expand Down
3 changes: 2 additions & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />

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