From 9737937d83ada811cd2e1a0179b3b5af2fcc362c Mon Sep 17 00:00:00 2001
From: Mikael <46541386+ahnl@users.noreply.github.com>
Date: Wed, 6 Nov 2024 21:19:31 +0200
Subject: [PATCH] fix: make it all work again
---
app/syslog/[slug]/page.tsx | 2 +-
.../PostFeatured3D/PostFeatured3D.module.scss | 2 +-
next-env.d.ts | 2 +-
next.config.js | 2 +-
posts/kybervarusmieshaku/post.mdx | 2 +-
posts/kybervarusmieshaku/scene.splinecode | Bin 609223 -> 609223 bytes
utils/posts.ts | 6 +++++-
utils/types.ts | 1 +
8 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/app/syslog/[slug]/page.tsx b/app/syslog/[slug]/page.tsx
index 71c0570b..2db47f76 100644
--- a/app/syslog/[slug]/page.tsx
+++ b/app/syslog/[slug]/page.tsx
@@ -160,7 +160,7 @@ export default async function Page({ params }: { params: { slug: string } }) {
{hasSpline && !isMobile ?
// NOTE: This file should not be edited
-// see https://nextjs.org/docs/basic-features/typescript for more information.
+// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
diff --git a/next.config.js b/next.config.js
index d61f3993..cf2b373e 100644
--- a/next.config.js
+++ b/next.config.js
@@ -42,7 +42,7 @@ const config = {
})
const prefix = config.assetPrefix ?? config.basePath ?? '';
config.module.rules.push({
- test: /\.mp4$/,
+ test: /\.(mp4|splinecode)$/,
use: [{
loader: 'file-loader',
options: {
diff --git a/posts/kybervarusmieshaku/post.mdx b/posts/kybervarusmieshaku/post.mdx
index 62dab6d3..9f9575af 100644
--- a/posts/kybervarusmieshaku/post.mdx
+++ b/posts/kybervarusmieshaku/post.mdx
@@ -3,7 +3,7 @@ title: Palvelus kybervarusmiehenä? Haku saapumiseriin 2/25 ja 1/26 auki!
category: Kyber
feature_image: kyber2.png
feature_spline_image: kyber-spline.jpg
-feature_spline: https://prod.spline.design/zFVjCtO2eGUcDLk7/scene.splinecode
+feature_spline: scene.splinecode
excerpt: Kybervarusmiespalvelus tunnetaan syystäkin hieman salamyhkäisenä palvelustehtävänä. Seula sisäänpääsyyn on tiukka, mutta palvelustehtävä on palkitseva.
authors:
- ts:61d8846356a221b65bfae359
diff --git a/posts/kybervarusmieshaku/scene.splinecode b/posts/kybervarusmieshaku/scene.splinecode
index ca8eb3db1e90208b77f6a4398becbe731716ae8b..4ac9d17c6b3291b2a4227b3e577114eedbbc9977 100644
GIT binary patch
delta 94
zcmX>;UG?~M)eZHW5>Gx~oX&Inv_si=J`YuAM$mtaamDi9kp5bk6qaoQy!s1jNih
r%mT!$K+Fcj?Axbva@6NA736J~DC1CJVr6eQ%NV!av4W%ZGNTy)09Yl<
delta 94
zcmX>;UG?~M)eZHW5^FA5|OG7c3cR@Shy%#7O|D>zy&GnxVb{w^W8
diff --git a/utils/posts.ts b/utils/posts.ts
index 9b8b085e..ca543f6b 100644
--- a/utils/posts.ts
+++ b/utils/posts.ts
@@ -29,10 +29,14 @@ async function getPostDetails(fileName: string) {
let splineImageUrl = null;
let splineImagePlaceholderUrl = null;
+ let splineUrl = null;
if (serialized.frontmatter.feature_spline_image) {
const splineImage = require('../posts/' + slug + '/' + serialized.frontmatter.feature_spline_image).default;
splineImageUrl = splineImage.src;
splineImagePlaceholderUrl = splineImage.blurDataURL;
+
+ const spline = require('../posts/' + slug + '/' + serialized.frontmatter.feature_spline).default;
+ splineUrl = spline;
}
const authorsResolved = await Promise.all((serialized.frontmatter.authors as string[]).map(async (id) => ({
@@ -40,7 +44,7 @@ async function getPostDetails(fileName: string) {
_id: id || ""
})));
- return {...serialized.frontmatter, slug, readingTime, imagePlaceholder, imageUrl, splineImageUrl, splineImagePlaceholderUrl, authorsResolved } as PostDetails;
+ return {...serialized.frontmatter, slug, readingTime, imagePlaceholder, imageUrl, splineImageUrl, splineImagePlaceholderUrl, splineUrl, authorsResolved } as PostDetails;
}
/**
diff --git a/utils/types.ts b/utils/types.ts
index feceb784..80b1ec40 100644
--- a/utils/types.ts
+++ b/utils/types.ts
@@ -125,4 +125,5 @@ export type PostDetails = {
feature_spline?: string;
splineImagePlaceholderUrl?: string | null;
splineImageUrl?: string | null;
+ splineUrl?: string | null;
};
\ No newline at end of file