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 fba8896
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Page from './[...filename]/page';

export const Index = async ({ params }) => {
return Page({
return await Page({
...params,
params: { filename: ['home'] },
});
Expand Down
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?.replace(/^\//, '') || '', // The base path of the app (could be /blog)
},
schema: {
collections: [Page, Post, Author, Global],
Expand Down

0 comments on commit fba8896

Please sign in to comment.