diff --git a/keystatic.config.ts b/keystatic.config.ts index 6da70243..baee56c8 100644 --- a/keystatic.config.ts +++ b/keystatic.config.ts @@ -1,13 +1,14 @@ import type { Config } from '@keystatic/core'; -import { config, fields, collection } from '@keystatic/core'; +import { fields, collection } from '@keystatic/core'; const keystaticConfig: Config = { storage: { kind: 'github', repo: { owner: 'spryker-community', - name: 'commercequest-website' - } + name: 'commercequest-website', + }, + branchPrefix: 'keystatic/' }, ui: { brand: { @@ -15,7 +16,7 @@ const keystaticConfig: Config = { }, }, collections: { - freelancers: collection({ + 'freelancers': collection({ label: 'Freelancers', path: 'src/content/freelancers/*', slugField: 'slug', @@ -131,7 +132,120 @@ const keystaticConfig: Config = { }), }, }), + 'community-tools': collection({ + label: 'Community Tools', + path: 'src/content/community-tools/*', + slugField: 'title', + schema: { + title: fields.slug({ + name: { + label: 'Title', + validation: { + isRequired: true, + length: { min: 6 } + } + }, + slug: { + label: 'SEO-friendly title', + description: 'This will define the file name for this entry' + } + }), + subtitle: fields.text({ + label: "Subtitle", + description: 'Optional subtitle to support the title', + }), + description: fields.text({ + label: "Description", + multiline: true, + }), + tags: fields.array( + fields.text({ + label: 'Tag', + validation: { + isRequired: true, + length: { min: 3 } + } + }), + { + label: 'Tags', + itemLabel: props => props.value + } + ), + license: fields.text({ + label: "License", + validation: { + isRequired: true, + } + }), + creators: fields.array( + fields.object({ + name: fields.text({ + label: 'Name', + validation: { + isRequired: true, + } + }), + url: fields.url({ label: 'URL' }), + }), + { + label: 'Creators', + itemLabel: (props) => `${props.fields.name.value} -> ${props.fields.url.value}`, + validation: { length: { min: 1 } } + } + ), + contributors: fields.array( + fields.object({ + name: fields.text({ + label: 'Name', + validation: { + isRequired: true, + } + }), + url: fields.url({ label: 'URL' }), + }), + { + label: 'Contributors', + itemLabel: (props) => `${props.fields.name.value} -> ${props.fields.url.value}`, + } + ), + links: fields.array( + fields.object({ + label: fields.text({ + label: 'Label', + validation: { + isRequired: true, + } + }), + url: fields.url({ + label: 'URL', + validation: { + isRequired: true, + } + }), + }), + { + label: 'Links', + itemLabel: (props) => `${props.fields.label.value} -> ${props.fields.url.value}`, + validation: { length: { min: 1 } } + } + ), + }, + }), }, }; +/* + "creators": [{"name": "Valantic", "url": "https://github.com/valantic-CEC-Deutschland-GmbH"}], + "contributors": [], + "links": [ + { + "label": "JetBrains marketplace", + "url": "https://plugins.jetbrains.com/plugin/18766-sprykerkit" + }, + { + "label": "Github", + "url": "https://github.com/valantic-CEC-Deutschland-GmbH/spryker-kit-intellij-plugin" + } + ] +*/ export default keystaticConfig; diff --git a/src/components/ui/tables/CommunityToolsTable.astro b/src/components/ui/tables/CommunityToolsTable.astro index 48fd903e..2ca4a10b 100644 --- a/src/components/ui/tables/CommunityToolsTable.astro +++ b/src/components/ui/tables/CommunityToolsTable.astro @@ -12,6 +12,9 @@ function getUniqueAttributes(tools: CommunityToolCollection) { const licenses = new Set(); for (const tool of tools) { + if (!tool.creators) { + continue; + } tool.creators.forEach(creator => creatorNames.add(creator.name)); (tool.tags || []).forEach(tag => tags.add(tag)); licenses.add(tool.license); @@ -218,7 +221,7 @@ const { creatorNames, tags, licenses } = getUniqueAttributes(tools); return `

${title}

-

${subtitle}

+ ${subtitle ? `

${subtitle}

` : ''}
`; }, @@ -229,11 +232,19 @@ const { creatorNames, tags, licenses } = getUniqueAttributes(tools); thClassList: ['min-w-96'], }, enableSorting: false, - cell: (props) => ( - `
- ${props.getValue()} -
` - ), + cell: (props) => { + const { description } = props.row.original; + + if (!description) { + return ''; + } + + return ` +
+ ${description} +
+ `; + } }), columnHelper.accessor('license', { header: () => 'License', diff --git a/src/content.config.ts b/src/content.config.ts index 940f356b..ea443a3c 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -83,8 +83,13 @@ const blogCollection = defineCollection({ }), }); +const communityToolCollection = defineCollection({ + loader: glob({ pattern: '*.yaml', base: "./src/content/community-tools" }), +}); + export const collections = { 'docs': docs, 'products': productsCollection, 'blog': blogCollection, + 'community-tools': communityToolCollection, }; diff --git a/src/content/community-tools/cli-toolkit.yaml b/src/content/community-tools/cli-toolkit.yaml new file mode 100644 index 00000000..7ea75e16 --- /dev/null +++ b/src/content/community-tools/cli-toolkit.yaml @@ -0,0 +1,12 @@ +title: "CLI Toolkit" +subtitle: "Spryker Community CLI Toolkit" +description: "A suite of utilities designed to enhance performance in your day-to-day operations with Spryker Commerce OS." +tags: [] +license: "MIT" +creators: + - name: "Community" + url: "https://forum.commercequest.space/categories/spryker-community-projects" +contributors: [] +links: + - label: "Github" + url: "https://github.com/spryker-community/cli-toolkit" diff --git a/src/content/community-tools/codeception-module.yaml b/src/content/community-tools/codeception-module.yaml new file mode 100644 index 00000000..ff499f8b --- /dev/null +++ b/src/content/community-tools/codeception-module.yaml @@ -0,0 +1,12 @@ +title: "Codeception Module" +subtitle: "" +description: "This module allows developers to test Spryker modules isolated." +tags: [] +license: "MIT" +creators: + - name: "Fond Of" + url: "https://github.com/fond-of/" +contributors: [] +links: + - label: "Github" + url: "https://github.com/fond-of/codeception-spryker" \ No newline at end of file diff --git a/src/content/community-tools/contentful-connector.yaml b/src/content/community-tools/contentful-connector.yaml new file mode 100644 index 00000000..0fdf46eb --- /dev/null +++ b/src/content/community-tools/contentful-connector.yaml @@ -0,0 +1,12 @@ +title: "Contentful connector" +subtitle: "" +description: "A Spryker-Contentful connector. Import content from Contentful to storage and updates it via cronjob." +tags: [] +license: "MIT" +creators: + - name: "Fond Of" + url: "https://github.com/fond-of/" +contributors: [] +links: + - label: "Github" + url: "https://github.com/fond-of/spryker-contentful" \ No newline at end of file diff --git a/src/content/community-tools/google-tag-manager-integration.yaml b/src/content/community-tools/google-tag-manager-integration.yaml new file mode 100644 index 00000000..d8870e06 --- /dev/null +++ b/src/content/community-tools/google-tag-manager-integration.yaml @@ -0,0 +1,12 @@ +title: "Google Tag Manager integration" +subtitle: "" +description: "The title speaks for itself 🙂" +tags: [] +license: "MIT" +creators: + - name: "Fond Of" + url: "https://github.com/fond-of/" +contributors: [] +links: + - label: "Github" + url: "https://github.com/fond-of/spryker-google-tagmanager" diff --git a/src/content/community-tools/i18n-translations.yaml b/src/content/community-tools/i18n-translations.yaml new file mode 100644 index 00000000..b066e28b --- /dev/null +++ b/src/content/community-tools/i18n-translations.yaml @@ -0,0 +1,12 @@ +title: "i18n Translations" +subtitle: "" +description: "Adds support for multiple languages to Spryker OS" +tags: [] +license: "MIT" +creators: + - name: "Community" + url: "https://forum.commercequest.space/categories/spryker-community-projects" +contributors: [] +links: + - label: "Github" + url: "https://github.com/spryker-community/spryker-translations" diff --git a/src/content/community-tools/jellyfish-b2b-module.yaml b/src/content/community-tools/jellyfish-b2b-module.yaml new file mode 100644 index 00000000..4cd33101 --- /dev/null +++ b/src/content/community-tools/jellyfish-b2b-module.yaml @@ -0,0 +1,8 @@ +title: "Jellyfish B2B Module" +license: "MIT" +creators: + - name: "Fond Of" + url: "https://github.com/fond-of/" +links: + - label: "Github" + url: "https://github.com/fond-of/spryker-jellyfish-b2b" diff --git a/src/content/community-tools/novalnet-b2b-payment-integration.yaml b/src/content/community-tools/novalnet-b2b-payment-integration.yaml new file mode 100644 index 00000000..e828e59a --- /dev/null +++ b/src/content/community-tools/novalnet-b2b-payment-integration.yaml @@ -0,0 +1,12 @@ +title: "Novalnet B2B Payment integration" +subtitle: "" +description: "Novalnet payment module for Spryker simplifies your daily work by automating the entire payment process, from checkout till collection. This module is designed to help you increase your sales by offering various payment methods on a one-page checkout. The module which is perfectly adjusted to the Spryker shop with top-quality range of services of the payment provider." +tags: [] +license: "Custom" +creators: + - name: "Novalnet" + url: "https://github.com/Novalnet-AG/" +contributors: [] +links: + - label: "Github" + url: "https://github.com/Novalnet-AG/sprykerb2b-payment-integration-novalnet" diff --git a/src/content/community-tools/novalnet-b2c-marketplace-payment-integration.yaml b/src/content/community-tools/novalnet-b2c-marketplace-payment-integration.yaml new file mode 100644 index 00000000..6d2d1b00 --- /dev/null +++ b/src/content/community-tools/novalnet-b2c-marketplace-payment-integration.yaml @@ -0,0 +1,12 @@ +title: "Novalnet B2C Marketplace Payment Integration" +subtitle: "" +description: "Novalnet payment module for Spryker simplifies your daily work by automating the entire payment process, from checkout till collection. This module is designed to help you increase your sales by offering various payment methods on a one-page checkout. The module which is perfectly adjusted to the Spryker shop with top-quality range of services of the payment provider." +tags: [] +license: "Custom" +creators: + - name: "Novalnet" + url: "https://github.com/Novalnet-AG/" +contributors: [] +links: + - label: "Github" + url: "https://github.com/Novalnet-AG/sprykerb2c-Marketplace-payment-integration-novalnet" diff --git a/src/content/community-tools/product-management-ai-translator-module.yaml b/src/content/community-tools/product-management-ai-translator-module.yaml new file mode 100644 index 00000000..14438caa --- /dev/null +++ b/src/content/community-tools/product-management-ai-translator-module.yaml @@ -0,0 +1,12 @@ +title: "ProductManagementAiTranslator Module" +subtitle: "" +description: "This module provides product-related AI translation functionality." +tags: [] +license: "MIT" +creators: + - name: "Community" + url: "https://forum.commercequest.space/categories/spryker-community-projects" +contributors: [] +links: + - label: "Github" + url: "https://github.com/spryker-community/product-management-ai-translator" diff --git a/src/content/community-tools/pyz-for-php-storm.yaml b/src/content/community-tools/pyz-for-php-storm.yaml new file mode 100644 index 00000000..e951416a --- /dev/null +++ b/src/content/community-tools/pyz-for-php-storm.yaml @@ -0,0 +1,20 @@ +title: PYZ for PhpStorm +description: > + This plugin was created during the Turbine Kreuzberg Breakout Week as a + learning project by a bunch of PHP developers. + + +tags: [] +license: MIT +creators: + - name: Turbine Kreuzberg + url: https://github.com/turbine-kreuzberg/ +contributors: [] +links: + - label: Github + url: https://github.com/turbine-kreuzberg/spryker-idea-plugin diff --git a/src/content/community-tools/sentry-io-integration.yaml b/src/content/community-tools/sentry-io-integration.yaml new file mode 100644 index 00000000..7bff9888 --- /dev/null +++ b/src/content/community-tools/sentry-io-integration.yaml @@ -0,0 +1,13 @@ +title: "Sentry.io integration" +subtitle: "" +description: | + This package enables Sentry.io to work with your Spryker shop by extending the Monitoring Module of Spryker and adding other hooks to here and there to enhance the data in Sentry. +tags: [] +license: "MIT" +creators: + - name: "Turbine Kreuzberg" + url: "https://github.com/turbine-kreuzberg/" +contributors: [] +links: + - label: "Github" + url: "https://github.com/turbine-kreuzberg/spryker-sentry" diff --git a/src/content/community-tools/spryker-debug.yaml b/src/content/community-tools/spryker-debug.yaml new file mode 100644 index 00000000..8e877e01 --- /dev/null +++ b/src/content/community-tools/spryker-debug.yaml @@ -0,0 +1,12 @@ +title: "Spryker Debug" +subtitle: "" +description: "Collection of Spryker-compatible debug and development tools." +tags: [] +license: "MIT" +creators: + - name: "Inviqa" + url: "https://github.com/inviqa/" +contributors: [] +links: + - label: "Github" + url: "https://github.com/inviqa/spryker-debug" \ No newline at end of file diff --git a/src/content/community-tools/spryker-kit-for-php-storm.yaml b/src/content/community-tools/spryker-kit-for-php-storm.yaml new file mode 100644 index 00000000..ddc5ae7c --- /dev/null +++ b/src/content/community-tools/spryker-kit-for-php-storm.yaml @@ -0,0 +1,22 @@ +title: "SprykerKit for PhpStorm" +subtitle: "" +description: | + Supports the development of Spryker applications with Intellij IDEA. +

Features: + +tags: [] +license: "MIT" +creators: + - name: "Valantic" + url: "https://github.com/valantic-CEC-Deutschland-GmbH" +contributors: [] +links: + - label: "JetBrains marketplace" + url: "https://plugins.jetbrains.com/plugin/18766-sprykerkit" + - label: "Github" + url: "https://github.com/valantic-CEC-Deutschland-GmbH/spryker-kit-intellij-plugin" diff --git a/src/content/community-tools/test.yaml b/src/content/community-tools/test.yaml deleted file mode 100644 index 03c9690e..00000000 --- a/src/content/community-tools/test.yaml +++ /dev/null @@ -1 +0,0 @@ -title: test diff --git a/src/content/community-tools/two-factor-backend-authentication.yaml b/src/content/community-tools/two-factor-backend-authentication.yaml new file mode 100644 index 00000000..e34acca4 --- /dev/null +++ b/src/content/community-tools/two-factor-backend-authentication.yaml @@ -0,0 +1,11 @@ +title: "Two-factor Backend Authentication" +subtitle: "" +description: "Second Factor Authentication for the Spryker Administration Interface" +tags: [] +license: "MIT" +creators: + - name: "UFirst Group" +contributors: [] +links: + - label: "Github" + url: "https://github.com/ufirstgroup/spryker-second-factor-auth" diff --git a/src/data_files/communityTools.json b/src/data_files/communityTools.json deleted file mode 100644 index 79ce86ab..00000000 --- a/src/data_files/communityTools.json +++ /dev/null @@ -1,216 +0,0 @@ -[ - { - "title": "SprykerKit for PhpStorm", - "subtitle": "", - "description": "Supports the development of Spryker applications with Intellij IDEA.\n

Features:\n", - "tags": [], - "license": "MIT", - "creators": [{"name": "Valantic", "url": "https://github.com/valantic-CEC-Deutschland-GmbH"}], - "contributors": [], - "links": [ - { - "label": "JetBrains marketplace", - "url": "https://plugins.jetbrains.com/plugin/18766-sprykerkit" - }, - { - "label": "Github", - "url": "https://github.com/valantic-CEC-Deutschland-GmbH/spryker-kit-intellij-plugin" - } - ] - }, - { - "title": "PYZ for PhpStorm", - "subtitle": "", - "description": "This plugin was created during the Turbine Kreuzberg Breakout Week as a learning project by a bunch of PHP developers.\n", - "tags": [], - "license": "MIT", - "creators": [{"name": "Turbine Kreuzberg", "url": "https://github.com/turbine-kreuzberg/"}], - "contributors": [], - "links": [ - { - "label": "Github", - "url": "https://github.com/turbine-kreuzberg/spryker-idea-plugin" - } - ] - }, - { - "title": "Spryker Debug", - "subtitle": "", - "description": "Collection of Spryker-compatible debug and development tools.", - "tags": [], - "license": "MIT", - "creators": [{"name": "Inviqa", "url": "https://github.com/inviqa/"}], - "contributors": [], - "links": [ - { - "label": "Github", - "url": "https://github.com/inviqa/spryker-debug" - } - ] - }, - { - "title": "Google Tag Manager integration", - "subtitle": "", - "description": "The title speaks for itself \uD83D\uDE42", - "tags": [], - "license": "MIT", - "creators": [{"name": "Fond Of", "url": "https://github.com/fond-of/"}], - "contributors": [], - "links": [ - { - "label": "Github", - "url": "https://github.com/fond-of/spryker-google-tagmanager" - } - ] - }, - { - "title": "Contentful connector", - "subtitle": "", - "description": "A Spryker-Contentful connector. Import content from contentful to storage and updates it via cronjob.", - "tags": [], - "license": "MIT", - "creators": [{"name": "Fond Of", "url": "https://github.com/fond-of/"}], - "contributors": [], - "links": [ - { - "label": "Github", - "url": "https://github.com/fond-of/spryker-contentful" - } - ] - }, - { - "title": "Novalnet B2B Payment integration", - "subtitle": "", - "description": "Novalnet payment module for Spryker simplifies your daily work by automating the entire payment process, from checkout till collection. This module is designed to help you increase your sales by offering various payment methods on a one-page checkout. The module which is perfectly adjusted to the Spryker shop with top-quality range of services of the payment provider.", - "tags": [], - "license": "Custom", - "creators": [{"name": "Novalnet", "url": "https://github.com/Novalnet-AG/"}], - "contributors": [], - "links": [ - { - "label": "Github", - "url": "https://github.com/Novalnet-AG/sprykerb2b-payment-integration-novalnet" - } - ] - }, - { - "title": "Novalnet B2C Marketplace Payment Integration", - "subtitle": "", - "description": "Novalnet payment module for Spryker simplifies your daily work by automating the entire payment process, from checkout till collection. This module is designed to help you increase your sales by offering various payment methods on a one-page checkout. The module which is perfectly adjusted to the Spryker shop with top-quality range of services of the payment provider.", - "tags": [], - "license": "Custom", - "creators": [{"name": "Novalnet", "url": "https://github.com/Novalnet-AG/"}], - "contributors": [], - "links": [ - { - "label": "Github", - "url": "https://github.com/Novalnet-AG/sprykerb2c-Marketplace-payment-integration-novalnet" - } - ] - }, - { - "title": "Codeception Module", - "subtitle": "", - "description": "This module allows developers to test spryker modules isolated.", - "tags": [], - "license": "MIT", - "creators": [{"name": "Fond Of", "url": "https://github.com/fond-of/"}], - "contributors": [], - "links": [ - { - "label": "Github", - "url": "https://github.com/fond-of/codeception-spryker" - } - ] - }, - { - "title": "Two-factor Backend Authentication", - "subtitle": "", - "description": "Second Factor Authentication for the Spryker Administration Interface", - "tags": [], - "license": "MIT", - "creators": [{"name": "UFirst Group"}], - "contributors": [], - "links": [ - { - "label": "Github", - "url": "https://github.com/ufirstgroup/spryker-second-factor-auth" - } - ] - }, - { - "title": "Jellyfish B2B Module", - "subtitle": "", - "description": "", - "tags": [], - "license": "MIT", - "creators": [{"name": "Fond Of", "url": "https://github.com/fond-of/"}], - "contributors": [], - "links": [ - { - "label": "Github", - "url": "https://github.com/fond-of/spryker-jellyfish-b2b" - } - ] - }, - { - "title": "Sentry.io integration", - "subtitle": "", - "description": "This package enables Sentry.io to work with your Spryker shop by extending the Monitoring Module of Spryker and adding other hooks to here and there to enhance the data in Sentry.", - "tags": [], - "license": "MIT", - "creators": [{"name": "Turbine Kreuzberg", "url": "https://github.com/turbine-kreuzberg/"}], - "contributors": [], - "links": [ - { - "label": "Github", - "url": "https://github.com/turbine-kreuzberg/spryker-sentry" - } - ] - }, - { - "title": "CLI Toolkit", - "subtitle": "Spryker Community CLI Toolkit", - "description": "A suite of utilities designed to enhance performance in your day-to-day operations with Spryker Commerce OS.", - "tags": [], - "license": "MIT", - "creators": [{"name": "Community", "url": "https://forum.commercequest.space/categories/spryker-community-projects"}], - "contributors": [], - "links": [ - { - "label": "Github", - "url": "https://github.com/spryker-community/cli-toolkit" - } - ] - }, - { - "title": "i18n Translations", - "subtitle": "", - "description": "Adds support for multiple languages to Spryker OS", - "tags": [], - "license": "MIT", - "creators": [{"name": "Community", "url": "https://forum.commercequest.space/categories/spryker-community-projects"}], - "contributors": [], - "links": [ - { - "label": "Github", - "url": "https://github.com/spryker-community/spryker-translations" - } - ] - }, - { - "title": "ProductManagementAiTranslator Module", - "subtitle": "", - "description": "This module provides product-related AI translation functionality.", - "tags": [], - "license": "MIT", - "creators": [{"name": "Community", "url": "https://forum.commercequest.space/categories/spryker-community-projects"}], - "contributors": [], - "links": [ - { - "label": "Github", - "url": "https://github.com/spryker-community/product-management-ai-translator" - } - ] - } -] diff --git a/src/pages/community-tools.astro b/src/pages/community-tools.astro index b45f8838..4a391036 100644 --- a/src/pages/community-tools.astro +++ b/src/pages/community-tools.astro @@ -1,12 +1,14 @@ --- +import { getCollection } from 'astro:content'; import MainLayout from "../layouts/MainLayout.astro"; import { SITE } from "@data/constants"; import MainSection from "../components/ui/blocks/MainSection.astro"; import CommunityToolsTable from "../components/ui/tables/CommunityToolsTable.astro"; -import communityToolsData from "@data/communityTools.json"; import type { CommunityToolCollection } from "../types"; -const communityTools: CommunityToolCollection = communityToolsData as CommunityToolCollection; +const communityTools: CommunityToolCollection = ( + await getCollection('community-tools') +).map((tool) => tool.data) as CommunityToolCollection const pageTitle: string = `Community Tools — ${SITE.title}`; --- diff --git a/src/types.ts b/src/types.ts index e47d8679..21bfb6a7 100644 --- a/src/types.ts +++ b/src/types.ts @@ -28,8 +28,8 @@ export type CommunityToolLink = { export type CommunityTool = { title: string; - subtitle: string | undefined; - description: string; + subtitle?: string; + description?: string; tags?: string[]; license: string; creators: CommunityToolCreator[];