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
12 changes: 12 additions & 0 deletions apps/strapi/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,15 @@ STRAPI_PREVIEW_SECRET=your-secret-key
# Shared secret with the Next.js app for triggering on-demand revalidation.
# Must match `STRAPI_REVALIDATE_SECRET` in apps/ui/.env.local.
STRAPI_REVALIDATE_SECRET=your-revalidate-secret

# ------- Meilisearch -------

# Meilisearch host URL
MEILISEARCH_HOST=

# Master/admin API key used by the Strapi plugin to write indexes.
MEILISEARCH_API_KEY=

# DANGER: Should be false while developing, to not populate production with test data.
# DANGER: If you are not sure always leave false
MEILISEARCH_PRODUCTION=false
48 changes: 48 additions & 0 deletions apps/strapi/config/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,54 @@ export default ({ env }) => {
},
},

meilisearch: {
config: {
host: env("MEILISEARCH_HOST", "http://localhost:7700"),
apiKey: env("MEILISEARCH_API_KEY"),
"case-study": {
indexName: env.bool("MEILISEARCH_PRODUCTION", false)
? "case-studies-production"
: "case-studies-testing",
entriesQuery: {
populate: {
coverImage: {
populate: { image: { populate: { media: true } } },
},
categories: { fields: ["name", "slug"] },
},
},
settings: {
filterableAttributes: ["categories.slug"],
searchableAttributes: ["title", "companyName", "description"],
sortableAttributes: ["originalPublishedAt"],
},
},
page: {
indexName: env.bool("MEILISEARCH_PRODUCTION", false)
? "pages-production"
: "pages-testing",
transformEntry({ entry }) {
return {
...entry,
pageType:
typeof entry.fullPath === "string" &&
entry.fullPath.startsWith("/features")
? "feature"
: "page",
}
},
settings: {
filterableAttributes: ["pageType", "locale"],
},
},
"blog-post": {
indexName: env.bool("MEILISEARCH_PRODUCTION", false)
? "blog-posts-production"
: "blog-posts-testing",
},
},
},

// Must be last — registers after custom field plugins (color-picker) to avoid #119
// https://github.com/strapi-community/plugin-rest-cache/issues/119
"rest-cache": {
Expand Down
1 change: 1 addition & 0 deletions apps/strapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"react-dom": "^18.0.0",
"react-router-dom": "^6.0.0",
"strapi-plugin-config-sync": "2.1.0",
"strapi-plugin-meilisearch": "^0.16.2",
"styled-components": "^6.0.0",
"vitest": "catalog:",
"zod": "^4.3.6"
Expand Down
8 changes: 5 additions & 3 deletions apps/strapi/src/api/page/content-types/page/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@
"sections.community-banner",
"sections.comparator-grid",
"sections.disclaimer",
"sections.richtext"
"sections.richtext",
"sections.dynamic-case-studies-grid",
"sections.dynamic-features-grid"
]
},
"children": {
Expand All @@ -109,12 +111,12 @@
},
"minimalLayout": {
"type": "boolean",
"default": false,
"pluginOptions": {
"i18n": {
"localized": false
}
}
},
"default": false
},
"seo": {
"type": "component",
Expand Down
14 changes: 14 additions & 0 deletions apps/strapi/src/components/sections/dynamic-case-studies-grid.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"collectionName": "components_sections_dynamic_case_studies_grids",
"info": {
"displayName": "DynamicCaseStudiesGrid"
},
"options": {},
"attributes": {
"isHidden": {
"type": "boolean",
"default": false
}
},
"config": {}
}
14 changes: 14 additions & 0 deletions apps/strapi/src/components/sections/dynamic-features-grid.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"collectionName": "components_sections_dynamic_features_grids",
"info": {
"displayName": "DynamicFeaturesGrid"
},
"options": {},
"attributes": {
"isHidden": {
"type": "boolean",
"default": false
}
},
"config": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default true
22 changes: 22 additions & 0 deletions apps/strapi/types/generated/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,26 @@ export interface SectionsDisclaimer extends Struct.ComponentSchema {
}
}

export interface SectionsDynamicCaseStudiesGrid extends Struct.ComponentSchema {
collectionName: "components_sections_dynamic_case_studies_grids"
info: {
displayName: "DynamicCaseStudiesGrid"
}
attributes: {
isHidden: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo<false>
}
}

export interface SectionsDynamicFeaturesGrid extends Struct.ComponentSchema {
collectionName: "components_sections_dynamic_features_grids"
info: {
displayName: "DynamicFeaturesGrid"
}
attributes: {
isHidden: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo<false>
}
}

export interface SectionsFaqSection extends Struct.ComponentSchema {
collectionName: "components_sections_faq_section"
info: {
Expand Down Expand Up @@ -1557,6 +1577,8 @@ declare module "@strapi/strapi" {
"sections.comparator-grid": SectionsComparatorGrid
"sections.cta-banner": SectionsCtaBanner
"sections.disclaimer": SectionsDisclaimer
"sections.dynamic-case-studies-grid": SectionsDynamicCaseStudiesGrid
"sections.dynamic-features-grid": SectionsDynamicFeaturesGrid
"sections.faq-section": SectionsFaqSection
"sections.feature-card-grid": SectionsFeatureCardGrid
"sections.hero": SectionsHero
Expand Down
2 changes: 2 additions & 0 deletions apps/strapi/types/generated/contentTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,8 @@ export interface ApiPagePage extends Struct.CollectionTypeSchema {
"sections.comparator-grid",
"sections.disclaimer",
"sections.richtext",
"sections.dynamic-case-studies-grid",
"sections.dynamic-features-grid",
]
> &
Schema.Attribute.SetPluginOptions<{
Expand Down
17 changes: 17 additions & 0 deletions apps/ui/.env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,23 @@ HUBSPOT_API_TOKEN=
# HUBSPOT_PORTAL_ID=6893032
# HOTJAR_ID=1095300

# -------------------------- Meilisearch ---------------------------------

# Meilisearch host URL (server-side only — never exposed to the browser).
MEILISEARCH_HOST=http://localhost:7700
# Host URL for docs
MEILISEARCH_DOCS_HOST=

# API key with read access on the indexes consumed by the UI.
MEILISEARCH_API_KEY=
# API key with read access to the Strapi documentation
MEILISEARCH_DOCS_API_KEY=

# Toggles which env's indexes the UI reads from.
# true -> *-production indexes
# false -> *-testing indexes
MEILISEARCH_PRODUCTION=false

# -------------------------- Demo provisioning ---------------------------------

# Demo operator service URL and auth token (for /demo page form provisioning)
Expand Down
5 changes: 5 additions & 0 deletions apps/ui/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@
"filterCategoriesLabel": "Categories",
"loadMore": "See more"
},
"features": {
"searchPlaceholder": "Search features...",
"loadMore": "See more",
"viewFeature": "Learn more"
},
"blog": {
"title": "Blog",
"description": "Tutorials, product updates, and engineering insights.",
Expand Down
1 change: 1 addition & 0 deletions apps/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"dayjs": "^1.11.19",
"embla-carousel-react": "^8.6.0",
"lodash": "catalog:",
"meilisearch": "^0.58.0",
"motion": "^12.35.2",
"next": "16.1.6",
"next-intl": "4.8.3",
Expand Down
82 changes: 0 additions & 82 deletions apps/ui/src/app/[locale]/user-stories/page.tsx

This file was deleted.

Loading
Loading