marked
MDsveX
Our great sponsors
marked | MDsveX | |
---|---|---|
60 | 16 | |
31,702 | 2,157 | |
1.2% | - | |
9.5 | 7.1 | |
3 days ago | 12 days ago | |
JavaScript | JavaScript | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
marked
-
Eleventy vs. Next.js for static site generation
Next, install gray-matter to extract metadata from the front matter of markdown files, and marked to convert the markdown files to HTML:
-
To learn svelte, I clone Github's issues page including useful features that you might consider reusing.
📑 Marked Markdown parser. Use it to create your own markdown editor.
-
🤖 AI Search and Q&A for Your Dev.to Content with Vrite
Vrite SDK provides a few built-in input and output transformers. These are functions, with standardized signatures to process the content from and into Vrite. In this case, gfmInputTransformer is essentially a GitHub Flavored Markdown parser, using Marked.js under the hood.
-
Better code highlighting on the web: rehype-tree-sitter
Another contestant in this realm is Bright[1]. It runs entirely on the server and doesn't increase bundle size as seen here[2]. Regarding parsing speed tree-sitter is without a doubt performant since it is written in Rust, but I don't have any problems "parsing on every keystroke" with a setup containing Marked[3], highlight.js[4] and a sanitizer. I did however experience performance issues with other Markdown parser libraries than Marked.
[1]: https://bright.codehike.org/
[2]: https://aihelperbot.com/test-suite
-
Vrite Editor: Open-Source WYSIWYG Markdown Editor
To handle pasting block Markdown content like this, I had to tap into ProseMirror and implement a custom mechanism (though somewhat based on TipTap’s paste rules), detecting starting and ending points of the blocks and parsing them with Marked.js.
-
How I put ChatGPT into a WYSIWYG editor
Again, with streaming enabled, you’ll now receive new tokens as soon as they’re available. Given that OpenAI’s API uses Markdown in its response format, a full message will need to be put together from the incoming tokens and parsed to HTML, as accepted by the replaceContent function. For this purpose, I’ve used the Marked.js parser.
-
Can you use Eleventy with just md files? Or do you need a templating language?
Eleventy can take an .md file and output a .html but if you want to go as vanilla as possible you can just use a module like marked to do that.
-
Next-Level Technical Blogging with Dev.to API
Once you have the article data, you’ll likely have to process its body_markdown to a format required by your website, like HTML. There are many tools you can do this with — here’s an example using Marked.js:
-
[AskJS] Advice on how to manage breaking changes in the first versions of a UI Library
While changeset still lacks some features like a unified changelog for all the package, this can be handled with some scripts. Using for example marked one could set up some parsing to create a unified changelog for the whole system.
-
Releasing Longdown: Convert longform markdown files to outline format used by Logseq
did you look at the marked parser? (https://github.com/markedjs/marked) I'm using it for an upcoming plugin I'm working on
MDsveX
- Ask HN: Looking for lightweight personal blogging platform
-
recommended CMS to use with SvelteKit?
I was working on my blog websites. The current method I use to add more posts is using mdsvex(https://github.com/pngwn/MDsveX) it turns my markdown files into post.
-
Help with tabs component
Oh right sorry. MDSVEX is a preprocessor for using Svelte components in markdown files. SVX is just the file format for it
-
STWUI - Svelte-TailwindCSS UI
You can use those components in plain markdown. We will have to write documentation for inlang. Instead of requiring a preprocessor like MDX, MDsvex, or Stripe Markdoc, web components can be used instead. Reducing boilerplate, increasing maintainability and last but not least the community does not have to reinvent the wheel for every markdown preprocessor. Just use the platform. Just use web components in markdown.
-
best way to build a personal blog post with svelte and markdown
SvelteKit plus mdsvex. There are quite a few examples out there, e.g. https://github.com/rodneylab/sveltekit-blog-mdx.
-
Using Svelte+Kit for our company website [self-promotion]
One issue we previously had with parsing Markdown with MDsveX was how to get a list of blogs without embedding all the blog content into some JS files... There's quite a few posts online and that's why I figured I'd talk about it here because it seems to be a common pain with SvelteKit and adapter-static. Ultimately what we did was use route parameters and different endpoints for the different requests, which you can see here.
-
I've built a SVELTE Summary
Besides discovering some features I wasn't aware of yet, it was a great exercise to work with SvelteKit and mdsvex In case anyone was interested in the code, this can be found here https://github.com/Corrl/svelte-summary
-
Filetype not being set as markdown for svx files.
I am using mdsvex on my personal website. It is similar to React's mdx, but for Svelte. You can see here what that looks like.
-
What are the weirdest CMS you've seen used to host content?
The projects this solutions works with are customised Sveltekit projects I made. It has everything: markdown parser using Mdsvex, image converting tool using vite-imagetools, it has toml parser, and of course live preview and lots of other smaller things like markdown directives.
-
Svelte Starter Kit - Helpful Learning Resources & Packages
mdsvex: A Markdown preprocessor for Svelte. Markdown in Svelte.
What are some alternatives?
remark - markdown processor powered by plugins part of the @unifiedjs collective
markdown-it - Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed
snarkdown - :smirk_cat: A snarky 1kb Markdown parser written in JavaScript
DOMPurify - DOMPurify - a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMPurify works with a secure default, but offers a lot of configurability and hooks. Demo:
js-yaml - JavaScript YAML parser and dumper. Very fast.
front-matter - Extract YAML front matter from strings
PEG.js - PEG.js: Parser generator for JavaScript
Jinja2 - A very fast and expressive template engine.
fast-xml-parser - Validate XML, Parse XML and Build XML rapidly without C/C++ based libraries and no callback.
remark-directive - remark plugin to support directives
docx-to-pdf-on-AWS-Lambda - Microsoft Word doc/docx to PDF conversion on AWS Lambda using Node.js
URI.js - Javascript URL mutation library