-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from zapal-tech/feature/update-collections
Update collections
- Loading branch information
Showing
19 changed files
with
550 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { CollectionConfig } from 'payload/types'; | ||
|
||
import { publicUploadCollectionWithoutApiAccess } from 'utils/access'; | ||
import { blogGroup } from 'utils/groups'; | ||
|
||
const BlogAssets: CollectionConfig = { | ||
slug: 'blog-assets', | ||
labels: { | ||
singular: { en: 'Blog asset', ua: 'Файл блогу' }, | ||
plural: { en: 'Blog assets', ua: 'Файли блогу' }, | ||
}, | ||
upload: true, | ||
access: { | ||
read: publicUploadCollectionWithoutApiAccess, | ||
}, | ||
admin: { | ||
group: blogGroup, | ||
}, | ||
fields: [], | ||
}; | ||
|
||
export default BlogAssets; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { CollectionConfig } from 'payload/types'; | ||
|
||
import { altField } from 'fields/alt'; | ||
|
||
import { publicUploadCollectionWithoutApiAccess } from 'utils/access'; | ||
import { blogGroup } from 'utils/groups'; | ||
import { defaultPhotoMimeTypes } from 'utils/mimeTypes'; | ||
|
||
const BlogCoverImages: CollectionConfig = { | ||
slug: 'blog-cover-images', | ||
labels: { | ||
singular: { en: 'Blog cover image', ua: 'Мета фото (блог)' }, | ||
plural: { en: 'Blog cover images', ua: 'Мета фото (блог)' }, | ||
}, | ||
upload: { | ||
formatOptions: { format: 'webp', options: { lossless: true } }, | ||
mimeTypes: defaultPhotoMimeTypes, | ||
imageSizes: [ | ||
{ | ||
name: '700', | ||
width: 700, | ||
formatOptions: { format: 'webp', options: { quality: 85 } }, | ||
}, | ||
{ | ||
name: '800', | ||
width: 800, | ||
formatOptions: { format: 'webp', options: { quality: 85 } }, | ||
}, | ||
{ | ||
name: '1200', | ||
width: 1200, | ||
formatOptions: { format: 'webp', options: { quality: 85 } }, | ||
}, | ||
{ | ||
name: '1600', | ||
width: 1600, | ||
formatOptions: { format: 'webp', options: { quality: 85 } }, | ||
}, | ||
], | ||
}, | ||
access: { | ||
read: publicUploadCollectionWithoutApiAccess, | ||
}, | ||
admin: { | ||
group: blogGroup, | ||
}, | ||
fields: [altField()], | ||
}; | ||
|
||
export default BlogCoverImages; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { CollectionConfig } from 'payload/types'; | ||
|
||
import { publicUploadCollectionWithoutApiAccess } from 'utils/access'; | ||
import { mediaGroup } from 'utils/groups'; | ||
|
||
const OpenGraphImages: CollectionConfig = { | ||
slug: 'open-graph-images', | ||
labels: { | ||
singular: { en: 'Open Graph image', ua: 'Open Graph зображення' }, | ||
plural: { en: 'Open Graph images', ua: 'Open Graph зображення' }, | ||
}, | ||
upload: { | ||
resizeOptions: { | ||
width: 1200, | ||
}, | ||
formatOptions: { format: 'webp', options: { quality: 80 } }, | ||
mimeTypes: ['image/webp', 'image/jpeg', 'image/png', 'image/svg+xml'], | ||
}, | ||
access: { | ||
read: publicUploadCollectionWithoutApiAccess, | ||
}, | ||
admin: { | ||
description: { | ||
en: '1200x630 preview image for the link', | ||
ua: '1200x630 зображення попереднього перегляду посилання', | ||
}, | ||
group: mediaGroup, | ||
}, | ||
fields: [], | ||
}; | ||
|
||
export default OpenGraphImages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.