rename blog entry to blog post

main
trivernis 3 months ago
parent 16727b4921
commit d4b7654be5
Signed by: Trivernis
GPG Key ID: 7E6D18B61C8D2F4B

@ -0,0 +1,9 @@
.tmp/
.cache/
.git/
.env
build/
node_modules/
# Ignoring folders that might be used in starter templates
data/
backup/

@ -1,19 +1,28 @@
FROM node:18-alpine3.18
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev nasm bash vips-dev git
ARG NODE_ENV=development
ENV NODE_ENV=${NODE_ENV}
# Creating multi-stage build for production
FROM node:18-alpine as build
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev git > /dev/null 2>&1
ENV NODE_ENV=production
WORKDIR /opt/
COPY package.json yarn.lock ./
RUN yarn global add node-gyp
RUN yarn config set network-timeout 600000 -g && yarn install
RUN yarn config set network-timeout 600000 -g && yarn install --production
ENV PATH /opt/node_modules/.bin:$PATH
WORKDIR /opt/app
COPY . .
RUN yarn build
# Creating final production image
FROM node:18-alpine
RUN apk add --no-cache vips-dev
ENV NODE_ENV=production
WORKDIR /opt/
COPY --from=build /opt/node_modules ./node_modules
WORKDIR /opt/app
COPY --from=build /opt/app ./
ENV PATH /opt/node_modules/.bin:$PATH
RUN chown -R node:node /opt/app
USER node
RUN ["yarn", "build"]
EXPOSE 1337
CMD ["yarn", "develop"]
CMD ["yarn", "start"]

@ -0,0 +1,31 @@
{
"kind": "collectionType",
"collectionName": "authors",
"info": {
"singularName": "author",
"pluralName": "authors",
"displayName": "Author"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"name": {
"type": "string"
},
"profilePicture": {
"allowedTypes": [
"images",
"files",
"videos",
"audios"
],
"type": "media",
"multiple": true
},
"slug": {
"type": "uid"
}
}
}

@ -1,9 +1,9 @@
'use strict';
/**
* blog-entry controller
* author controller
*/
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::blog-entry.blog-entry');
module.exports = createCoreController('api::author.author');

@ -1,9 +1,9 @@
'use strict';
/**
* blog-entry router
* author router
*/
const { createCoreRouter } = require('@strapi/strapi').factories;
module.exports = createCoreRouter('api::blog-entry.blog-entry');
module.exports = createCoreRouter('api::author.author');

@ -1,9 +1,9 @@
'use strict';
/**
* blog-entry service
* author service
*/
const { createCoreService } = require('@strapi/strapi').factories;
module.exports = createCoreService('api::blog-entry.blog-entry');
module.exports = createCoreService('api::author.author');

@ -1,21 +0,0 @@
{
"kind": "collectionType",
"collectionName": "blog_entries",
"info": {
"singularName": "blog-entry",
"pluralName": "blog-entries",
"displayName": "Blog Entry"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"content": {
"type": "blocks"
},
"Title": {
"type": "string"
}
}
}

@ -0,0 +1,29 @@
{
"kind": "collectionType",
"collectionName": "blog_posts",
"info": {
"singularName": "blog-post",
"pluralName": "blog-posts",
"displayName": "Blog Post"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"slug": {
"type": "uid"
},
"title": {
"type": "string"
},
"author": {
"type": "relation",
"relation": "oneToOne",
"target": "api::author.author"
},
"content": {
"type": "richtext"
}
}
}

@ -0,0 +1,9 @@
'use strict';
/**
* blog-post controller
*/
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::blog-post.blog-post');

@ -0,0 +1,9 @@
'use strict';
/**
* blog-post router
*/
const { createCoreRouter } = require('@strapi/strapi').factories;
module.exports = createCoreRouter('api::blog-post.blog-post');

@ -0,0 +1,9 @@
'use strict';
/**
* blog-post service
*/
const { createCoreService } = require('@strapi/strapi').factories;
module.exports = createCoreService('api::blog-post.blog-post');

@ -362,37 +362,6 @@ export interface AdminTransferTokenPermission extends Schema.CollectionType {
};
}
export interface ApiBlogEntryBlogEntry extends Schema.CollectionType {
collectionName: 'blog_entries';
info: {
singularName: 'blog-entry';
pluralName: 'blog-entries';
displayName: 'Blog Entry';
};
options: {
draftAndPublish: true;
};
attributes: {
content: Attribute.Blocks;
Title: Attribute.String;
createdAt: Attribute.DateTime;
updatedAt: Attribute.DateTime;
publishedAt: Attribute.DateTime;
createdBy: Attribute.Relation<
'api::blog-entry.blog-entry',
'oneToOne',
'admin::user'
> &
Attribute.Private;
updatedBy: Attribute.Relation<
'api::blog-entry.blog-entry',
'oneToOne',
'admin::user'
> &
Attribute.Private;
};
}
export interface PluginUploadFile extends Schema.CollectionType {
collectionName: 'files';
info: {
@ -819,6 +788,78 @@ export interface PluginI18NLocale extends Schema.CollectionType {
};
}
export interface ApiAuthorAuthor extends Schema.CollectionType {
collectionName: 'authors';
info: {
singularName: 'author';
pluralName: 'authors';
displayName: 'Author';
};
options: {
draftAndPublish: true;
};
attributes: {
name: Attribute.String;
profilePicture: Attribute.Media<
'images' | 'files' | 'videos' | 'audios',
true
>;
slug: Attribute.UID;
createdAt: Attribute.DateTime;
updatedAt: Attribute.DateTime;
publishedAt: Attribute.DateTime;
createdBy: Attribute.Relation<
'api::author.author',
'oneToOne',
'admin::user'
> &
Attribute.Private;
updatedBy: Attribute.Relation<
'api::author.author',
'oneToOne',
'admin::user'
> &
Attribute.Private;
};
}
export interface ApiBlogPostBlogPost extends Schema.CollectionType {
collectionName: 'blog_posts';
info: {
singularName: 'blog-post';
pluralName: 'blog-posts';
displayName: 'Blog Post';
};
options: {
draftAndPublish: true;
};
attributes: {
slug: Attribute.UID;
title: Attribute.String;
author: Attribute.Relation<
'api::blog-post.blog-post',
'oneToOne',
'api::author.author'
>;
content: Attribute.RichText;
createdAt: Attribute.DateTime;
updatedAt: Attribute.DateTime;
publishedAt: Attribute.DateTime;
createdBy: Attribute.Relation<
'api::blog-post.blog-post',
'oneToOne',
'admin::user'
> &
Attribute.Private;
updatedBy: Attribute.Relation<
'api::blog-post.blog-post',
'oneToOne',
'admin::user'
> &
Attribute.Private;
};
}
declare module '@strapi/types' {
export module Shared {
export interface ContentTypes {
@ -829,7 +870,6 @@ declare module '@strapi/types' {
'admin::api-token-permission': AdminApiTokenPermission;
'admin::transfer-token': AdminTransferToken;
'admin::transfer-token-permission': AdminTransferTokenPermission;
'api::blog-entry.blog-entry': ApiBlogEntryBlogEntry;
'plugin::upload.file': PluginUploadFile;
'plugin::upload.folder': PluginUploadFolder;
'plugin::content-releases.release': PluginContentReleasesRelease;
@ -838,6 +878,8 @@ declare module '@strapi/types' {
'plugin::users-permissions.role': PluginUsersPermissionsRole;
'plugin::users-permissions.user': PluginUsersPermissionsUser;
'plugin::i18n.locale': PluginI18NLocale;
'api::author.author': ApiAuthorAuthor;
'api::blog-post.blog-post': ApiBlogPostBlogPost;
}
}
}

Loading…
Cancel
Save