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

*.story.md is not rendering properly with Sveltekit #321

Closed
5 of 6 tasks
swyxio opened this issue Oct 9, 2022 · 7 comments
Closed
5 of 6 tasks

*.story.md is not rendering properly with Sveltekit #321

swyxio opened this issue Oct 9, 2022 · 7 comments
Labels
to triage This issue needs to be triaged

Comments

@swyxio
Copy link

swyxio commented Oct 9, 2022

Describe the bug

was trying out the docs files feature... but add a .story.md file in svelte, and this happens

for component:

image

for "virtual story":

image

Reproduction

System Info

System:
    OS: macOS 12.5.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 772.11 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.15.0 - ~/Library/Caches/fnm_multishells/35700_1665020132817/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.5.5 - ~/Library/Caches/fnm_multishells/35700_1665020132817/bin/npm
  Browsers:
    Chrome: 105.0.5195.125
    Safari: 15.6.1
  npmPackages:
    @histoire/plugin-svelte: ^0.11.0 => 0.11.0 
    histoire: ^0.11.0 => 0.11.0

Used Package Manager

npm

Validations

@swyxio swyxio added the to triage This issue needs to be triaged label Oct 9, 2022
@swyxio
Copy link
Author

swyxio commented Oct 9, 2022

inline docs for svelte would be nice too! happy to brainstorm syntax with you... i dont think this style of docs will be very discoverable or easy to maintain

@Akryum
Copy link
Member

Akryum commented Oct 9, 2022

Looks like sveltekit applies a transform to markdown files 🐈

@Akryum Akryum changed the title *.story.md is not rendering properly *.story.md is not rendering properly with Sveltekit Oct 9, 2022
@Akryum Akryum closed this as completed in 082ad07 Oct 9, 2022
@Akryum
Copy link
Member

Akryum commented Oct 9, 2022

inline docs for svelte would be nice too! happy to brainstorm syntax with you... i dont think this style of docs will be very discoverable or easy to maintain

AFAIK Svelte doesn't support custom blocks like in Vue:
image

Maybe we could do something like this:
image

But then there is no syntax highlighting and we need to be careful about the indentation. And putting code examples with ``` will be cumbersome.

@Akryum
Copy link
Member

Akryum commented Oct 9, 2022

Maybe a comment?
image

@swyxio
Copy link
Author

swyxio commented Oct 10, 2022

@Akryum wow, if you can parse comments i think that'd work

but also maybe you just wanna support mdsvex as your preferred story rendering format instead of .md? (yes it has enough community traction that it isn't going to surprise any svelte users). syntax highlighting would be supported because "its just markdown"

thats what i loved about the old docz style of storybooking, for what its worth. multiple stories, all inline with arbitrary description for each story in markdown.

@Akryum
Copy link
Member

Akryum commented Oct 12, 2022

Maybe a markdown file could be compiled on to a story component.

@swyxio
Copy link
Author

swyxio commented Oct 12, 2022

might as well use mdsvex? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants