Giter VIP home page Giter VIP logo

Comments (4)

claudeduguay avatar claudeduguay commented on May 26, 2024 3

I'm using MDX as well. @mdx-js has a nice set of specifications https://github.com/mdx-js/specification that show pipeline that lets you inject yourself into the sequence, including at the HAST layer, which is on the way out and so could be something you can integrate with relative ease. I'm new to NextJS but my stack so far includes: TypeScript, MDX, SASS and now Nextstein. Keep up the good work.

from nextein.

vorillaz avatar vorillaz commented on May 26, 2024 2

I always keep an eye on nextein and MDX seems lovely as an option. Using @zeit/next-mdx inside the config.js can parse the MDX files. It would be tricky though to pass along the components through the available HOCs as well as hotloading everything through the server. I have struggled myself a lot with this process for a few projects of mine and it's a mess fighting with webpack and rewiring the next.js setup. If you are planning to work on integrating MDX I am more than willing to help tho :D

from nextein.

elmasse avatar elmasse commented on May 26, 2024 1

I have been experimenting with MDX integration for Nextein a couple times. Unfortunately, I haven't found a clear way on how to make an .mdx document part of the current Nextein workflow.
I have some more ideas in mind to play with now that plugins are in place but it might require some changes into the <Content > component to render MDAST nodes.

The main idea is to add a plugin that reads only .mdx files, generates the metadata needed for filtering, sorting, url, etc, and puts the MDAST in place of the HAST tree. Then, we need a way to determine in the render process what kind of tree are we rendering.

This might be a fairly simple first scenario to test and play with. I'm not completely sure how many different scenarios might involve having MDX support (like defining layouts, importing components, exporting metadata outside a front matter block, etc). But maybe it can be added in a beta version.

Any help is more than welcome!

from nextein.

elmasse avatar elmasse commented on May 26, 2024

Hi @sergiodxa thanks for reaching out. MDX is definitely in my bucket list. Although, I don't know yet how that can fit into nextein model right now. AFAIK, MDX needs a babel-transpiler while on regular md files I'm just pre-processing them with remark to generate a HAST that is consumed from the <Content/> tag.

I'm still thinking about the idea of having a plugin system to allow not only md files for a v2.x but that's still only in paper and not quite clear yet.

How do you envision MDX working with Nextein? Maybe we can chat a bit about that so I have a better picture. You can always reach out on gitter channel https://gitter.im/nextein/Lobby

from nextein.

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.