Giter Club home page Giter Club logo

Comments (9)

wooorm avatar wooorm commented on May 5, 2024 2

Btw: I’d strongly suggest to also allow rehype plugins.
Markdown is used a lot to get to HTML. Historically, there was only remark, so a bunch of things were implemented in that space. But there are also many use cases that don’t really care about the input being markdown, or actually don’t have input markdown (e.g., html -> html), which also makes sense for Astro. So integrating with both would be my recommendation!

from astro.

natemoo-re avatar natemoo-re commented on May 5, 2024 1

IMO the point of migrating to remark was to leverage the extensive plugin ecosystem that supports remark. The way that we render markdown (interwoven in small snippets between elements) might be jarring to expose directly to users. But if anyone feels like handing rendering entirely over to users is a better solution, I'm interested to hear why!

from astro.

natemoo-re avatar natemoo-re commented on May 5, 2024 1

@akellbl4 awesome, definitely let us know if you have any questions! The way renderers are implemented is probably similar to the way we'll handle this.

from astro.

natemoo-re avatar natemoo-re commented on May 5, 2024 1

Thanks for chiming in @wooorm! #562 is in progress and adds support for both!

from astro.

matthewp avatar matthewp commented on May 5, 2024

Currently we use remark to do Markdown rendering. Is the goal here to provide hooks so that a user can add support for additional markdown features (which could probably be done by adding remark plugins), or is the goal to completely take over and do ones own Markdown compilation?

from astro.

mgrn0 avatar mgrn0 commented on May 5, 2024

If I understand correctly one use case would be to extend markdown files with custom extensions for e.g. integrating html snippets (for design systems) or to wrap some parts of default markdown with additional markup while rendered, adding footnotes and summaries of links, comments which should not be rendered in html but shall stay in markdown etc..?

from astro.

matthewp avatar matthewp commented on May 5, 2024

Yep!

from astro.

akellbl4 avatar akellbl4 commented on May 5, 2024

I didn't found this issue and tried to implement one of Remark plugins right in Astro.

I think it's a great idea to provide the hook for custom remark plugins. I would like to work on it because I'm in the process of migrating my site to Astro and I need remark-code-titles . I think it's the only thing that stops me from full migration.

from astro.

akellbl4 avatar akellbl4 commented on May 5, 2024

I've played with source code and written rough implementation.
I have two concerns for now:

  • headers collector could conflict with remark-slug I've added backward compatibility.
  • Should preinstalled plugins be removed?
  • I haven't found any docs on mode: 'md' | 'astro-md' and dropped it for fast implementation.

I would be happy to have any comments on my PR.

from astro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.