File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -93,9 +93,6 @@ export async function generateMetadata({
9393
9494 const articleUrl = absoluteUrl ( `/posts/${ article . slug } ` ) ;
9595 const articleImage = absoluteUrl ( article . img ) ;
96- const generatedOgImage = absoluteUrl (
97- `/posts/${ article . slug } /opengraph-image` ,
98- ) ;
9996 const authorUrl = article . author ?. slug
10097 ? absoluteUrl ( `/team/${ article . author . slug } ` )
10198 : undefined ;
@@ -125,12 +122,6 @@ export async function generateMetadata({
125122 url : articleImage ,
126123 alt : article . imgAlt || article . title ,
127124 } ,
128- {
129- url : generatedOgImage ,
130- width : 1200 ,
131- height : 630 ,
132- alt : `${ article . title } on ${ SITE_NAME } ` ,
133- } ,
134125 ] ,
135126 } ,
136127 twitter : {
@@ -158,10 +149,9 @@ export default async function ArticleDetails({
158149 const articleUrl = absoluteUrl ( `/posts/${ article . slug } ` ) ;
159150 const articleImages = Array . from (
160151 new Set (
161- [
162- article . img ? absoluteUrl ( article . img ) : null ,
163- absoluteUrl ( `/posts/${ article . slug } /opengraph-image` ) ,
164- ] . filter ( ( value ) : value is string => Boolean ( value ) ) ,
152+ [ article . img ? absoluteUrl ( article . img ) : null ] . filter (
153+ ( value ) : value is string => Boolean ( value ) ,
154+ ) ,
165155 ) ,
166156 ) ;
167157 const latestArticles = ( await getPublishedArticles ( ) )
Original file line number Diff line number Diff line change 55[[plugins ]]
66 package = " @netlify/plugin-nextjs"
77
8+ [[redirects ]]
9+ from = " /&"
10+ to = " /"
11+ status = 301
12+ force = true
13+
14+ [[redirects ]]
15+ from = " /posts/*/opengraph-image"
16+ to = " /og-image.png"
17+ status = 301
18+ force = true
19+
820[[redirects ]]
921 from = " https://www.lap.onl/*"
1022 to = " https://lap.onl/:splat"
Original file line number Diff line number Diff line change @@ -4,6 +4,20 @@ const nextConfig = {
44 typescript : {
55 ignoreBuildErrors : false ,
66 } ,
7+ async redirects ( ) {
8+ return [
9+ {
10+ source : "/&" ,
11+ destination : "/" ,
12+ permanent : true ,
13+ } ,
14+ {
15+ source : "/posts/:title/opengraph-image" ,
16+ destination : "/og-image.png" ,
17+ permanent : true ,
18+ } ,
19+ ] ;
20+ } ,
721 images : {
822 remotePatterns : [
923 {
You can’t perform that action at this time.
0 commit comments