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

Not rendered as markdown. #439

Closed
ymgn-dev opened this issue Mar 20, 2022 · 5 comments
Closed

Not rendered as markdown. #439

ymgn-dev opened this issue Mar 20, 2022 · 5 comments

Comments

@ymgn-dev
Copy link

Problem

I wrote this in src/routes/blog/posts/text.svx.

---
title: "My blog post"
createdAt: 2022-03-18
updatedAt: 2022-03-20
layout: blog_active
---

# Title

Some text

- a
- short
- list

However, when I access http://localhost:3000/blog/posts/test, it shows up as plain text like this.

CleanShot 2022-03-20 at 10 59 27

Do I need to do any additional configuration?

Environments

  • SvelteKit v1.0.0-next.301
  • MDsveX v.0.10.5(Installed using svelte-add)
@pngwn
Copy link
Owner

pngwn commented Mar 22, 2022

You shouldn't. Do you have a reproduction I can take a look at?

@babichjacob
Copy link
Contributor

Those are the default styles for those elements when using Tailwind CSS. There's a small amount of extra info here.

@ymgn-dev
Copy link
Author

@pngwn @babichjacob

As @babichjacob told me, the styles were reset by svelte-add tailwindcss.
Adding the prose class to __layout.svelte made it render correctly.

Thank you both for your help.

CleanShot 2022-03-24 at 10 34 10@2x

@ymgn-dev
Copy link
Author

Oops, I just noticed that the coding highlighting for js, etc. doesn't seem to be working.

Here is the minimum app code that can reproduce the problem.
The setup procedure I did is in the README.

You can reproduce it by access to http://localhost:3000/test.

https://github.com/ymgn9314/testing_svelte_mdsvex

@pngwn
Copy link
Owner

pngwn commented Mar 27, 2022

Looks like you need to include the theme CSS, which mdsvex does not inject for you: https://mdsvex.pngwn.io/docs#highlight.

Theme CSS can be found here: https://github.com/PrismJS/prism-themes

@pngwn pngwn closed this as completed Mar 27, 2022
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