Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ function backfillOriginalPublishedAt(

const publishedAt = data["publishedAt"]

// Strapi v5 sometimes hands publishedAt to lifecycle hooks as a Date,
// sometimes as an ISO string — normalize both.
if (publishedAt instanceof Date) {
data["originalPublishedAt"] = publishedAt.toISOString()

return
}

if (typeof publishedAt === "string" && publishedAt.length > 0) {
data["originalPublishedAt"] = publishedAt
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
"component": "media.image",
"repeatable": false
},
"timelineImage": {
"coverImage": {
"type": "component",
"component": "media.image",
"component": "utilities.basic-image",
"repeatable": false
},
"author": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ function backfillOriginalPublishedAt(

const publishedAt = data["publishedAt"]

// Strapi v5 sometimes hands publishedAt to lifecycle hooks as a Date,
// sometimes as an ISO string — normalize both.
if (publishedAt instanceof Date) {
data["originalPublishedAt"] = publishedAt.toISOString()

return
}

if (typeof publishedAt === "string" && publishedAt.length > 0) {
data["originalPublishedAt"] = publishedAt
}
Expand Down
63 changes: 63 additions & 0 deletions apps/strapi/src/api/not-found/content-types/not-found/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"kind": "singleType",
"collectionName": "not_founds",
"info": {
"singularName": "not-found",
"pluralName": "not-founds",
"displayName": "404 / Not Found",
"description": "Customizable 404 page content"
},
"options": {
"draftAndPublish": false
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"attributes": {
"title": {
"type": "string",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"backButtonText": {
"type": "string",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"image": {
"type": "component",
"component": "utilities.basic-image",
"repeatable": false,
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"content": {
"type": "dynamiczone",
"pluginOptions": {
"i18n": {
"localized": true
}
},
"components": [
"blog.related-posts",
"blog.editors-picks",
"blog.resource-cta",
"sections.cta-banner",
"sections.community-banner",
"sections.section-header",
"sections.feature-card-grid"
]
}
}
}
3 changes: 3 additions & 0 deletions apps/strapi/src/api/not-found/controllers/not-found.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { factories } from "@strapi/strapi"

export default factories.createCoreController("api::not-found.not-found")
3 changes: 3 additions & 0 deletions apps/strapi/src/api/not-found/routes/not-found.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { factories } from "@strapi/strapi"

export default factories.createCoreRouter("api::not-found.not-found")
3 changes: 3 additions & 0 deletions apps/strapi/src/api/not-found/services/not-found.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { factories } from "@strapi/strapi"

export default factories.createCoreService("api::not-found.not-found")
3 changes: 3 additions & 0 deletions apps/strapi/src/components/blog/related-posts.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"blogPosts": {
"type": "relation",
"relation": "oneToMany",
Expand Down
2 changes: 1 addition & 1 deletion apps/strapi/src/components/cards/feature-card.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"required": true
},
"description": {
"type": "text"
"type": "richtext"
},
"icon": {
"type": "component",
Expand Down
2 changes: 1 addition & 1 deletion apps/strapi/src/components/elements/how-it-works-item.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
},
"description": {
"type": "text",
"type": "richtext",
"required": true,
"pluginOptions": {
"i18n": {
Expand Down
2 changes: 1 addition & 1 deletion apps/strapi/src/components/testimonials/quote.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"options": {},
"attributes": {
"quote": {
"type": "text",
"type": "richtext",
"required": true
},
"authorName": {
Expand Down
2 changes: 1 addition & 1 deletion apps/strapi/src/components/utilities/link-decorations.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"variant": {
"type": "enumeration",
"required": true,
"default": "link",
"default": "default",
"enum": [
"default",
"destructive",
Expand Down
9 changes: 5 additions & 4 deletions apps/strapi/types/generated/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export interface BlogRelatedPosts extends Struct.ComponentSchema {
"oneToOne",
"api::post-category.post-category"
>
title: Schema.Attribute.String
}
}

Expand Down Expand Up @@ -121,7 +122,7 @@ export interface CardsFeatureCard extends Struct.ComponentSchema {
}
attributes: {
ctaLinks: Schema.Attribute.Component<"utilities.link", true>
description: Schema.Attribute.Text
description: Schema.Attribute.RichText
icon: Schema.Attribute.Component<"utilities.basic-image", false>
image: Schema.Attribute.Component<"utilities.basic-image", false>
imagePosition: Schema.Attribute.Enumeration<["left", "right"]> &
Expand Down Expand Up @@ -271,7 +272,7 @@ export interface ElementsHowItWorksItem extends Struct.ComponentSchema {
icon: "lightbulb"
}
attributes: {
description: Schema.Attribute.Text &
description: Schema.Attribute.RichText &
Schema.Attribute.Required &
Schema.Attribute.SetPluginOptions<{
i18n: {
Expand Down Expand Up @@ -1310,7 +1311,7 @@ export interface TestimonialsQuote extends Struct.ComponentSchema {
authorRole: Schema.Attribute.String
companyLogo: Schema.Attribute.Component<"utilities.basic-image", false>
image: Schema.Attribute.Component<"utilities.basic-image", false>
quote: Schema.Attribute.Text & Schema.Attribute.Required
quote: Schema.Attribute.RichText & Schema.Attribute.Required
variant: Schema.Attribute.Enumeration<["boxed", "image"]> &
Schema.Attribute.DefaultTo<"boxed">
}
Expand Down Expand Up @@ -1384,7 +1385,7 @@ export interface UtilitiesLinkDecorations extends Struct.ComponentSchema {
["default", "destructive", "outline", "secondary", "ghost", "link"]
> &
Schema.Attribute.Required &
Schema.Attribute.DefaultTo<"link">
Schema.Attribute.DefaultTo<"default">
}
}

Expand Down
69 changes: 68 additions & 1 deletion apps/strapi/types/generated/contentTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ export interface ApiBlogPostBlogPost extends Struct.CollectionTypeSchema {
"plugin::users-permissions.user"
>
content: Schema.Attribute.RichText
coverImage: Schema.Attribute.Component<"utilities.basic-image", false>
createdAt: Schema.Attribute.DateTime
createdBy: Schema.Attribute.Relation<"oneToOne", "admin::user"> &
Schema.Attribute.Private
Expand Down Expand Up @@ -565,7 +566,6 @@ export interface ApiBlogPostBlogPost extends Struct.CollectionTypeSchema {
seo: Schema.Attribute.Component<"shared.seo", false>
slug: Schema.Attribute.UID<"title"> & Schema.Attribute.Required
tags: Schema.Attribute.Relation<"manyToMany", "api::post-tag.post-tag">
timelineImage: Schema.Attribute.Component<"media.image", false>
title: Schema.Attribute.String & Schema.Attribute.Required
updatedAt: Schema.Attribute.DateTime
updatedBy: Schema.Attribute.Relation<"oneToOne", "admin::user"> &
Expand Down Expand Up @@ -1147,6 +1147,72 @@ export interface ApiNewsItemNewsItem extends Struct.CollectionTypeSchema {
}
}

export interface ApiNotFoundNotFound extends Struct.SingleTypeSchema {
collectionName: "not_founds"
info: {
description: "Customizable 404 page content"
displayName: "404 / Not Found"
pluralName: "not-founds"
singularName: "not-found"
}
options: {
draftAndPublish: false
}
pluginOptions: {
i18n: {
localized: true
}
}
attributes: {
backButtonText: Schema.Attribute.String &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true
}
}>
content: Schema.Attribute.DynamicZone<
[
"blog.related-posts",
"blog.editors-picks",
"blog.resource-cta",
"sections.cta-banner",
"sections.community-banner",
"sections.section-header",
"sections.feature-card-grid",
]
> &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true
}
}>
createdAt: Schema.Attribute.DateTime
createdBy: Schema.Attribute.Relation<"oneToOne", "admin::user"> &
Schema.Attribute.Private
image: Schema.Attribute.Component<"utilities.basic-image", false> &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true
}
}>
locale: Schema.Attribute.String
localizations: Schema.Attribute.Relation<
"oneToMany",
"api::not-found.not-found"
>
publishedAt: Schema.Attribute.DateTime
title: Schema.Attribute.String &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true
}
}>
updatedAt: Schema.Attribute.DateTime
updatedBy: Schema.Attribute.Relation<"oneToOne", "admin::user"> &
Schema.Attribute.Private
}
}

export interface ApiPagePage extends Struct.CollectionTypeSchema {
collectionName: "pages"
info: {
Expand Down Expand Up @@ -2071,6 +2137,7 @@ declare module "@strapi/strapi" {
"api::hubspot-form.hubspot-form": ApiHubspotFormHubspotForm
"api::internal-job.internal-job": ApiInternalJobInternalJob
"api::news-item.news-item": ApiNewsItemNewsItem
"api::not-found.not-found": ApiNotFoundNotFound
"api::page.page": ApiPagePage
"api::plan-feature.plan-feature": ApiPlanFeaturePlanFeature
"api::plan.plan": ApiPlanPlan
Expand Down
11 changes: 2 additions & 9 deletions apps/ui/src/app/[locale]/blog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { use } from "react"
import { BlogNavbar } from "@/components/blog/BlogNavbar"
import { BlogPostsList } from "@/components/blog/BlogPostsList"
import { FeaturedBlogPost } from "@/components/blog/FeaturedBlogPost"
import { Container } from "@/components/elementary/Container"
import {
HeroContainer,
HeroContainerContent,
Expand Down Expand Up @@ -63,15 +62,9 @@ export default function BlogIndexPage(props: PageProps<"/[locale]/blog">) {
<BlogNavbar locale={locale} />

<HeroContainerContent className="animate-reveal-cascade border-strapi-gray-700/50 flex flex-col gap-10 border-b">
{featuredPost && (
<Container>
<FeaturedBlogPost post={featuredPost} />
</Container>
)}
{featuredPost && <FeaturedBlogPost post={featuredPost} />}

<Container>
<BlogPostsList posts={remainingPosts} loadMoreLabel={t("loadMore")} />
</Container>
<BlogPostsList posts={remainingPosts} loadMoreLabel={t("loadMore")} />
</HeroContainerContent>

<HeroContainerContent className="animate-reveal-cascade flex flex-col gap-10 [--reveal-delay:680ms]">
Expand Down
12 changes: 12 additions & 0 deletions apps/ui/src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ export const metadata: Metadata = {
template: "%s / Notum Technologies",
default: "",
},
// TODO: REMOVE BEFORE PRODUCTION DEPLOY — site-wide noindex/nofollow while
// hosted on a non-production URL. Drop this `robots` field entirely.
robots: {
index: false,
follow: false,
nocache: true,
googleBot: {
index: false,
follow: false,
noimageindex: true,
},
},
}

export default async function RootLayout({
Expand Down
Loading
Loading