feat: 🎉 initialize Strapi app
Initialize Strapi app, with GraphQL, comments, SEO and other plugins, and configure blog content type.main
parent
f4babfcc71
commit
43f0d19636
@ -0,0 +1,16 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[{package.json,*.yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
@ -0,0 +1,6 @@
|
||||
HOST=0.0.0.0
|
||||
PORT=1337
|
||||
APP_KEYS="toBeModified1,toBeModified2"
|
||||
API_TOKEN_SALT=tobemodified
|
||||
ADMIN_JWT_SECRET=tobemodified
|
||||
JWT_SECRET=tobemodified
|
@ -0,0 +1,115 @@
|
||||
############################
|
||||
# OS X
|
||||
############################
|
||||
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
Icon
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
._*
|
||||
|
||||
|
||||
############################
|
||||
# Linux
|
||||
############################
|
||||
|
||||
*~
|
||||
|
||||
|
||||
############################
|
||||
# Windows
|
||||
############################
|
||||
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
Desktop.ini
|
||||
$RECYCLE.BIN/
|
||||
*.cab
|
||||
*.msi
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
|
||||
############################
|
||||
# Packages
|
||||
############################
|
||||
|
||||
*.7z
|
||||
*.csv
|
||||
*.dat
|
||||
*.dmg
|
||||
*.gz
|
||||
*.iso
|
||||
*.jar
|
||||
*.rar
|
||||
*.tar
|
||||
*.zip
|
||||
*.com
|
||||
*.class
|
||||
*.dll
|
||||
*.exe
|
||||
*.o
|
||||
*.seed
|
||||
*.so
|
||||
*.swo
|
||||
*.swp
|
||||
*.swn
|
||||
*.swm
|
||||
*.out
|
||||
*.pid
|
||||
|
||||
|
||||
############################
|
||||
# Logs and databases
|
||||
############################
|
||||
|
||||
.tmp
|
||||
*.log
|
||||
*.sql
|
||||
*.sqlite
|
||||
*.sqlite3
|
||||
|
||||
|
||||
############################
|
||||
# Misc.
|
||||
############################
|
||||
|
||||
*#
|
||||
ssl
|
||||
.idea
|
||||
nbproject
|
||||
public/uploads/*
|
||||
!public/uploads/.gitkeep
|
||||
|
||||
############################
|
||||
# Node.js
|
||||
############################
|
||||
|
||||
lib-cov
|
||||
lcov.info
|
||||
pids
|
||||
logs
|
||||
results
|
||||
node_modules
|
||||
.node_history
|
||||
|
||||
############################
|
||||
# Tests
|
||||
############################
|
||||
|
||||
testApp
|
||||
coverage
|
||||
|
||||
############################
|
||||
# Strapi
|
||||
############################
|
||||
|
||||
.env
|
||||
license.txt
|
||||
exports
|
||||
*.cache
|
||||
dist
|
||||
build
|
||||
.strapi-updater.json
|
@ -0,0 +1,57 @@
|
||||
# 🚀 Getting started with Strapi
|
||||
|
||||
Strapi comes with a full featured [Command Line Interface](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html) (CLI) which lets you scaffold and manage your project in seconds.
|
||||
|
||||
### `develop`
|
||||
|
||||
Start your Strapi application with autoReload enabled. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-develop)
|
||||
|
||||
```
|
||||
npm run develop
|
||||
# or
|
||||
yarn develop
|
||||
```
|
||||
|
||||
### `start`
|
||||
|
||||
Start your Strapi application with autoReload disabled. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-start)
|
||||
|
||||
```
|
||||
npm run start
|
||||
# or
|
||||
yarn start
|
||||
```
|
||||
|
||||
### `build`
|
||||
|
||||
Build your admin panel. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-build)
|
||||
|
||||
```
|
||||
npm run build
|
||||
# or
|
||||
yarn build
|
||||
```
|
||||
|
||||
## ⚙️ Deployment
|
||||
|
||||
Strapi gives you many possible deployment options for your project. Find the one that suits you on the [deployment section of the documentation](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/deployment.html).
|
||||
|
||||
## 📚 Learn more
|
||||
|
||||
- [Resource center](https://strapi.io/resource-center) - Strapi resource center.
|
||||
- [Strapi documentation](https://docs.strapi.io) - Official Strapi documentation.
|
||||
- [Strapi tutorials](https://strapi.io/tutorials) - List of tutorials made by the core team and the community.
|
||||
- [Strapi blog](https://docs.strapi.io) - Official Strapi blog containing articles made by the Strapi team and the community.
|
||||
- [Changelog](https://strapi.io/changelog) - Find out about the Strapi product updates, new features and general improvements.
|
||||
|
||||
Feel free to check out the [Strapi GitHub repository](https://github.com/strapi/strapi). Your feedback and contributions are welcome!
|
||||
|
||||
## ✨ Community
|
||||
|
||||
- [Discord](https://discord.strapi.io) - Come chat with the Strapi community including the core team.
|
||||
- [Forum](https://forum.strapi.io/) - Place to discuss, ask questions and find answers, show your Strapi project and get feedback or just talk with other Community members.
|
||||
- [Awesome Strapi](https://github.com/strapi/awesome-strapi) - A curated list of awesome things related to Strapi.
|
||||
|
||||
---
|
||||
|
||||
<sub>🤫 Psst! [Strapi is hiring](https://strapi.io/careers).</sub>
|
@ -0,0 +1,9 @@
|
||||
export default ({ env }) => ({
|
||||
auth: {
|
||||
secret: env("ADMIN_JWT_SECRET"),
|
||||
},
|
||||
apiToken: {
|
||||
salt: env("API_TOKEN_SALT"),
|
||||
},
|
||||
watchIgnoreFiles: ["**/config/sync/**"],
|
||||
});
|
@ -0,0 +1,7 @@
|
||||
export default {
|
||||
rest: {
|
||||
defaultLimit: 25,
|
||||
maxLimit: 100,
|
||||
withCount: true,
|
||||
},
|
||||
};
|
@ -0,0 +1,13 @@
|
||||
export default ({ env }) => ({
|
||||
connection: {
|
||||
client: 'postgres',
|
||||
connection: {
|
||||
host: env('DATABASE_HOST'),
|
||||
port: env.int('DATABASE_PORT', 5432),
|
||||
database: env('DATABASE_NAME', 'strapi'),
|
||||
user: env('DATABASE_USERNAME', 'strapi'),
|
||||
password: env('DATABASE_PASSWORD'),
|
||||
ssl: env.bool('DATABASE_SSL', false),
|
||||
},
|
||||
},
|
||||
});
|
@ -0,0 +1,12 @@
|
||||
export default [
|
||||
'strapi::errors',
|
||||
'strapi::security',
|
||||
'strapi::cors',
|
||||
'strapi::poweredBy',
|
||||
'strapi::logger',
|
||||
'strapi::query',
|
||||
'strapi::body',
|
||||
'strapi::session',
|
||||
'strapi::favicon',
|
||||
'strapi::public',
|
||||
];
|
@ -0,0 +1,45 @@
|
||||
export default {
|
||||
// https://market.strapi.io/plugins/strapi-blurhash
|
||||
// https://market.strapi.io/plugins/strapi-plugin-comments
|
||||
// https://market.strapi.io/plugins/@notum-cz-strapi-plugin-content-versioning
|
||||
// https://market.strapi.io/plugins/strapi-plugin-config-sync
|
||||
// https://market.strapi.io/plugins/strapi-plugin-ezforms
|
||||
ezforms: {
|
||||
config: {
|
||||
captchaProvider: {
|
||||
name: "none",
|
||||
},
|
||||
notificationProviders: [],
|
||||
},
|
||||
},
|
||||
// https://market.strapi.io/plugins/strapi-plugin-duplicate-button
|
||||
"duplicate-button": true,
|
||||
// https://market.strapi.io/plugins/@strapi-plugin-seo
|
||||
seo: {
|
||||
enabled: true,
|
||||
},
|
||||
// https://market.strapi.io/plugins/strapi-plugin-slugify
|
||||
slugify: {
|
||||
enabled: true,
|
||||
config: {
|
||||
contentTypes: {
|
||||
post: {
|
||||
field: "slug",
|
||||
references: "title",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
graphql: {
|
||||
config: {
|
||||
endpoint: "/graphql",
|
||||
shadowCRUD: true,
|
||||
playgroundAlways: false,
|
||||
depthLimit: 7,
|
||||
amountLimit: 100,
|
||||
apolloServer: {
|
||||
tracing: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
@ -0,0 +1,10 @@
|
||||
export default ({ env }) => ({
|
||||
host: env('HOST', '0.0.0.0'),
|
||||
port: env.int('PORT', 1337),
|
||||
app: {
|
||||
keys: env.array('APP_KEYS'),
|
||||
},
|
||||
webhooks: {
|
||||
populateRelations: env.bool('WEBHOOKS_POPULATE_RELATIONS', false),
|
||||
},
|
||||
});
|
Binary file not shown.
After Width: | Height: | Size: 497 B |
@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "strapi",
|
||||
"private": true,
|
||||
"version": "0.1.0",
|
||||
"description": "A Strapi application",
|
||||
"scripts": {
|
||||
"develop": "strapi develop",
|
||||
"start": "strapi start",
|
||||
"build": "strapi build",
|
||||
"strapi": "strapi"
|
||||
},
|
||||
"dependencies": {
|
||||
"@notum-cz/strapi-plugin-content-versioning": "^0.4.7",
|
||||
"@strapi/plugin-graphql": "^4.6.1",
|
||||
"@strapi/plugin-i18n": "4.6.1",
|
||||
"@strapi/plugin-seo": "^1.7.7",
|
||||
"@strapi/plugin-users-permissions": "4.6.1",
|
||||
"@strapi/strapi": "4.6.1",
|
||||
"pg": "8.8.0",
|
||||
"strapi-plugin-comments": "^2.2.6",
|
||||
"strapi-plugin-config-sync": "^1.1.1",
|
||||
"strapi-plugin-duplicate-button": "^1.1.7",
|
||||
"strapi-plugin-ezforms": "^0.1.5",
|
||||
"strapi-plugin-sitemap": "^2.0.9",
|
||||
"strapi-plugin-slugify": "^2.3.2"
|
||||
},
|
||||
"author": {
|
||||
"name": "A Strapi developer"
|
||||
},
|
||||
"strapi": {
|
||||
"uuid": "e2b99837-b66f-49db-8f93-5ed226e478af"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
# To prevent search engines from seeing the site altogether, uncomment the next two lines:
|
||||
# User-Agent: *
|
||||
# Disallow: /
|
@ -0,0 +1,3 @@
|
||||
/*
|
||||
/*/
|
||||
!.gitignore
|
@ -0,0 +1,35 @@
|
||||
export default {
|
||||
config: {
|
||||
locales: [
|
||||
// 'ar',
|
||||
// 'fr',
|
||||
// 'cs',
|
||||
// 'de',
|
||||
// 'dk',
|
||||
// 'es',
|
||||
// 'he',
|
||||
// 'id',
|
||||
// 'it',
|
||||
// 'ja',
|
||||
// 'ko',
|
||||
// 'ms',
|
||||
// 'nl',
|
||||
// 'no',
|
||||
// 'pl',
|
||||
// 'pt-BR',
|
||||
// 'pt',
|
||||
// 'ru',
|
||||
// 'sk',
|
||||
// 'sv',
|
||||
// 'th',
|
||||
// 'tr',
|
||||
// 'uk',
|
||||
// 'vi',
|
||||
// 'zh-Hans',
|
||||
// 'zh',
|
||||
],
|
||||
},
|
||||
bootstrap(app) {
|
||||
console.log(app);
|
||||
},
|
||||
};
|
@ -0,0 +1,13 @@
|
||||
{
|
||||
"extends": "@strapi/typescript-utils/tsconfigs/admin",
|
||||
"include": [
|
||||
"../plugins/**/admin/src/**/*",
|
||||
"./"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules/",
|
||||
"build/",
|
||||
"dist/",
|
||||
"**/*.test.ts"
|
||||
]
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
/* eslint-disable no-unused-vars */
|
||||
module.exports = (config, webpack) => {
|
||||
// Note: we provide webpack above so you should not `require` it
|
||||
// Perform customizations to webpack config
|
||||
// Important: return the modified config
|
||||
return config;
|
||||
};
|
@ -0,0 +1,47 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "posts",
|
||||
"info": {
|
||||
"singularName": "post",
|
||||
"pluralName": "posts",
|
||||
"displayName": "Blog",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"attributes": {
|
||||
"title": {
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"content": {
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"type": "richtext"
|
||||
},
|
||||
"seo": {
|
||||
"type": "component",
|
||||
"repeatable": false,
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"component": "shared.seo"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* post controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::post.post');
|
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* post router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::post.post');
|
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* post service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::post.post');
|
@ -0,0 +1,36 @@
|
||||
{
|
||||
"collectionName": "components_shared_meta_socials",
|
||||
"info": {
|
||||
"displayName": "metaSocial"
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"socialNetwork": {
|
||||
"type": "enumeration",
|
||||
"enum": [
|
||||
"Facebook",
|
||||
"Twitter"
|
||||
],
|
||||
"required": true
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"maxLength": 60
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"maxLength": 65,
|
||||
"required": true
|
||||
},
|
||||
"image": {
|
||||
"allowedTypes": [
|
||||
"images",
|
||||
"files",
|
||||
"videos"
|
||||
],
|
||||
"type": "media",
|
||||
"multiple": false
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
{
|
||||
"collectionName": "components_shared_seos",
|
||||
"info": {
|
||||
"displayName": "seo"
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"metaTitle": {
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"maxLength": 60
|
||||
},
|
||||
"metaDescription": {
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"maxLength": 160,
|
||||
"minLength": 50
|
||||
},
|
||||
"metaImage": {
|
||||
"type": "media",
|
||||
"multiple": false,
|
||||
"required": true,
|
||||
"allowedTypes": [
|
||||
"images",
|
||||
"files",
|
||||
"videos"
|
||||
]
|
||||
},
|
||||
"metaSocial": {
|
||||
"type": "component",
|
||||
"repeatable": true,
|
||||
"component": "shared.meta-social"
|
||||
},
|
||||
"keywords": {
|
||||
"type": "text",
|
||||
"regex": "[^,]+"
|
||||
},
|
||||
"metaRobots": {
|
||||
"type": "string",
|
||||
"regex": "[^,]+"
|
||||
},
|
||||
"structuredData": {
|
||||
"type": "json"
|
||||
},
|
||||
"metaViewport": {
|
||||
"type": "string"
|
||||
},
|
||||
"canonicalURL": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
export default {
|
||||
/**
|
||||
* An asynchronous register function that runs before
|
||||
* your application is initialized.
|
||||
*
|
||||
* This gives you an opportunity to extend code.
|
||||
*/
|
||||
register(/*{ strapi }*/) {},
|
||||
|
||||
/**
|
||||
* An asynchronous bootstrap function that runs before
|
||||
* your application gets started.
|
||||
*
|
||||
* This gives you an opportunity to set up your data model,
|
||||
* run jobs, or perform some special logic.
|
||||
*/
|
||||
bootstrap(/*{ strapi }*/) {},
|
||||
};
|
@ -0,0 +1,23 @@
|
||||
{
|
||||
"extends": "@strapi/typescript-utils/tsconfigs/server",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"rootDir": "."
|
||||
},
|
||||
"include": [
|
||||
"./",
|
||||
"./**/*.ts",
|
||||
"./**/*.js",
|
||||
"src/**/*.json"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules/",
|
||||
"build/",
|
||||
"dist/",
|
||||
".cache/",
|
||||
".tmp/",
|
||||
"src/admin/",
|
||||
"**/*.test.*",
|
||||
"src/plugins/**"
|
||||
]
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue