aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--middleware/src/app/[gameName]/page.tsx4
-rw-r--r--site/src/components/NewsFeed.tsx3
2 files changed, 4 insertions, 3 deletions
diff --git a/middleware/src/app/[gameName]/page.tsx b/middleware/src/app/[gameName]/page.tsx
index 8bf9c0b..76d883b 100644
--- a/middleware/src/app/[gameName]/page.tsx
+++ b/middleware/src/app/[gameName]/page.tsx
@@ -48,10 +48,10 @@ export async function generateMetadata({
}
return {
title: matchingPost.headline,
- description: matchingPost.content.slice(0, 100),
+ description: matchingPost.content.slice(0, 300),
openGraph: {
title: matchingPost.headline,
- description: matchingPost.content.slice(0, 100),
+ description: matchingPost.content.slice(0, 300),
images: matchingPost.images?.[0]?.image
? [matchingPost.images[0].image]
: [],
diff --git a/site/src/components/NewsFeed.tsx b/site/src/components/NewsFeed.tsx
index fe81148..62d4420 100644
--- a/site/src/components/NewsFeed.tsx
+++ b/site/src/components/NewsFeed.tsx
@@ -129,7 +129,8 @@ export const NewsFeed: React.FC<NewsFeedProps> = ({ newsItems }) => {
href={`#${newsId}`}
onClick={(e) => {
e.preventDefault();
- const url = `${window.location.origin}${window.location.pathname}#${newsId}`;
+ const pathname = window.location.pathname === '/' ? '/news' : window.location.pathname.replace(/^\/game/, '');
+ const url = `https://ac.moekyun.me${pathname}?post=${newsId}`;
navigator.clipboard.writeText(url);
alert("Copied Direct Link to Post (Older news are automatically culled after some time)");
}}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage