Comments (4)
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.
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.
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.
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)
- Research on how to do fast-refresh for posts update.
- Remove example repo link from readme
- Document new plugin system in README.
- Automate npm publish with GH actions.
- Review NextJS Static Exporters.
- [v3-beta] Adding new posts breaks nextein/link
- TypeError: Cannot read property 'pageProps' of undefined HOT 2
- [npm run dev] cannot find module webpack HOT 2
- Position data being removed HOT 2
- Make default `page` configurable. HOT 1
- "nextein build" not working on Windows with Next11, Webpack5 & Nextein3 HOT 3
- Error when clicking on a link to a post when production build is redeployed
- Add deprecation notice in v3.3 for changes in v4
- Update README HOT 1
- Update DESIGN doc
- no such file or directory, open '.next/nextein_ipc.cache' HOT 7
- warning with next v12 assetPrefix
- Upgrade unified dependencies
- Remove taskr HOT 1
- next warning on nextein prop in configuration.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextein.