question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it possible to load mdx from memory instead of file system?

See original GitHub issue

Goal

The end-goal would be to define customer-specific pages and complex layouts, all stored on the DB, and allow a much higher level of customisation, from a customer perspective. (based on existing set of React components they could use and that’d be at their disposal)

I’d love the ability to load content stored in a DB, with some records containing markdown, and I would like to know if that’s possible to load such content as MDX.

Basically, it’s what’s possible already, except it doesn’t load the content from the filesystem.

This would allow advanced use case of content customisation, with the awesome ability to use complex JSX components at runtime.

An example:

DB record product.description, as long text (or similar):

# Product title

Some description

<Subscribe />

Subscribe is a JSX component that could be made available through the MDXProvider (or another way?).

This would grant an ability that’s not achievable even by using supposedly more powerful HTML.

Use case:

  • Customer who wants to have access to powerful components/integrations while still writing “just” markdown

Problem

A file-based approach is too limiting for such things, it’s not as flexible.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
acauacommented, Nov 25, 2020

@Vadorequest I think this is what you are looking for:

https://github.com/hashicorp/next-mdx-remote

0reactions
Vadorequestcommented, Jul 31, 2020

@johno I tried with MDX but really didn’t go far. I just didn’t get it.

Using https://github.com/probablyup/markdown-to-jsx, I got it working super fast, and eventually left behind MDX in favor of https://github.com/probablyup/markdown-to-jsx.

So, if your goal is to increase the adoption of that particular feature, I suggest you make it easier to get started with, use examples and such. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to handle the following? · Issue #126 · mdx-js/mdx - GitHub
We use react-markdown currently, and moving to MDX with Next would be ... Is it possible to load mdx from memory instead of...
Read more >
Comparison of MDX integration strategies with Next.js
Finally, all the MDX must be from MDX files within the project: you can't render MDX that is stored in a database. Hashicorp's...
Read more >
Part 5: Transform Data to Use MDX - Gatsby
Frontmatter is additional metadata about your file. It won't be rendered on your page, but it's a way for you to add some...
Read more >
Multidimensional Expressions (MDX) Reference - SQL Server
Learn about key multidimensional concepts and terms so you can use MDX to query multidimensional data or create MDX expressions within a cube....
Read more >
Aggregate Storage and MDX Outline Formulas
Calculator MDX Remarks/Examples @ABS Abs Calculator @ABS(Actual‑Budget). MDX Abs(‑) @ATTRIBUTE Attribute Calculator @ATTRIBUTE(Can). MDX Attribute() @CORRELATION Not supported in MDX..
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found