Skip to content

Commit

Permalink
chore: custom field
Browse files Browse the repository at this point in the history
  • Loading branch information
supproduction committed Aug 1, 2024
1 parent 29906a8 commit f1fa81c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ export const StoryblokFieldNormalizer = 'oryx.StoryblokFieldNormalizer*';
export function storyblokFieldNormalizer(
data: StoryblokContentField
): StoryblokContentField {
if (data.type === 'spryker' && (data.value as any).example) {
return {
...data,
value: marked.parse((data.value as any).example as string),
};
}


if (data.type === 'markdown') {
return {
...data,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
of,
reduce,
switchMap,
tap,
} from 'rxjs';
import { Content, ContentMeta, ContentQualifier } from '../../../models';
import { ContentAdapter } from '../../adapter';
Expand Down Expand Up @@ -62,7 +63,10 @@ export class DefaultStoryblokContentAdapter implements ContentAdapter {
},
component.schema
)
)
),
tap(s => {
console.log(s, 's')
})
);
}

Expand Down
6 changes: 6 additions & 0 deletions libs/template/labs/src/articles/article-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ export const experienceArticlePages = [
field: 'content',
},
},
{
type: 'oryx-data-text',
options: {
field: 'spryker.example',
},
},
],
},
{ ref: 'footer' },
Expand Down

0 comments on commit f1fa81c

Please sign in to comment.