| ... | @@ -39,7 +39,7 @@ meta: | ... | @@ -39,7 +39,7 @@ meta: |
| 39 | | 39 | |
| 40 | # ${meta.title} | 40 | # ${meta.title} |
| 41 | | 41 | |
| 42 | i'm a catgirl and i love to **meow**! meow meow meow! | 42 | i'm a catgirl and i love to **meow**! <rainbow-text>meow meow meow!</> |
| 43 | | 43 | |
| 44 | ```ts | 44 | ```ts |
| 45 | function doMyFavoriteThing() { | 45 | function doMyFavoriteThing() { |
| ... | @@ -73,11 +73,12 @@ i love being alive. ${'<3'} from ${new Date().getFullYear()}. | ... | @@ -73,11 +73,12 @@ i love being alive. ${'<3'} from ${new Date().getFullYear()}. |
| 73 | | 73 | |
| 74 | ## Install | 74 | ## Install |
| 75 | | 75 | |
| 76 | Markodown is distributed on [NPM](http://npmjs.com/markodown) and | 76 | Markodown is distributed on [NPM](https://npmjs.com/package/markodown) and |
| 77 | [JSR](https://jsr.io/@clo/markodown). The compiler runs anywhere JS+WASM runs. | 77 | [JSR](https://jsr.io/@clo/markodown). The compiler runs anywhere JS+WASM runs. |
| 78 | | 78 | |
| 79 | ```sh | 79 | ```sh |
| 80 | npm i markodown | 80 | npm i markodown |
| | 81 | # or |
| 81 | npx jsr add @clo/markodown | 82 | npx jsr add @clo/markodown |
| 82 | ``` | 83 | ``` |
| 83 | | 84 | |
| ... | @@ -97,6 +98,7 @@ export default defineConfig({ | ... | @@ -97,6 +98,7 @@ export default defineConfig({ |
| 97 | // optionally wrap all markdown files in a layout, this component is | 98 | // optionally wrap all markdown files in a layout, this component is |
| 98 | // given a list of headers to construct a table of contents. | 99 | // given a list of headers to construct a table of contents. |
| 99 | layoutImport: "../tags/markdown-layout.marko", | 100 | layoutImport: "../tags/markdown-layout.marko", |
| | 101 | // ...more customization options are well-documented in the types. |
| 100 | }), | 102 | }), |
| 101 | ], | 103 | ], |
| 102 | }); | 104 | }); |
| ... | @@ -104,7 +106,7 @@ export default defineConfig({ | ... | @@ -104,7 +106,7 @@ export default defineConfig({ |
| 104 | | 106 | |
| 105 | ## Components | 107 | ## Components |
| 106 | | 108 | |
| 107 | All Marko features, such as [tag resolution], [attribute tags], | 109 | All Marko features are supported, such as [tag resolution], [attribute tags], |
| 108 | [class shorthands], and template expressions. This makes it so much easier to | 110 | [class shorthands], and template expressions. This makes it so much easier to |
| 109 | add complex content to your pages. | 111 | add complex content to your pages. |
| 110 | | 112 | |
| ... | @@ -130,7 +132,7 @@ You can use Markodown to write blogs and long documents, then extract a table of | ... | @@ -130,7 +132,7 @@ You can use Markodown to write blogs and long documents, then extract a table of |
| 130 | contents. This is done with two mechanisms. | 132 | contents. This is done with two mechanisms. |
| 131 | | 133 | |
| 132 | - `layoutImport` which wraps the entire document in a component, which is given | 134 | - `layoutImport` which wraps the entire document in a component, which is given |
| 133 | three attributes. | 135 | three attributes. (see typescript types on the plugin / `transform` function) |
| 134 | - `content`: the rendered content. | 136 | - `content`: the rendered content. |
| 135 | - `module`: the module namespace for the compiled Markodown file. | 137 | - `module`: the module namespace for the compiled Markodown file. |
| 136 | - `outline`: an array of `Heading` objects. | 138 | - `outline`: an array of `Heading` objects. |
| ... | @@ -212,7 +214,8 @@ this paragraph gets wrapped in a `<p>` tag! | ... | @@ -212,7 +214,8 @@ this paragraph gets wrapped in a `<p>` tag! |
| 212 | | 214 | |
| 213 | ## Static Statements | 215 | ## Static Statements |
| 214 | | 216 | |
| 215 | Define module-level functions and variables. | 217 | You can define module-level functions and variables, |
| | 218 | [same as you can in Marko](https://markojs.com/docs/reference/language#statements). |
| 216 | | 219 | |
| 217 | ``` | 220 | ``` |
| 218 | static function sort(items: string[]) { | 221 | static function sort(items: string[]) { |
| ... | @@ -229,9 +232,9 @@ Note that this means writing a paragraph starting with the lowercase words | ... | @@ -229,9 +232,9 @@ Note that this means writing a paragraph starting with the lowercase words |
| 229 | ``` | 232 | ``` |
| 230 | # All About RSC | 233 | # All About RSC |
| 231 | | 234 | |
| 232 | \server components are stupid. (markdown backslash) | 235 | \server components are a bad idea. (markdown backslash) |
| 233 | | 236 | |
| 234 | ${"server"} components are stupid. (template literal) | 237 | ${"server"} components are a bad idea. (template literal) |
| 235 | | 238 | |
| 236 | Though you can say import as long as its not the first item. | 239 | Though you can say import as long as it's not the first item. |
| 237 | ``` | 240 | ``` |