|
| 1 | +--- |
| 2 | +title: Markdoc integration for Astro Ink |
| 3 | +date: "2023-03-08" |
| 4 | +image: https://user-images.githubusercontent.com/62121649/167893184-a2b69260-ca9e-4a77-a5bc-63b8135ae5db.png |
| 5 | +author: Aftab Alam |
| 6 | +authorTwitter: aftabbuddy |
| 7 | +category: design |
| 8 | +tags: |
| 9 | +- architecture |
| 10 | +- front-end |
| 11 | +- spa |
| 12 | +description: Markdoc extends the markdown syntax you love to offer you authoring superpowers... 💪 |
| 13 | +--- |
| 14 | +[Markdoc](https://markdoc.dev/docs/overview) extends the markdown syntax you know and love to offer you authoring superpowers... 💪. |
| 15 | + |
| 16 | +Tags are the heart of Markdoc system. You can use native Markdoc tags, like tables(example below), conditionals, and partials... |
| 17 | + |
| 18 | +## Table in Markdoc |
| 19 | +{% table %} |
| 20 | +* Foo |
| 21 | +* Bar |
| 22 | +* Baz |
| 23 | +--- |
| 24 | +* |
| 25 | + ``` |
| 26 | + puts "Some code here." |
| 27 | + ``` |
| 28 | +* |
| 29 | + {% list type="checkmark" %} |
| 30 | + * Bulleted list in table |
| 31 | + * Second item in bulleted list |
| 32 | + {% /list %} |
| 33 | +* Text in a table |
| 34 | +--- |
| 35 | +* |
| 36 | + A "loose" list with |
| 37 | + |
| 38 | + multiple line items |
| 39 | +* Test 2 |
| 40 | +* Test 3 |
| 41 | +--- |
| 42 | +* Test 1 |
| 43 | +* A cell that spans two columns {% colspan=2 %} |
| 44 | +{% /table %} |
| 45 | + |
| 46 | +or create custom components. |
| 47 | + |
| 48 | +## Tags available out of Ink |
| 49 | +Astro Ink ships with the following tags with more coming soon... |
| 50 | + |
| 51 | +### Callout |
| 52 | +{% callout type="note" title="Note" %} |
| 53 | + lorem ipsum doler sit amet |
| 54 | +{% /callout %} |
| 55 | + |
| 56 | +{% callout type="error" title="Error" %} |
| 57 | + lorem ipsum doler sit amet |
| 58 | +{% /callout %} |
| 59 | + |
| 60 | +{% callout type="warning" title="Warning" %} |
| 61 | + lorem ipsum doler sit amet |
| 62 | +{% /callout %} |
| 63 | + |
| 64 | +{% callout type="check" title="Check" %} |
| 65 | + lorem ipsum doler sit amet |
| 66 | +{% /callout %} |
| 67 | + |
| 68 | +### Link |
| 69 | + |
| 70 | +{% link href="/blog" title="take care" %} |
| 71 | + Go to blog |
| 72 | +{% /link %} |
| 73 | + |
| 74 | +### Tweet Embed |
| 75 | + |
| 76 | +{% tweet url="https://twitter.com/aftabbuddy/status/1630403326406959105" %} |
| 77 | + |
| 78 | +...more tags coming soon! |
| 79 | + |
| 80 | +## Functions (from official example) |
| 81 | + |
| 82 | +¡Hola {% getCountryEmoji("spain") %}! |
0 commit comments