diff --git a/components/blocks/testimonial.tsx b/components/blocks/testimonial.tsx index e0217ba..58bb669 100644 --- a/components/blocks/testimonial.tsx +++ b/components/blocks/testimonial.tsx @@ -6,96 +6,96 @@ import { PageBlocksTestimonial } from "../../tina/__generated__/types"; import { tinaField } from "tinacms/dist/react"; export const Testimonial = ({ data }: { data: PageBlocksTestimonial }) => { - return ( -
- -
-
- + return ( +
+ +
+
+ “ - -

- {data.quote} -

- + +

+ { data.quote } +

+ ” - -
-
- -
-
-

- {data.author} -

-
-
-
-
- ); +
+
+
+ +
+ +
+
+
+ ); }; export const testimonialBlockSchema: Template = { - name: "testimonial", - label: "Testimonial", - ui: { - previewSrc: "/blocks/testimonial.png", - defaultItem: { - quote: + name: "testimonial", + label: "Testimonial", + ui: { + previewSrc: "/blocks/testimonial.png", + defaultItem: { + quote: "There are only two hard things in Computer Science: cache invalidation and naming things.", - author: "Phil Karlton", - color: "primary", + author: "Phil Karlton", + color: "primary" + } }, - }, - fields: [ - { - type: "string", - ui: { - component: "textarea", - }, - label: "Quote", - name: "quote", - }, - { - type: "string", - label: "Author", - name: "author", - }, - { - type: "string", - label: "Color", - name: "color", - options: [ - { label: "Default", value: "default" }, - { label: "Tint", value: "tint" }, - { label: "Primary", value: "primary" }, - ], - }, - ], + fields: [ + { + type: "string", + ui: { + component: "textarea" + }, + label: "Quote", + name: "quote" + }, + { + type: "string", + label: "Author", + name: "author" + }, + { + type: "string", + label: "Color", + name: "color", + options: [ + { label: "Default", value: "default" }, + { label: "Tint", value: "tint" }, + { label: "Primary", value: "primary" } + ] + } + ] }; diff --git a/next.config.js b/next.config.js index 7533b88..2cebefd 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,5 @@ module.exports = { + distDir: "build", webpack(config) { config.module.rules.push({ test: /\.svg$/i, diff --git a/package.json b/package.json index 75674e3..70d4d3c 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "build": "tinacms build && next build", "start": "tinacms build && next start", "export": "npm run build && next export", - "lint": "eslint . --ext .ts,.tsx" + "lint": "eslint . --ext .ts,.tsx", + "bullshit:build": "tinacms dev -c \"next build\"" }, "devDependencies": { "@svgr/webpack": "^6.3.1", diff --git a/pages/posts/[filename].tsx b/pages/posts/[filename].tsx index 9263d78..a33d6cc 100644 --- a/pages/posts/[filename].tsx +++ b/pages/posts/[filename].tsx @@ -44,6 +44,8 @@ export const getStaticProps = async ({ params }) => { * * So a blog post at "content/posts/hello.md" would * be viewable at http://localhost:3000/posts/hello + * + * @returns {Promise} A promise with static paths. */ export const getStaticPaths = async () => { const postsListData = await client.queries.postConnection();