Skip to content

Commit

Permalink
Adds community-tools in keystatic format (#199)
Browse files Browse the repository at this point in the history
* Adds community-tools in keystatic format
  • Loading branch information
fsmeier authored Dec 19, 2024
1 parent 00746db commit 3c67fe8
Show file tree
Hide file tree
Showing 21 changed files with 328 additions and 231 deletions.
122 changes: 118 additions & 4 deletions keystatic.config.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
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: {
name: 'CommerceQuest Admin',
},
},
collections: {
freelancers: collection({
'freelancers': collection({
label: 'Freelancers',
path: 'src/content/freelancers/*',
slugField: 'slug',
Expand Down Expand Up @@ -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;
23 changes: 17 additions & 6 deletions src/components/ui/tables/CommunityToolsTable.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ function getUniqueAttributes(tools: CommunityToolCollection) {
const licenses = new Set<string>();
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);
Expand Down Expand Up @@ -218,7 +221,7 @@ const { creatorNames, tags, licenses } = getUniqueAttributes(tools);
return `
<div>
<h2 class="font-semibold text-gray-800 dark:text-white ">${title}</h2>
<p class="text-sm font-normal text-gray-600 dark:text-gray-400">${subtitle}</p>
${subtitle ? `<p class="text-sm font-normal text-gray-600 dark:text-gray-400">${subtitle}</p>` : ''}
</div>
`;
},
Expand All @@ -229,11 +232,19 @@ const { creatorNames, tags, licenses } = getUniqueAttributes(tools);
thClassList: ['min-w-96'],
},
enableSorting: false,
cell: (props) => (
`<div class="prose inline py-1 text-sm font-normal rounded-full text-gray-500 gap-x-2 dark:text-gray-400 prose-a:cursor-pointer prose-a:transition-colors prose-a:duration-200 dark:hover:prose-a:text-gray-500 dark:prose-a:text-gray-300 hover:prose-a:text-gray-500 focus:prose-a:outline-none">
${props.getValue()}
</div>`
),
cell: (props) => {
const { description } = props.row.original;

if (!description) {
return '';
}

return `
<div class="prose inline py-1 text-sm font-normal rounded-full text-gray-500 gap-x-2 dark:text-gray-400 prose-a:cursor-pointer prose-a:transition-colors prose-a:duration-200 dark:hover:prose-a:text-gray-500 dark:prose-a:text-gray-300 hover:prose-a:text-gray-500 focus:prose-a:outline-none">
${description}
</div>
`;
}
}),
columnHelper.accessor('license', {
header: () => 'License',
Expand Down
5 changes: 5 additions & 0 deletions src/content.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
12 changes: 12 additions & 0 deletions src/content/community-tools/cli-toolkit.yaml
Original file line number Diff line number Diff line change
@@ -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"
12 changes: 12 additions & 0 deletions src/content/community-tools/codeception-module.yaml
Original file line number Diff line number Diff line change
@@ -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"
12 changes: 12 additions & 0 deletions src/content/community-tools/contentful-connector.yaml
Original file line number Diff line number Diff line change
@@ -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"
12 changes: 12 additions & 0 deletions src/content/community-tools/google-tag-manager-integration.yaml
Original file line number Diff line number Diff line change
@@ -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"
12 changes: 12 additions & 0 deletions src/content/community-tools/i18n-translations.yaml
Original file line number Diff line number Diff line change
@@ -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"
8 changes: 8 additions & 0 deletions src/content/community-tools/jellyfish-b2b-module.yaml
Original file line number Diff line number Diff line change
@@ -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"
12 changes: 12 additions & 0 deletions src/content/community-tools/novalnet-b2b-payment-integration.yaml
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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"
20 changes: 20 additions & 0 deletions src/content/community-tools/pyz-for-php-storm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
title: PYZ for PhpStorm
description: >
This plugin was created during the <i>Turbine Kreuzberg Breakout Week</i> as a
learning project by a bunch of PHP developers.
<ul>
<li>Extend Spryker core classes, interfaces and xml files on project level (right-click -> Extend in PYZ / CTRL-ALT-E)</li>
<li>Open Spryker files on github.com (right-click -> View on GitHub / CTRL-ALT-G)</li>
<li>Goto-handling for Zed stub calls and their gateway controller actions (URLs are clickable)</li>
<li>Resolve usages of gateway controller actions in Zed stub calls</li>
</ul>
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
13 changes: 13 additions & 0 deletions src/content/community-tools/sentry-io-integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
title: "Sentry.io integration"
subtitle: ""
description: |
This package enables <a href="https://sentry.io" rel="nofollow" target="_blank">Sentry.io</a> to work with your <a href="https://spryker.com" target="_blank">Spryker</a> 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"
12 changes: 12 additions & 0 deletions src/content/community-tools/spryker-debug.yaml
Original file line number Diff line number Diff line change
@@ -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"
22 changes: 22 additions & 0 deletions src/content/community-tools/spryker-kit-for-php-storm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
title: "SprykerKit for PhpStorm"
subtitle: ""
description: |
Supports the development of <a href="https://www.spryker.com" target="_blank">Spryker</a> applications with Intellij IDEA.
<br /><br />Features:
<ul>
<li>Create Spryker Module boilerplate based on your current context</li>
<li>Create Spryker Files and Folders based on your current context</li>
<li>Supported Layers Client, Glue, Service, Shared, Yves, Zed</li>
<li>Configure desired project namespace</li>
</ul>
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"
1 change: 0 additions & 1 deletion src/content/community-tools/test.yaml

This file was deleted.

Loading

0 comments on commit 3c67fe8

Please sign in to comment.