content structure

This commit is contained in:
nicwands 2026-06-08 11:56:02 -04:00
parent 89e7148bd4
commit 49841e72c0
10 changed files with 117 additions and 5 deletions

View file

@ -6,6 +6,7 @@ services:
image: strapi-cms:latest image: strapi-cms:latest
restart: unless-stopped restart: unless-stopped
env_file: .env env_file: .env
user: "${DOCKER_USER:-1000}:${DOCKER_GROUP:-1000}"
environment: environment:
DATABASE_CLIENT: ${DATABASE_CLIENT} DATABASE_CLIENT: ${DATABASE_CLIENT}
DATABASE_HOST: strapiDB DATABASE_HOST: strapiDB

View file

@ -11,9 +11,12 @@
}, },
"pluginOptions": {}, "pluginOptions": {},
"attributes": { "attributes": {
"mosaic_items": { "header_copy": {
"type": "blocks"
},
"header_dl": {
"type": "component", "type": "component",
"component": "global.mosaic-item", "component": "global.descriptive-list",
"repeatable": true "repeatable": true
}, },
"seo": { "seo": {

View file

@ -0,0 +1,20 @@
{
"kind": "singleType",
"collectionName": "homes",
"info": {
"singularName": "home",
"pluralName": "homes",
"displayName": "Home"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"mosaic_items": {
"type": "component",
"component": "global.mosaic-item",
"repeatable": true
}
}
}

View file

@ -0,0 +1,7 @@
/**
* home controller
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreController('api::home.home');

View file

@ -0,0 +1,7 @@
/**
* home router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::home.home');

View file

@ -0,0 +1,7 @@
/**
* home service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::home.home');

View file

@ -0,0 +1,17 @@
{
"collectionName": "components_global_descriptive_lists",
"info": {
"displayName": "Descriptive List",
"icon": "bulletList"
},
"options": {},
"attributes": {
"label": {
"type": "string"
},
"content": {
"type": "blocks"
}
},
"config": {}
}

View file

@ -13,7 +13,15 @@
"images" "images"
] ]
}, },
"note": { "title": {
"type": "string"
},
"dl": {
"type": "component",
"component": "global.descriptive-list",
"repeatable": true
},
"content": {
"type": "blocks" "type": "blocks"
} }
}, },

View file

@ -1,5 +1,17 @@
import type { Schema, Struct } from '@strapi/strapi'; import type { Schema, Struct } from '@strapi/strapi';
export interface GlobalDescriptiveList extends Struct.ComponentSchema {
collectionName: 'components_global_descriptive_lists';
info: {
displayName: 'Descriptive List';
icon: 'bulletList';
};
attributes: {
content: Schema.Attribute.Blocks;
label: Schema.Attribute.String;
};
}
export interface GlobalMosaicItem extends Struct.ComponentSchema { export interface GlobalMosaicItem extends Struct.ComponentSchema {
collectionName: 'components_global_mosaic_items'; collectionName: 'components_global_mosaic_items';
info: { info: {
@ -7,8 +19,10 @@ export interface GlobalMosaicItem extends Struct.ComponentSchema {
icon: 'apps'; icon: 'apps';
}; };
attributes: { attributes: {
content: Schema.Attribute.Blocks;
dl: Schema.Attribute.Component<'global.descriptive-list', true>;
image: Schema.Attribute.Media<'images'>; image: Schema.Attribute.Media<'images'>;
note: Schema.Attribute.Blocks; title: Schema.Attribute.String;
}; };
} }
@ -28,6 +42,7 @@ export interface GlobalSeo extends Struct.ComponentSchema {
declare module '@strapi/strapi' { declare module '@strapi/strapi' {
export module Public { export module Public {
export interface ComponentSchemas { export interface ComponentSchemas {
'global.descriptive-list': GlobalDescriptiveList;
'global.mosaic-item': GlobalMosaicItem; 'global.mosaic-item': GlobalMosaicItem;
'global.seo': GlobalSeo; 'global.seo': GlobalSeo;
} }

View file

@ -454,13 +454,14 @@ export interface ApiGlobalGlobal extends Struct.SingleTypeSchema {
createdAt: Schema.Attribute.DateTime; createdAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private; Schema.Attribute.Private;
header_copy: Schema.Attribute.Blocks;
header_dl: Schema.Attribute.Component<'global.descriptive-list', true>;
locale: Schema.Attribute.String & Schema.Attribute.Private; locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation< localizations: Schema.Attribute.Relation<
'oneToMany', 'oneToMany',
'api::global.global' 'api::global.global'
> & > &
Schema.Attribute.Private; Schema.Attribute.Private;
mosaic_items: Schema.Attribute.Component<'global.mosaic-item', true>;
publishedAt: Schema.Attribute.DateTime; publishedAt: Schema.Attribute.DateTime;
seo: Schema.Attribute.Component<'global.seo', false>; seo: Schema.Attribute.Component<'global.seo', false>;
updatedAt: Schema.Attribute.DateTime; updatedAt: Schema.Attribute.DateTime;
@ -469,6 +470,31 @@ export interface ApiGlobalGlobal extends Struct.SingleTypeSchema {
}; };
} }
export interface ApiHomeHome extends Struct.SingleTypeSchema {
collectionName: 'homes';
info: {
displayName: 'Home';
pluralName: 'homes';
singularName: 'home';
};
options: {
draftAndPublish: true;
};
attributes: {
createdAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<'oneToMany', 'api::home.home'> &
Schema.Attribute.Private;
mosaic_items: Schema.Attribute.Component<'global.mosaic-item', true>;
publishedAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
};
}
export interface PluginContentReleasesRelease export interface PluginContentReleasesRelease
extends Struct.CollectionTypeSchema { extends Struct.CollectionTypeSchema {
collectionName: 'strapi_releases'; collectionName: 'strapi_releases';
@ -981,6 +1007,7 @@ declare module '@strapi/strapi' {
'admin::transfer-token-permission': AdminTransferTokenPermission; 'admin::transfer-token-permission': AdminTransferTokenPermission;
'admin::user': AdminUser; 'admin::user': AdminUser;
'api::global.global': ApiGlobalGlobal; 'api::global.global': ApiGlobalGlobal;
'api::home.home': ApiHomeHome;
'plugin::content-releases.release': PluginContentReleasesRelease; 'plugin::content-releases.release': PluginContentReleasesRelease;
'plugin::content-releases.release-action': PluginContentReleasesReleaseAction; 'plugin::content-releases.release-action': PluginContentReleasesReleaseAction;
'plugin::i18n.locale': PluginI18NLocale; 'plugin::i18n.locale': PluginI18NLocale;