Skip to content

Commit

Permalink
Update metadata and fix date format
Browse files Browse the repository at this point in the history
  • Loading branch information
1aron committed Dec 19, 2023
1 parent 4e11214 commit f528b99
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion website/app/[locale]/(root)/blog/v2/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const metadata: Metadata = {
title: 'Master CSS 2.0',
description: 'Configuration API, progressive rendering, design system, and more!',
authors: ['Aron', 'Benseage', 'Miles', 'Lola', 'Joy'],
date: 1689190997223
date: '2023-12-19T15:04:56.712Z'
}

export default metadata
2 changes: 1 addition & 1 deletion website/app/[locale]/(root)/roadmap/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Metadata } from 'websites/types/Metadata'
const metadata: Metadata = {
title: 'Roadmap',
description: 'Currently in beta and moving towards release candidate.',
date: 1702985392011,
date: '2023-12-19T15:04:56.712Z',
category: 'v2.0'
}

Expand Down
2 changes: 1 addition & 1 deletion website/app/[locale]/play/Play.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ export default function Play(props: any) {
const databaseShareItem = generateDatabaseShareItem(shareItem)
const newShareId = await writeShareItem({
...databaseShareItem,
createdAt: new Date().getTime()
createdAt: new Date().toISOString()
})
const newSharePathname = `${props.locale === i18n.defaultLocale ? '' : `/${props.locale}`}/play/${newShareId}${window.location.search}`
setShareId(newShareId)
Expand Down
18 changes: 9 additions & 9 deletions website/og-image.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/* eslint-disable jsx-a11y/alt-text */
/* eslint-disable @next/next/no-img-element */

import type { Metadata } from 'next';
import type { Author } from 'next/dist/lib/metadata/types/metadata-types';
import type { Props } from '../../../types/Props';
import type { Metadata } from 'next'
import type { Author } from 'next/dist/lib/metadata/types/metadata-types'
import type { Props } from '../../../types/Props'

import { ImageResponse } from 'next/og';
import authors from '../../../data/authors';
import { queryDictionary } from '../../../dictionaries';
import { ImageResponse } from 'next/og'
import authors from '../../../data/authors'
import { queryDictionary } from '../../../dictionaries'
import stringWidth from 'string-width'
import fs from 'fs'
import path from 'path';
import path from 'path'
import mime from 'mime-types'

export default async function create({
Expand Down Expand Up @@ -56,8 +56,8 @@ export default async function create({
]

const readImage = (filename: string) => {
const extname = path.extname(filename);
const mimeType = mime.lookup(extname);
const extname = path.extname(filename)
const mimeType = mime.lookup(extname)
return `data:${mimeType};base64,` + fs.readFileSync(filename, { encoding: 'base64' })
}

Expand Down
1 change: 1 addition & 0 deletions website/utils/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export async function generate(
description: ogDescription,
locale: params?.locale as Locale,
}
delete requestedSearchParams.openGraph
if (requestedSearchParams.authors) {
requestedSearchParams.authors = JSON.stringify(requestedSearchParams.authors)
}
Expand Down

0 comments on commit f528b99

Please sign in to comment.