@opinly/next 0.1.20 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/blog-post/index.cjs +0 -1
- package/dist/components/blog-post/index.cjs.map +1 -1
- package/dist/components/blog-post/index.js +0 -1
- package/dist/components/blog-post/index.js.map +1 -1
- package/dist/components/home-page/index.cjs +0 -1
- package/dist/components/home-page/index.cjs.map +1 -1
- package/dist/components/home-page/index.js +0 -1
- package/dist/components/home-page/index.js.map +1 -1
- package/dist/components/post-preview.cjs +0 -1
- package/dist/components/post-preview.cjs.map +1 -1
- package/dist/components/post-preview.js +0 -1
- package/dist/components/post-preview.js.map +1 -1
- package/dist/pages/opinly-blog-pages.cjs +0 -1
- package/dist/pages/opinly-blog-pages.cjs.map +1 -1
- package/dist/pages/opinly-blog-pages.js +0 -1
- package/dist/pages/opinly-blog-pages.js.map +1 -1
- package/package.json +2 -2
|
@@ -48,7 +48,6 @@ const BlogPost = ({
|
|
|
48
48
|
classNames = {}
|
|
49
49
|
}) => {
|
|
50
50
|
const content = post.content;
|
|
51
|
-
console.log("is app router", !import_sdk_config.opinlyConfig.pagesRouter);
|
|
52
51
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
53
52
|
post.faqs && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
53
|
import_script.default,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/blog-post/index.tsx"],"sourcesContent":["import React from \"react\";\nimport { JSONContent } from \"@tiptap/core\";\nimport Link from \"next/link\";\nimport { cn } from \"../../utils/merge\";\nimport { opinlyConfig } from \"../../utils/sdk-config\";\nimport { BlogPostRes } from \"./_types/blog-post\";\nimport {\n genBlogPostingJSONLD,\n genBreadcrumbJSONLD,\n genFaqJSONLD,\n} from \"./_helpers/json-ld\";\nimport { BlogComponentClassNames } from \"./_types/class-names\";\nimport { FAQS } from \"./_components/faq\";\nimport { calculateReadingTime } from \"./_helpers/reading-time\";\nimport { Content } from \"./_components/content\";\nimport { TableOfContents } from \"./_components/table-of-contents\";\nimport { BreadCrumbs } from \"../bread-crumbs\";\nimport { formatDate } from \"../../utils/dates\";\nimport Script from \"next/script\";\n\nexport const BlogPost = ({\n post,\n classNames = {},\n}: {\n post: BlogPostRes;\n classNames?: BlogComponentClassNames;\n notFoundComponent?: React.ReactNode;\n}) => {\n const content = post.content as JSONContent;\n\n
|
|
1
|
+
{"version":3,"sources":["../../../src/components/blog-post/index.tsx"],"sourcesContent":["import React from \"react\";\nimport { JSONContent } from \"@tiptap/core\";\nimport Link from \"next/link\";\nimport { cn } from \"../../utils/merge\";\nimport { opinlyConfig } from \"../../utils/sdk-config\";\nimport { BlogPostRes } from \"./_types/blog-post\";\nimport {\n genBlogPostingJSONLD,\n genBreadcrumbJSONLD,\n genFaqJSONLD,\n} from \"./_helpers/json-ld\";\nimport { BlogComponentClassNames } from \"./_types/class-names\";\nimport { FAQS } from \"./_components/faq\";\nimport { calculateReadingTime } from \"./_helpers/reading-time\";\nimport { Content } from \"./_components/content\";\nimport { TableOfContents } from \"./_components/table-of-contents\";\nimport { BreadCrumbs } from \"../bread-crumbs\";\nimport { formatDate } from \"../../utils/dates\";\nimport Script from \"next/script\";\n\nexport const BlogPost = ({\n post,\n classNames = {},\n}: {\n post: BlogPostRes;\n classNames?: BlogComponentClassNames;\n notFoundComponent?: React.ReactNode;\n}) => {\n const content = post.content as JSONContent;\n\n return (\n <>\n {post.faqs && (\n <Script\n strategy=\"beforeInteractive\"\n type=\"application/ld+json\"\n dangerouslySetInnerHTML={{\n __html: JSON.stringify(genFaqJSONLD(post.faqs)).replace(\n /</g,\n \"\\\\u003c\"\n ),\n }}\n />\n )}\n <Script\n strategy=\"beforeInteractive\"\n type=\"application/ld+json\"\n dangerouslySetInnerHTML={{\n __html: JSON.stringify(genBlogPostingJSONLD(post)),\n }}\n />\n <Script\n strategy=\"beforeInteractive\"\n type=\"application/ld+json\"\n dangerouslySetInnerHTML={{\n __html: JSON.stringify(genBreadcrumbJSONLD(post)),\n }}\n />\n <div className=\"max-w-7xl mx-auto px-4 py-24 flex items-start space-x-8\">\n <div className=\"flex flex-col gap-12 w-full\">\n <div>\n <BreadCrumbs\n breadcrumbs={[\n post.folder && {\n url: `${opinlyConfig.blogPrefix}/${post.folder.slug}`,\n name: post.folder.name,\n },\n ]}\n />\n\n <h1 className=\"text-op-heading text-4xl font-bold mb-2 leading-tight\">\n {post.title}\n </h1>\n <div className=\"text-sm mb-4 text-op-muted space-x-1\">\n {post.author && (\n <>\n <Link\n href={`${opinlyConfig.blogPrefix}/authors/${post.author?.slug}`}\n className=\"font-medium\"\n >\n {post.author?.name}\n </Link>{\" \"}\n <span className=\"text-op-muted\">·</span>\n </>\n )}\n <span>\n {calculateReadingTime(content)} min read <span>·</span>\n </span>\n <span>\n {formatDate(post.firstPublishedAt as string) || \"Today\"}\n </span>\n </div>\n </div>\n\n <div\n className={cn(\n \"flex md:space-x-12 flex-col mx-auto w-full\",\n \"md:flex-row-reverse\",\n classNames.container\n )}\n >\n <article className=\"w-full md:w-3/4 order-2 md:order-1 flex items-start\">\n <div className=\"prose w-full \">\n <Content content={content} classNames={classNames} />\n <FAQS faqs={post.faqs} />\n </div>\n </article>\n <div className=\"flex md:w-1/4 md:sticky md:top-20\">\n <TableOfContents\n content={content}\n author={post.author}\n post={post}\n />\n </div>\n </div>\n </div>\n </div>\n </>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiCQ;AA/BR,kBAAiB;AACjB,mBAAmB;AACnB,wBAA6B;AAE7B,qBAIO;AAEP,iBAAqB;AACrB,0BAAqC;AACrC,qBAAwB;AACxB,+BAAgC;AAChC,0BAA4B;AAC5B,mBAA2B;AAC3B,oBAAmB;AAEZ,MAAM,WAAW,CAAC;AAAA,EACvB;AAAA,EACA,aAAa,CAA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gB,kBAAC;AAAA,aACnC;AAAA,UAEF,6CAAC,UACE;AAAA,0DAAqB,OAAO;AAAA,YAAE;AAAA,YAAU,4CAAC,UAAK,kBAAC;AAAA,aAClD;AAAA,UACA,4CAAC,UACE,uCAAW,KAAK,gBAA0B,KAAK,SAClD;AAAA,WACF;AAAA,SACF;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,eAAW;AAAA,YACT;AAAA,YACA;AAAA,YACA,WAAW;AAAA,UACb;AAAA,UAEA;AAAA,wDAAC,aAAQ,WAAU,uDACjB,uDAAC,SAAI,WAAU,iBACb;AAAA,0DAAC,0BAAQ,SAAkB,YAAwB;AAAA,cACnD,4CAAC,mBAAK,MAAM,KAAK,MAAM;AAAA,eACzB,GACF;AAAA,YACA,4CAAC,SAAI,WAAU,qCACb;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA,QAAQ,KAAK;AAAA,gBACb;AAAA;AAAA,YACF,GACF;AAAA;AAAA;AAAA,MACF;AAAA,OACF,GACF;AAAA,KACF;AAEJ;","names":["Script","Link"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/blog-post/index.tsx"],"sourcesContent":["import React from \"react\";\nimport { JSONContent } from \"@tiptap/core\";\nimport Link from \"next/link\";\nimport { cn } from \"../../utils/merge\";\nimport { opinlyConfig } from \"../../utils/sdk-config\";\nimport { BlogPostRes } from \"./_types/blog-post\";\nimport {\n genBlogPostingJSONLD,\n genBreadcrumbJSONLD,\n genFaqJSONLD,\n} from \"./_helpers/json-ld\";\nimport { BlogComponentClassNames } from \"./_types/class-names\";\nimport { FAQS } from \"./_components/faq\";\nimport { calculateReadingTime } from \"./_helpers/reading-time\";\nimport { Content } from \"./_components/content\";\nimport { TableOfContents } from \"./_components/table-of-contents\";\nimport { BreadCrumbs } from \"../bread-crumbs\";\nimport { formatDate } from \"../../utils/dates\";\nimport Script from \"next/script\";\n\nexport const BlogPost = ({\n post,\n classNames = {},\n}: {\n post: BlogPostRes;\n classNames?: BlogComponentClassNames;\n notFoundComponent?: React.ReactNode;\n}) => {\n const content = post.content as JSONContent;\n\n
|
|
1
|
+
{"version":3,"sources":["../../../src/components/blog-post/index.tsx"],"sourcesContent":["import React from \"react\";\nimport { JSONContent } from \"@tiptap/core\";\nimport Link from \"next/link\";\nimport { cn } from \"../../utils/merge\";\nimport { opinlyConfig } from \"../../utils/sdk-config\";\nimport { BlogPostRes } from \"./_types/blog-post\";\nimport {\n genBlogPostingJSONLD,\n genBreadcrumbJSONLD,\n genFaqJSONLD,\n} from \"./_helpers/json-ld\";\nimport { BlogComponentClassNames } from \"./_types/class-names\";\nimport { FAQS } from \"./_components/faq\";\nimport { calculateReadingTime } from \"./_helpers/reading-time\";\nimport { Content } from \"./_components/content\";\nimport { TableOfContents } from \"./_components/table-of-contents\";\nimport { BreadCrumbs } from \"../bread-crumbs\";\nimport { formatDate } from \"../../utils/dates\";\nimport Script from \"next/script\";\n\nexport const BlogPost = ({\n post,\n classNames = {},\n}: {\n post: BlogPostRes;\n classNames?: BlogComponentClassNames;\n notFoundComponent?: React.ReactNode;\n}) => {\n const content = post.content as JSONContent;\n\n return (\n <>\n {post.faqs && (\n <Script\n strategy=\"beforeInteractive\"\n type=\"application/ld+json\"\n dangerouslySetInnerHTML={{\n __html: JSON.stringify(genFaqJSONLD(post.faqs)).replace(\n /</g,\n \"\\\\u003c\"\n ),\n }}\n />\n )}\n <Script\n strategy=\"beforeInteractive\"\n type=\"application/ld+json\"\n dangerouslySetInnerHTML={{\n __html: JSON.stringify(genBlogPostingJSONLD(post)),\n }}\n />\n <Script\n strategy=\"beforeInteractive\"\n type=\"application/ld+json\"\n dangerouslySetInnerHTML={{\n __html: JSON.stringify(genBreadcrumbJSONLD(post)),\n }}\n />\n <div className=\"max-w-7xl mx-auto px-4 py-24 flex items-start space-x-8\">\n <div className=\"flex flex-col gap-12 w-full\">\n <div>\n <BreadCrumbs\n breadcrumbs={[\n post.folder && {\n url: `${opinlyConfig.blogPrefix}/${post.folder.slug}`,\n name: post.folder.name,\n },\n ]}\n />\n\n <h1 className=\"text-op-heading text-4xl font-bold mb-2 leading-tight\">\n {post.title}\n </h1>\n <div className=\"text-sm mb-4 text-op-muted space-x-1\">\n {post.author && (\n <>\n <Link\n href={`${opinlyConfig.blogPrefix}/authors/${post.author?.slug}`}\n className=\"font-medium\"\n >\n {post.author?.name}\n </Link>{\" \"}\n <span className=\"text-op-muted\">·</span>\n </>\n )}\n <span>\n {calculateReadingTime(content)} min read <span>·</span>\n </span>\n <span>\n {formatDate(post.firstPublishedAt as string) || \"Today\"}\n </span>\n </div>\n </div>\n\n <div\n className={cn(\n \"flex md:space-x-12 flex-col mx-auto w-full\",\n \"md:flex-row-reverse\",\n classNames.container\n )}\n >\n <article className=\"w-full md:w-3/4 order-2 md:order-1 flex items-start\">\n <div className=\"prose w-full \">\n <Content content={content} classNames={classNames} />\n <FAQS faqs={post.faqs} />\n </div>\n </article>\n <div className=\"flex md:w-1/4 md:sticky md:top-20\">\n <TableOfContents\n content={content}\n author={post.author}\n post={post}\n />\n </div>\n </div>\n </div>\n </div>\n </>\n );\n};\n"],"mappings":"AAiCQ,SA0CQ,UA1CR,KA0CQ,YA1CR;AA/BR,OAAO,UAAU;AACjB,SAAS,UAAU;AACnB,SAAS,oBAAoB;AAE7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,YAAY;AACrB,SAAS,4BAA4B;AACrC,SAAS,eAAe;AACxB,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,OAAO,YAAY;AAEZ,MAAM,WAAW,CAAC;AAAA,EACvB;AAAA,EACA,aAAa,CAAC;AAChB,MAIM;AACJ,QAAM,UAAU,KAAK;AAErB,SACE,iCACG;AAAA,SAAK,QACJ;AAAA,MAAC;AAAA;AAAA,QACC,UAAS;AAAA,QACT,MAAK;AAAA,QACL,yBAAyB;AAAA,UACvB,QAAQ,KAAK,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AAAA;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA;AAAA,YACA,WAAW;AAAA,UACb;AAAA,UAEA;AAAA,gCAAC,aAAQ,WAAU,uDACjB,+BAAC,SAAI,WAAU,iBACb;AAAA,kCAAC,WAAQ,SAAkB,YAAwB;AAAA,cACnD,oBAAC,QAAK,MAAM,KAAK,MAAM;AAAA,eACzB,GACF;AAAA,YACA,oBAAC,SAAI,WAAU,qCACb;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA,QAAQ,KAAK;AAAA,gBACb;AAAA;AAAA,YACF,GACF;AAAA;AAAA;AAAA,MACF;AAAA,OACF,GACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -28,7 +28,6 @@ var import_pagination = require("./pagination");
|
|
|
28
28
|
const HomePage = ({
|
|
29
29
|
data
|
|
30
30
|
}) => {
|
|
31
|
-
console.log("rendering home page inner", data);
|
|
32
31
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "max-w-7xl mx-auto px-4 py-10", children: [
|
|
33
32
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_top_posts.TopPosts, { posts: data.posts }),
|
|
34
33
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_pagination.HomePagePagination, { count: data.count, page: data.page }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/home-page/index.tsx"],"sourcesContent":["import { Opinly } from \"@opinly/backend\";\nimport { TopPosts } from \"./top-posts\";\nimport { HomePageFolders } from \"./folders\";\nimport { HomePagePagination } from \"./pagination\";\n\nexport const HomePage = ({\n data,\n}: {\n data: Extract<\n Awaited<ReturnType<Opinly[\"content\"][\"blog\"]>>,\n { type: \"home\" }\n >[\"data\"];\n}) => {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/components/home-page/index.tsx"],"sourcesContent":["import { Opinly } from \"@opinly/backend\";\nimport { TopPosts } from \"./top-posts\";\nimport { HomePageFolders } from \"./folders\";\nimport { HomePagePagination } from \"./pagination\";\n\nexport const HomePage = ({\n data,\n}: {\n data: Extract<\n Awaited<ReturnType<Opinly[\"content\"][\"blog\"]>>,\n { type: \"home\" }\n >[\"data\"];\n}) => {\n return (\n <div className=\"max-w-7xl mx-auto px-4 py-10\">\n <TopPosts posts={data.posts} />\n <HomePagePagination count={data.count} page={data.page} />\n <HomePageFolders folders={data.folders} />\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAcI;AAbJ,uBAAyB;AACzB,qBAAgC;AAChC,wBAAmC;AAE5B,MAAM,WAAW,CAAC;AAAA,EACvB;AACF,MAKM;AACJ,SACE,6CAAC,SAAI,WAAU,gCACb;AAAA,gDAAC,6BAAS,OAAO,KAAK,OAAO;AAAA,IAC7B,4CAAC,wCAAmB,OAAO,KAAK,OAAO,MAAM,KAAK,MAAM;AAAA,IACxD,4CAAC,kCAAgB,SAAS,KAAK,SAAS;AAAA,KAC1C;AAEJ;","names":[]}
|
|
@@ -5,7 +5,6 @@ import { HomePagePagination } from "./pagination";
|
|
|
5
5
|
const HomePage = ({
|
|
6
6
|
data
|
|
7
7
|
}) => {
|
|
8
|
-
console.log("rendering home page inner", data);
|
|
9
8
|
return /* @__PURE__ */ jsxs("div", { className: "max-w-7xl mx-auto px-4 py-10", children: [
|
|
10
9
|
/* @__PURE__ */ jsx(TopPosts, { posts: data.posts }),
|
|
11
10
|
/* @__PURE__ */ jsx(HomePagePagination, { count: data.count, page: data.page }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/home-page/index.tsx"],"sourcesContent":["import { Opinly } from \"@opinly/backend\";\nimport { TopPosts } from \"./top-posts\";\nimport { HomePageFolders } from \"./folders\";\nimport { HomePagePagination } from \"./pagination\";\n\nexport const HomePage = ({\n data,\n}: {\n data: Extract<\n Awaited<ReturnType<Opinly[\"content\"][\"blog\"]>>,\n { type: \"home\" }\n >[\"data\"];\n}) => {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/components/home-page/index.tsx"],"sourcesContent":["import { Opinly } from \"@opinly/backend\";\nimport { TopPosts } from \"./top-posts\";\nimport { HomePageFolders } from \"./folders\";\nimport { HomePagePagination } from \"./pagination\";\n\nexport const HomePage = ({\n data,\n}: {\n data: Extract<\n Awaited<ReturnType<Opinly[\"content\"][\"blog\"]>>,\n { type: \"home\" }\n >[\"data\"];\n}) => {\n return (\n <div className=\"max-w-7xl mx-auto px-4 py-10\">\n <TopPosts posts={data.posts} />\n <HomePagePagination count={data.count} page={data.page} />\n <HomePageFolders folders={data.folders} />\n </div>\n );\n};\n"],"mappings":"AAcI,SACE,KADF;AAbJ,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AAE5B,MAAM,WAAW,CAAC;AAAA,EACvB;AACF,MAKM;AACJ,SACE,qBAAC,SAAI,WAAU,gCACb;AAAA,wBAAC,YAAS,OAAO,KAAK,OAAO;AAAA,IAC7B,oBAAC,sBAAmB,OAAO,KAAK,OAAO,MAAM,KAAK,MAAM;AAAA,IACxD,oBAAC,mBAAgB,SAAS,KAAK,SAAS;AAAA,KAC1C;AAEJ;","names":[]}
|
|
@@ -59,7 +59,6 @@ const PostPreview = ({
|
|
|
59
59
|
priority
|
|
60
60
|
}) => {
|
|
61
61
|
const postSlug = `${import_sdk_config.opinlyConfig.blogPrefix}/${post.folder?.slug ? `${post.folder.slug}/` : ""}${post.slug}`;
|
|
62
|
-
console.log("Image is", import_image.default);
|
|
63
62
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "w-full h-full", children: [
|
|
64
63
|
post.image?.fileKey && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href: postSlug, className: "group", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative w-full h-48 mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
65
64
|
import_image.default,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/post-preview.tsx"],"sourcesContent":["import { Opinly } from \"@opinly/backend\";\nimport Link from \"next/link\";\nimport Image from \"next/image\";\nimport { opinlyConfig } from \"../utils/sdk-config\";\nimport { formatDate } from \"../utils/dates\";\n\nexport const PostPreviewSkeleton: React.FC = () => (\n <div className=\"w-full h-full \">\n <div className=\"animate-pulse mb-5\">\n <div className=\"w-full h-48 bg-gray-200 dark:bg-gray-700 rounded-lg\" />\n </div>\n <div className=\"flex items-center space-x-2 text-sm text-muted-foreground mb-3\">\n <div className=\"animate-pulse h-4 w-20 bg-gray-200 dark:bg-gray-700 rounded\" />\n <div className=\"animate-pulse h-4 w-1 bg-gray-200 dark:bg-gray-700 rounded-full\" />\n <div className=\"animate-pulse h-4 w-16 bg-gray-200 dark:bg-gray-700 rounded\" />\n </div>\n <div className=\"animate-pulse h-5 w-3/4 bg-gray-200 dark:bg-gray-700 rounded mb-2\" />\n <div className=\"space-y-1 mt-1 pr-4\">\n <div className=\"animate-pulse h-4 w-full bg-gray-200 dark:bg-gray-700 rounded\" />\n <div className=\"animate-pulse h-4 w-10/12 bg-gray-200 dark:bg-gray-700 rounded\" />\n </div>\n <div className=\"flex items-center space-x-2 text-xs mt-2\">\n <div className=\"animate-pulse h-3 w-24 bg-gray-200 dark:bg-gray-700 rounded\" />\n <div className=\"animate-pulse h-3 w-12 bg-gray-200 dark:bg-gray-700 rounded\" />\n </div>\n </div>\n);\n\nexport const PostPreview = ({\n post,\n priority,\n}: {\n post: NonNullable<\n NonNullable<\n Awaited<\n ReturnType<Opinly[\"client\"][\"content\"][\"authorPage\"][\"query\"]>\n >[\"data\"]\n >[\"posts\"][number]\n >;\n priority?: boolean;\n}) => {\n const postSlug = `${opinlyConfig.blogPrefix}/${\n post.folder?.slug ? `${post.folder.slug}/` : \"\"\n }${post.slug}`;\n\n
|
|
1
|
+
{"version":3,"sources":["../../src/components/post-preview.tsx"],"sourcesContent":["import { Opinly } from \"@opinly/backend\";\nimport Link from \"next/link\";\nimport Image from \"next/image\";\nimport { opinlyConfig } from \"../utils/sdk-config\";\nimport { formatDate } from \"../utils/dates\";\n\nexport const PostPreviewSkeleton: React.FC = () => (\n <div className=\"w-full h-full \">\n <div className=\"animate-pulse mb-5\">\n <div className=\"w-full h-48 bg-gray-200 dark:bg-gray-700 rounded-lg\" />\n </div>\n <div className=\"flex items-center space-x-2 text-sm text-muted-foreground mb-3\">\n <div className=\"animate-pulse h-4 w-20 bg-gray-200 dark:bg-gray-700 rounded\" />\n <div className=\"animate-pulse h-4 w-1 bg-gray-200 dark:bg-gray-700 rounded-full\" />\n <div className=\"animate-pulse h-4 w-16 bg-gray-200 dark:bg-gray-700 rounded\" />\n </div>\n <div className=\"animate-pulse h-5 w-3/4 bg-gray-200 dark:bg-gray-700 rounded mb-2\" />\n <div className=\"space-y-1 mt-1 pr-4\">\n <div className=\"animate-pulse h-4 w-full bg-gray-200 dark:bg-gray-700 rounded\" />\n <div className=\"animate-pulse h-4 w-10/12 bg-gray-200 dark:bg-gray-700 rounded\" />\n </div>\n <div className=\"flex items-center space-x-2 text-xs mt-2\">\n <div className=\"animate-pulse h-3 w-24 bg-gray-200 dark:bg-gray-700 rounded\" />\n <div className=\"animate-pulse h-3 w-12 bg-gray-200 dark:bg-gray-700 rounded\" />\n </div>\n </div>\n);\n\nexport const PostPreview = ({\n post,\n priority,\n}: {\n post: NonNullable<\n NonNullable<\n Awaited<\n ReturnType<Opinly[\"client\"][\"content\"][\"authorPage\"][\"query\"]>\n >[\"data\"]\n >[\"posts\"][number]\n >;\n priority?: boolean;\n}) => {\n const postSlug = `${opinlyConfig.blogPrefix}/${\n post.folder?.slug ? `${post.folder.slug}/` : \"\"\n }${post.slug}`;\n\n return (\n <div className=\"w-full h-full\">\n {post.image?.fileKey && (\n <Link href={postSlug} className=\"group\">\n <div className=\"relative w-full h-48 mb-4\">\n <Image\n unoptimized={opinlyConfig.unoptimizedImages}\n priority={priority}\n src={`${opinlyConfig.imagesPrefix}/${post.image.fileKey}`}\n alt={post.title}\n fill\n className=\"object-cover rounded-lg\"\n />\n </div>\n </Link>\n )}\n <div className=\"text-sm text-op-muted mb-1\">\n {post.folder?.name && (\n <>\n <Link\n href={`${opinlyConfig.blogPrefix}/${post.folder.slug}`}\n className=\"hover:underline\"\n >\n {post.folder.name}\n </Link>\n <span className=\"mx-1\">·</span>\n </>\n )}{\" \"}\n {formatDate(post.firstPublishedAt as string)}\n </div>\n <Link href={postSlug} className=\"group\">\n <h2 className=\"text-lg font-semibold leading-snug group-hover:underline text-op-heading\">\n {post.title}\n </h2>\n </Link>\n\n {post.description && (\n <p className=\"text-sm text-op-body mt-1 line-clamp-2\">\n {post.description}\n </p>\n )}\n <div className=\"text-xs text-op-muted mt-2\">\n {post.author && (\n <>\n <Link\n href={`${opinlyConfig.blogPrefix}/authors/${post.author.slug}`}\n className=\"font-medium hover:underline\"\n >\n {post.author?.name}\n </Link>{\" \"}\n <span className=\"mx-1\">·</span>\n </>\n )}{\" \"}\n {formatDate(post.firstPublishedAt as string)}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASM;AARN,kBAAiB;AACjB,mBAAkB;AAClB,wBAA6B;AAC7B,mBAA2B;AAEpB,MAAM,sBAAgC,MAC3C,6CAAC,SAAI,WAAU,kBACb;AAAA,8CAAC,SAAI,WAAU,sBACb,sDAAC,SAAI,WAAU,uDAAsD,GACvE;AAAA,EACA,6CAAC,SAAI,WAAU,kEACb;AAAA,gDAAC,SAAI,WAAU,+DAA8D;AAAA,IAC7E,4CAAC,SAAI,WAAU,mEAAkE;AAAA,IACjF,4CAAC,SAAI,WAAU,+DAA8D;AAAA,KAC/E;AAAA,EACA,4CAAC,SAAI,WAAU,qEAAoE;AAAA,EACnF,6CAAC,SAAI,WAAU,uBACb;AAAA,gDAAC,SAAI,WAAU,iEAAgE;AAAA,IAC/E,4CAAC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BACZ;AAAA,WAAK,UACJ,4EACE;AAAA;AAAA,UAAC,YAAAA;AAAA,UAAA;AAAA,YACC,MAAM,GAAG,+BAAa,UAAU,YAAY,KAAK,OAAO,IAAI;AAAA,YAC5D,WAAU;AAAA,YAET,eAAK,QAAQ;AAAA;AAAA,QAChB;AAAA,QAAQ;AAAA,QACR,4CAAC,UAAK,WAAU,QAAO,kBAAC;AAAA,SAC1B;AAAA,MACC;AAAA,UACF,yBAAW,KAAK,gBAA0B;AAAA,OAC7C;AAAA,KACF;AAEJ;","names":["Link","Image"]}
|
|
@@ -25,7 +25,6 @@ const PostPreview = ({
|
|
|
25
25
|
priority
|
|
26
26
|
}) => {
|
|
27
27
|
const postSlug = `${opinlyConfig.blogPrefix}/${post.folder?.slug ? `${post.folder.slug}/` : ""}${post.slug}`;
|
|
28
|
-
console.log("Image is", Image);
|
|
29
28
|
return /* @__PURE__ */ jsxs("div", { className: "w-full h-full", children: [
|
|
30
29
|
post.image?.fileKey && /* @__PURE__ */ jsx(Link, { href: postSlug, className: "group", children: /* @__PURE__ */ jsx("div", { className: "relative w-full h-48 mb-4", children: /* @__PURE__ */ jsx(
|
|
31
30
|
Image,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/post-preview.tsx"],"sourcesContent":["import { Opinly } from \"@opinly/backend\";\nimport Link from \"next/link\";\nimport Image from \"next/image\";\nimport { opinlyConfig } from \"../utils/sdk-config\";\nimport { formatDate } from \"../utils/dates\";\n\nexport const PostPreviewSkeleton: React.FC = () => (\n <div className=\"w-full h-full \">\n <div className=\"animate-pulse mb-5\">\n <div className=\"w-full h-48 bg-gray-200 dark:bg-gray-700 rounded-lg\" />\n </div>\n <div className=\"flex items-center space-x-2 text-sm text-muted-foreground mb-3\">\n <div className=\"animate-pulse h-4 w-20 bg-gray-200 dark:bg-gray-700 rounded\" />\n <div className=\"animate-pulse h-4 w-1 bg-gray-200 dark:bg-gray-700 rounded-full\" />\n <div className=\"animate-pulse h-4 w-16 bg-gray-200 dark:bg-gray-700 rounded\" />\n </div>\n <div className=\"animate-pulse h-5 w-3/4 bg-gray-200 dark:bg-gray-700 rounded mb-2\" />\n <div className=\"space-y-1 mt-1 pr-4\">\n <div className=\"animate-pulse h-4 w-full bg-gray-200 dark:bg-gray-700 rounded\" />\n <div className=\"animate-pulse h-4 w-10/12 bg-gray-200 dark:bg-gray-700 rounded\" />\n </div>\n <div className=\"flex items-center space-x-2 text-xs mt-2\">\n <div className=\"animate-pulse h-3 w-24 bg-gray-200 dark:bg-gray-700 rounded\" />\n <div className=\"animate-pulse h-3 w-12 bg-gray-200 dark:bg-gray-700 rounded\" />\n </div>\n </div>\n);\n\nexport const PostPreview = ({\n post,\n priority,\n}: {\n post: NonNullable<\n NonNullable<\n Awaited<\n ReturnType<Opinly[\"client\"][\"content\"][\"authorPage\"][\"query\"]>\n >[\"data\"]\n >[\"posts\"][number]\n >;\n priority?: boolean;\n}) => {\n const postSlug = `${opinlyConfig.blogPrefix}/${\n post.folder?.slug ? `${post.folder.slug}/` : \"\"\n }${post.slug}`;\n\n
|
|
1
|
+
{"version":3,"sources":["../../src/components/post-preview.tsx"],"sourcesContent":["import { Opinly } from \"@opinly/backend\";\nimport Link from \"next/link\";\nimport Image from \"next/image\";\nimport { opinlyConfig } from \"../utils/sdk-config\";\nimport { formatDate } from \"../utils/dates\";\n\nexport const PostPreviewSkeleton: React.FC = () => (\n <div className=\"w-full h-full \">\n <div className=\"animate-pulse mb-5\">\n <div className=\"w-full h-48 bg-gray-200 dark:bg-gray-700 rounded-lg\" />\n </div>\n <div className=\"flex items-center space-x-2 text-sm text-muted-foreground mb-3\">\n <div className=\"animate-pulse h-4 w-20 bg-gray-200 dark:bg-gray-700 rounded\" />\n <div className=\"animate-pulse h-4 w-1 bg-gray-200 dark:bg-gray-700 rounded-full\" />\n <div className=\"animate-pulse h-4 w-16 bg-gray-200 dark:bg-gray-700 rounded\" />\n </div>\n <div className=\"animate-pulse h-5 w-3/4 bg-gray-200 dark:bg-gray-700 rounded mb-2\" />\n <div className=\"space-y-1 mt-1 pr-4\">\n <div className=\"animate-pulse h-4 w-full bg-gray-200 dark:bg-gray-700 rounded\" />\n <div className=\"animate-pulse h-4 w-10/12 bg-gray-200 dark:bg-gray-700 rounded\" />\n </div>\n <div className=\"flex items-center space-x-2 text-xs mt-2\">\n <div className=\"animate-pulse h-3 w-24 bg-gray-200 dark:bg-gray-700 rounded\" />\n <div className=\"animate-pulse h-3 w-12 bg-gray-200 dark:bg-gray-700 rounded\" />\n </div>\n </div>\n);\n\nexport const PostPreview = ({\n post,\n priority,\n}: {\n post: NonNullable<\n NonNullable<\n Awaited<\n ReturnType<Opinly[\"client\"][\"content\"][\"authorPage\"][\"query\"]>\n >[\"data\"]\n >[\"posts\"][number]\n >;\n priority?: boolean;\n}) => {\n const postSlug = `${opinlyConfig.blogPrefix}/${\n post.folder?.slug ? `${post.folder.slug}/` : \"\"\n }${post.slug}`;\n\n return (\n <div className=\"w-full h-full\">\n {post.image?.fileKey && (\n <Link href={postSlug} className=\"group\">\n <div className=\"relative w-full h-48 mb-4\">\n <Image\n unoptimized={opinlyConfig.unoptimizedImages}\n priority={priority}\n src={`${opinlyConfig.imagesPrefix}/${post.image.fileKey}`}\n alt={post.title}\n fill\n className=\"object-cover rounded-lg\"\n />\n </div>\n </Link>\n )}\n <div className=\"text-sm text-op-muted mb-1\">\n {post.folder?.name && (\n <>\n <Link\n href={`${opinlyConfig.blogPrefix}/${post.folder.slug}`}\n className=\"hover:underline\"\n >\n {post.folder.name}\n </Link>\n <span className=\"mx-1\">·</span>\n </>\n )}{\" \"}\n {formatDate(post.firstPublishedAt as string)}\n </div>\n <Link href={postSlug} className=\"group\">\n <h2 className=\"text-lg font-semibold leading-snug group-hover:underline text-op-heading\">\n {post.title}\n </h2>\n </Link>\n\n {post.description && (\n <p className=\"text-sm text-op-body mt-1 line-clamp-2\">\n {post.description}\n </p>\n )}\n <div className=\"text-xs text-op-muted mt-2\">\n {post.author && (\n <>\n <Link\n href={`${opinlyConfig.blogPrefix}/authors/${post.author.slug}`}\n className=\"font-medium hover:underline\"\n >\n {post.author?.name}\n </Link>{\" \"}\n <span className=\"mx-1\">·</span>\n </>\n )}{\" \"}\n {formatDate(post.firstPublishedAt as string)}\n </div>\n </div>\n );\n};\n"],"mappings":"AASM,SAsDI,UAtDJ,KAEF,YAFE;AARN,OAAO,UAAU;AACjB,OAAO,WAAW;AAClB,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAEpB,MAAM,sBAAgC,MAC3C,qBAAC,SAAI,WAAU,kBACb;AAAA,sBAAC,SAAI,WAAU,sBACb,8BAAC,SAAI,WAAU,uDAAsD,GACvE;AAAA,EACA,qBAAC,SAAI,WAAU,kEACb;AAAA,wBAAC,SAAI,WAAU,+DAA8D;AAAA,IAC7E,oBAAC,SAAI,WAAU,mEAAkE;AAAA,IACjF,oBAAC,SAAI,WAAU,+DAA8D;AAAA,KAC/E;AAAA,EACA,oBAAC,SAAI,WAAU,qEAAoE;AAAA,EACnF,qBAAC,SAAI,WAAU,uBACb;AAAA,wBAAC,SAAI,WAAU,iEAAgE;AAAA,IAC/E,oBAAC,SAAI,WAAU,kEAAiE;AAAA,KAClF;AAAA,EACA,qBAAC,SAAI,WAAU,4CACb;AAAA,wBAAC,SAAI,WAAU,+DAA8D;AAAA,IAC7E,oBAAC,SAAI,WAAU,+DAA8D;AAAA,KAC/E;AAAA,GACF;AAGK,MAAM,cAAc,CAAC;AAAA,EAC1B;AAAA,EACA;AACF,MASM;AACJ,QAAM,WAAW,GAAG,aAAa,UAAU,IACzC,KAAK,QAAQ,OAAO,GAAG,KAAK,OAAO,IAAI,MAAM,EAC/C,GAAG,KAAK,IAAI;AAEZ,SACE,qBAAC,SAAI,WAAU,iBACZ;AAAA,SAAK,OAAO,WACX,oBAAC,QAAK,MAAM,UAAU,WAAU,SAC9B,8BAAC,SAAI,WAAU,6BACb;AAAA,MAAC;AAAA;AAAA,QACC,aAAa,aAAa;AAAA,QAC1B;AAAA,QACA,KAAK,GAAG,aAAa,YAAY,IAAI,KAAK,MAAM,OAAO;AAAA,QACvD,KAAK,KAAK;AAAA,QACV,MAAI;AAAA,QACJ,WAAU;AAAA;AAAA,IACZ,GACF,GACF;AAAA,IAEF,qBAAC,SAAI,WAAU,8BACZ;AAAA,WAAK,QAAQ,QACZ,iCACE;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,GAAG,aAAa,UAAU,IAAI,KAAK,OAAO,IAAI;AAAA,YACpD,WAAU;AAAA,YAET,eAAK,OAAO;AAAA;AAAA,QACf;AAAA,QACA,oBAAC,UAAK,WAAU,QAAO,kBAAC;AAAA,SAC1B;AAAA,MACC;AAAA,MACF,WAAW,KAAK,gBAA0B;AAAA,OAC7C;AAAA,IACA,oBAAC,QAAK,MAAM,UAAU,WAAU,SAC9B,8BAAC,QAAG,WAAU,4EACX,eAAK,OACR,GACF;AAAA,IAEC,KAAK,eACJ,oBAAC,OAAE,WAAU,0CACV,eAAK,aACR;AAAA,IAEF,qBAAC,SAAI,WAAU,8BACZ;AAAA,WAAK,UACJ,iCACE;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,GAAG,aAAa,UAAU,YAAY,KAAK,OAAO,IAAI;AAAA,YAC5D,WAAU;AAAA,YAET,eAAK,QAAQ;AAAA;AAAA,QAChB;AAAA,QAAQ;AAAA,QACR,oBAAC,UAAK,WAAU,QAAO,kBAAC;AAAA,SAC1B;AAAA,MACC;AAAA,MACF,WAAW,KAAK,gBAA0B;AAAA,OAC7C;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -37,7 +37,6 @@ const OpinlyBlogPages = ({ blog }) => {
|
|
|
37
37
|
return null;
|
|
38
38
|
}
|
|
39
39
|
if (blog.type === "home") {
|
|
40
|
-
console.log("returning home page");
|
|
41
40
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
42
41
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
43
42
|
import_next_seo.NextSeo,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/pages/opinly-blog-pages.tsx"],"sourcesContent":["import { BlogPost } from \"../components/blog-post\";\nimport { FolderPage } from \"../components/folder-page\";\nimport { Opinly } from \"@opinly/backend\";\nimport { HomePage } from \"../components/home-page\";\nimport { AuthorPage } from \"../components/author-page\";\nimport { AuthorsPage } from \"../components/authors-page\";\nimport { NextSeo } from \"next-seo\";\nimport { opinlyConfig } from \"../utils/sdk-config\";\n\ntype OpinlyBlogRes = Awaited<ReturnType<Opinly[\"content\"][\"blog\"]>>;\n\nexport const OpinlyBlogPages = ({ blog }: { blog: OpinlyBlogRes }) => {\n if (blog.type === \"not-found\") {\n // This should never happen as it will be handled by getServerSideProps\n console.error(\n \"[@opinly/next] Received not-found result in blog path, this means that get server side props is not returning 'not-found' properly. Nothing will be rendered.\"\n );\n return null;\n }\n\n if (blog.type === \"home\") {\n
|
|
1
|
+
{"version":3,"sources":["../../src/pages/opinly-blog-pages.tsx"],"sourcesContent":["import { BlogPost } from \"../components/blog-post\";\nimport { FolderPage } from \"../components/folder-page\";\nimport { Opinly } from \"@opinly/backend\";\nimport { HomePage } from \"../components/home-page\";\nimport { AuthorPage } from \"../components/author-page\";\nimport { AuthorsPage } from \"../components/authors-page\";\nimport { NextSeo } from \"next-seo\";\nimport { opinlyConfig } from \"../utils/sdk-config\";\n\ntype OpinlyBlogRes = Awaited<ReturnType<Opinly[\"content\"][\"blog\"]>>;\n\nexport const OpinlyBlogPages = ({ blog }: { blog: OpinlyBlogRes }) => {\n if (blog.type === \"not-found\") {\n // This should never happen as it will be handled by getServerSideProps\n console.error(\n \"[@opinly/next] Received not-found result in blog path, this means that get server side props is not returning 'not-found' properly. Nothing will be rendered.\"\n );\n return null;\n }\n\n if (blog.type === \"home\") {\n return (\n <>\n <NextSeo\n title={`${opinlyConfig.siteName} Blog`}\n description={`Explore the latest articles from the ${opinlyConfig.siteName} Blog`}\n openGraph={{\n title: `${opinlyConfig.siteName} Blog`,\n description: `Explore the latest articles from the ${opinlyConfig.siteName} Blog`,\n }}\n />\n <HomePage data={blog.data} />;\n </>\n );\n }\n\n if (blog.type === \"post\") {\n return (\n <>\n <NextSeo\n title={blog.data.title}\n openGraph={{\n title: blog.data.title,\n description: blog.data.description,\n }}\n description={blog.data.description}\n />\n <BlogPost post={blog.data} />;\n </>\n );\n }\n\n if (blog.type === \"author\") {\n return (\n <>\n <NextSeo\n title={`${opinlyConfig.siteName} Blog - ${blog.data.name}`}\n description={blog.data.bio || undefined}\n openGraph={{\n title: `${opinlyConfig.siteName} Blog - ${blog.data.name}`,\n description: blog.data.bio || undefined,\n }}\n />\n <AuthorPage author={blog.data} />;\n </>\n );\n }\n\n if (blog.type === \"authors\") {\n return (\n <>\n <NextSeo\n title={`${opinlyConfig.siteName} Blog - Authors`}\n description={`Explore the authors of the ${opinlyConfig.siteName} Blog`}\n openGraph={{\n title: `${opinlyConfig.siteName} Blog - Authors`,\n description: `Explore the authors of the ${opinlyConfig.siteName} Blog`,\n }}\n />\n <AuthorsPage authors={blog.data} />;\n </>\n );\n }\n\n return (\n <>\n <NextSeo\n title={`${opinlyConfig.siteName} Blog - Folder: ${blog.data.name}`}\n description={blog.data.description || undefined}\n openGraph={{\n title: `${opinlyConfig.siteName} Blog - Folder: ${blog.data.name}`,\n description: blog.data.description || undefined,\n }}\n />\n <FolderPage folder={blog.data} />;\n </>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBM;AAtBN,uBAAyB;AACzB,yBAA2B;AAE3B,uBAAyB;AACzB,yBAA2B;AAC3B,0BAA4B;AAC5B,sBAAwB;AACxB,wBAA6B;AAItB,MAAM,kBAAkB,CAAC,EAAE,KAAK,MAA+B;AACpE,MAAI,KAAK,SAAS,aAAa;AAE7B,YAAQ;AAAA,MACN;AAAA,IACF;AACA,WAAO;AAAA,EACT;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AA,UAChE,WAAW;AAAA,YACT,OAAO,GAAG,+BAAa,QAAQ;AAAA,YAC/B,aAAa,8BAA8B,+BAAa,QAAQ;AAAA,UAClE;AAAA;AAAA,MACF;AAAA,MACA,4CAAC,mCAAY,SAAS,KAAK,MAAM;AAAA,MAAE;AAAA,OACrC;AAAA,EAEJ;AAEA,SACE,4EACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,GAAG,+BAAa,QAAQ,mBAAmB,KAAK,KAAK,IAAI;AAAA,QAChE,aAAa,KAAK,KAAK,eAAe;AAAA,QACtC,WAAW;AAAA,UACT,OAAO,GAAG,+BAAa,QAAQ,mBAAmB,KAAK,KAAK,IAAI;AAAA,UAChE,aAAa,KAAK,KAAK,eAAe;AAAA,QACxC;AAAA;AAAA,IACF;AAAA,IACA,4CAAC,iCAAW,QAAQ,KAAK,MAAM;AAAA,IAAE;AAAA,KACnC;AAEJ;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/pages/opinly-blog-pages.tsx"],"sourcesContent":["import { BlogPost } from \"../components/blog-post\";\nimport { FolderPage } from \"../components/folder-page\";\nimport { Opinly } from \"@opinly/backend\";\nimport { HomePage } from \"../components/home-page\";\nimport { AuthorPage } from \"../components/author-page\";\nimport { AuthorsPage } from \"../components/authors-page\";\nimport { NextSeo } from \"next-seo\";\nimport { opinlyConfig } from \"../utils/sdk-config\";\n\ntype OpinlyBlogRes = Awaited<ReturnType<Opinly[\"content\"][\"blog\"]>>;\n\nexport const OpinlyBlogPages = ({ blog }: { blog: OpinlyBlogRes }) => {\n if (blog.type === \"not-found\") {\n // This should never happen as it will be handled by getServerSideProps\n console.error(\n \"[@opinly/next] Received not-found result in blog path, this means that get server side props is not returning 'not-found' properly. Nothing will be rendered.\"\n );\n return null;\n }\n\n if (blog.type === \"home\") {\n
|
|
1
|
+
{"version":3,"sources":["../../src/pages/opinly-blog-pages.tsx"],"sourcesContent":["import { BlogPost } from \"../components/blog-post\";\nimport { FolderPage } from \"../components/folder-page\";\nimport { Opinly } from \"@opinly/backend\";\nimport { HomePage } from \"../components/home-page\";\nimport { AuthorPage } from \"../components/author-page\";\nimport { AuthorsPage } from \"../components/authors-page\";\nimport { NextSeo } from \"next-seo\";\nimport { opinlyConfig } from \"../utils/sdk-config\";\n\ntype OpinlyBlogRes = Awaited<ReturnType<Opinly[\"content\"][\"blog\"]>>;\n\nexport const OpinlyBlogPages = ({ blog }: { blog: OpinlyBlogRes }) => {\n if (blog.type === \"not-found\") {\n // This should never happen as it will be handled by getServerSideProps\n console.error(\n \"[@opinly/next] Received not-found result in blog path, this means that get server side props is not returning 'not-found' properly. Nothing will be rendered.\"\n );\n return null;\n }\n\n if (blog.type === \"home\") {\n return (\n <>\n <NextSeo\n title={`${opinlyConfig.siteName} Blog`}\n description={`Explore the latest articles from the ${opinlyConfig.siteName} Blog`}\n openGraph={{\n title: `${opinlyConfig.siteName} Blog`,\n description: `Explore the latest articles from the ${opinlyConfig.siteName} Blog`,\n }}\n />\n <HomePage data={blog.data} />;\n </>\n );\n }\n\n if (blog.type === \"post\") {\n return (\n <>\n <NextSeo\n title={blog.data.title}\n openGraph={{\n title: blog.data.title,\n description: blog.data.description,\n }}\n description={blog.data.description}\n />\n <BlogPost post={blog.data} />;\n </>\n );\n }\n\n if (blog.type === \"author\") {\n return (\n <>\n <NextSeo\n title={`${opinlyConfig.siteName} Blog - ${blog.data.name}`}\n description={blog.data.bio || undefined}\n openGraph={{\n title: `${opinlyConfig.siteName} Blog - ${blog.data.name}`,\n description: blog.data.bio || undefined,\n }}\n />\n <AuthorPage author={blog.data} />;\n </>\n );\n }\n\n if (blog.type === \"authors\") {\n return (\n <>\n <NextSeo\n title={`${opinlyConfig.siteName} Blog - Authors`}\n description={`Explore the authors of the ${opinlyConfig.siteName} Blog`}\n openGraph={{\n title: `${opinlyConfig.siteName} Blog - Authors`,\n description: `Explore the authors of the ${opinlyConfig.siteName} Blog`,\n }}\n />\n <AuthorsPage authors={blog.data} />;\n </>\n );\n }\n\n return (\n <>\n <NextSeo\n title={`${opinlyConfig.siteName} Blog - Folder: ${blog.data.name}`}\n description={blog.data.description || undefined}\n openGraph={{\n title: `${opinlyConfig.siteName} Blog - Folder: ${blog.data.name}`,\n description: blog.data.description || undefined,\n }}\n />\n <FolderPage folder={blog.data} />;\n </>\n );\n};\n"],"mappings":"AAsBM,mBACE,KADF;AAtBN,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAE3B,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AAC5B,SAAS,eAAe;AACxB,SAAS,oBAAoB;AAItB,MAAM,kBAAkB,CAAC,EAAE,KAAK,MAA+B;AACpE,MAAI,KAAK,SAAS,aAAa;AAE7B,YAAQ;AAAA,MACN;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAEA,MAAI,KAAK,SAAS,QAAQ;AACxB,WACE,iCACE;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,GAAG,aAAa,QAAQ;AAAA,UAC/B,aAAa,wCAAwC,aAAa,QAAQ;AAAA,UAC1E,WAAW;AAAA,YACT,OAAO,GAAG,aAAa,QAAQ;AAAA,YAC/B,aAAa,wCAAwC,aAAa,QAAQ;AAAA,UAC5E;AAAA;AAAA,MACF;AAAA,MACA,oBAAC,YAAS,MAAM,KAAK,MAAM;AAAA,MAAE;AAAA,OAC/B;AAAA,EAEJ;AAEA,MAAI,KAAK,SAAS,QAAQ;AACxB,WACE,iCACE;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,KAAK,KAAK;AAAA,UACjB,WAAW;AAAA,YACT,OAAO,KAAK,KAAK;AAAA,YACjB,aAAa,KAAK,KAAK;AAAA,UACzB;AAAA,UACA,aAAa,KAAK,KAAK;AAAA;AAAA,MACzB;AAAA,MACA,oBAAC,YAAS,MAAM,KAAK,MAAM;AAAA,MAAE;AAAA,OAC/B;AAAA,EAEJ;AAEA,MAAI,KAAK,SAAS,UAA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"module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"schema-dts": "^1.1.5",
|
|
32
32
|
"tailwind-merge": "^1.14.0",
|
|
33
33
|
"zod": "^3.25.67",
|
|
34
|
-
"@opinly/backend": "0.1.
|
|
34
|
+
"@opinly/backend": "0.1.21"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
37
37
|
"node": ">=16"
|