Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use <script> and <style> for script and style instead of unique markdown blocks #27

Closed
swyxio opened this issue Oct 7, 2019 · 3 comments

Comments

@swyxio
Copy link
Contributor

swyxio commented Oct 7, 2019

as i explore this space more i think the ideal authoring experience really looks something like this:

---
title: foo
bar: baz
---

<script>
import Counter from './path/to/Counter.svelte';
import {H1, UL, LI} from './customComponents.svelte';

let number = 500;
export let mdsvexComponents = {H1, UL, LI}
</script>

<style>
	ul {
		color: red
	}
</style>

<script module>
export let potato = "russet"
</script>

# hi! this is markdown in svelte!

<Counter count="{number}" />

Inline components <Counter count="{5}" /> are absolute fine too.

I like lists:

- these are rendered
- with custom svelte
- components

\```js
const str = `this just displays as a normal code block`
\```

so working backwards from the ideal experience we could explore being a loader fork instead of being a svelte preprocessor?

@swyxio swyxio changed the title consider being a rollup-plugin-svelte/svelte-loader superset use <script> and <style> for script and style instead of unique markdown blocks Oct 7, 2019
@pngwn pngwn added remark and removed remark labels Nov 15, 2019
@louwers
Copy link

louwers commented Dec 22, 2019

Why not write a pandoc filter instead of implementing a shabby parser in Javascript/Typescript?

@pngwn
Copy link
Owner

pngwn commented Dec 22, 2019

There are a number of reasons but pandoc was never an option.

@pngwn
Copy link
Owner

pngwn commented May 26, 2020

This is done in 0.8.

@pngwn pngwn closed this as completed May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants