Skip to content

Commit

Permalink
tina config - source basepath from next config
Browse files Browse the repository at this point in the history
  • Loading branch information
wicksipedia committed Jan 20, 2025
1 parent e4c888e commit 3ca3ab1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion next.config.js → next.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = {
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
images: {
remotePatterns: [
{
Expand Down Expand Up @@ -30,3 +32,5 @@ module.exports = {
];
},
};

export default nextConfig;
2 changes: 2 additions & 0 deletions tina/config.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineConfig } from "tinacms";
import nextConfig from "../next.config";

import Post from "./collection/post";
import Global from "./collection/global";
Expand Down Expand Up @@ -27,6 +28,7 @@ const config = defineConfig({
build: {
publicFolder: "public", // The public asset folder for your framework
outputFolder: "admin", // within the public folder
basePath: nextConfig.basePath || "",
},
schema: {
collections: [Page, Post, Author, Global],
Expand Down

0 comments on commit 3ca3ab1

Please sign in to comment.