Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yazaldefilimone/scc.rs

Rust-based Structured Content Compiler
https://github.com/yazaldefilimone/scc.rs

compiler html markdown react vuejs

Last synced: 27 days ago
JSON representation

Rust-based Structured Content Compiler

Awesome Lists containing this project

README

        

```ascii
| .............................. process ............................... |
| ....... parse .... | ..... run ...... | .... render .......... |

+--------+ +----------+
Input ->- | Parser | ->- AST ->- | Compiler | ->- JSX/Vue/HTML...
+--------+ | +----------+
X
|
+--------------+
| Transformers |
+--------------+

```

- How SCC works?

1. Markdown(with jsx/tsx)

```mdx
export function Thing() {
return <>World>;
}

# Hello
```

- Result

```jsx
/* @jsxRuntime automatic */
/* @jsxImportSource react */

export function Thing() {
return <>World>;
}

export default function MDXContent() {
return (


Hello


);
}
```

2. Markdown(with vue)

```html

import {ref} from 'vue' const count = ref(0)

## Markdown Content

The count is: {{ count }}

Increment
```

- Result

```vue

import { ref } from "vue";

const count = ref(0);

Markdown Content


The count is: {{ count }}


Increment

```