Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

Bought Jack McDade's course on design. Going through it now...and it is SO well done!

— Justin Jackson, Transistor.fm

bard_items Modifier

Converts any Bard data to a flat array of ProseMirror nodes and marks. Bard data can be either:

  • The raw value from a Bard field (a ProseMirror document), with or without sets
  • One or more of the ProseMirror nodes returned from this modifier
main_content:
-
type: paragraph
content:
-
type: text
text: "We're going to build a "
-
type: text
marks:
-
type: link
attrs:
href: 'http://localhost/'
text: 'simple personal'
-
type: text
text: ' website for a fictitious young aspiring programmer named Kurt Logan'
-
type: paragraph
content:
-
type: image
attrs:
src: 'asset::assets::donut.jpg'
-
type: text
text: "Kurt always has and always will live in the 1980s and is very excited at the prospect of having his very own place in\_CYBERSPACE."
{{ main_content | raw | bard_items }}
{{ main_content | raw | bard_items | where:type:image | first | bard_html }}
{{ links = main_content | raw | bard_items | where:type:link }}
{{ links }}
{{ node | bard_text }} - {{ attrs:href }}
{{ /links }}
value:
-
type: paragraph
content:
-
type: text
text: "We're going to build a "
-
type: text
marks:
-
type: link
attrs:
href: 'http://localhost/'
text: simple personal
-
type: text
text: ' website for a fictitious young aspiring programmer named Kurt Logan'
-
type: text
text: "We're going to build a "
-
type: text
marks:
-
type: link
attrs:
href: 'http://localhost/'
text: simple personal
-
type: link
attrs:
href: 'http://localhost/'
node:
type: text
marks:
-
type: link
attrs:
href: 'http://localhost/'
text: simple personal
-
type: text
text: ' website for a fictitious young aspiring programmer named Kurt Logan'
-
type: paragraph
content:
-
type: image
attrs:
src: 'asset::assets::donut.jpg'
-
type: text
text: "Kurt always has and always will live in the 1980s and is very excited at the prospect of having his very own place in\_CYBERSPACE."
-
type: image
attrs:
src: 'asset::assets::donut.jpg'
-
type: text
text: "Kurt always has and always will live in the 1980s and is very excited at the prospect of having his very own place in\_CYBERSPACE."
<img src="/assets/donut.jpg" alt="">
simple personal - http://localhost/
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →