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.

Dynamic markdown content?

See original GitHub issue

It will be nice if markdown content could be dynamic

const firstName = 'John'
const lastName = 'Dow'
const address = 'address'

# Hello {firstName} {lastName}

## My address is {address}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
johnocommented, Feb 6, 2019

Dynamic markdown is accessible as soon as a JSX block is opened. This includes inline JSX blocks, so you can do the following.

export const firstName = 'John'
export const lastName = 'Dow'
export const address = 'address'

# Hello <span children={firstName} /> <span children={lastName} />

<div>My address is {address}</div>

You can also access props

<pre>{JSON.stringify(props, null, 2)}</pre>

Eventually there will also be React.Fragment shorthands (currently under development):

# Hello, <>{props.name}</>
1reaction
Nebuliscommented, Mar 12, 2020

@karlhorky yes it works by using "prettier": "prettier/prettier", will just wait for the new release to come out so.

Thanks for pointing this out 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic content for GitHub markdown pages - CodeX Team
Dynamic content for GitHub markdown pages ... You can generate svg-images with any data on your server for every page's reload. Useful for...
Read more >
Workflow Notifications - Markdown & Dynamic Content
Markdown is a simple markup language you can use to easily add formatting, links, and images to a Workflow Notification. It can also...
Read more >
Add a Dynamic Table of Contents to Your Markdown ...
Manually maintaining a table of contents in markdown documents can be a lot of work. By combining remark-toc and remark-slug you can ensure ......
Read more >
MarkBind - Generate More Dynamic Websites from Markdown ...
Dynamic content. MarkBind source files can be as simple as basic Markdown, but you can also use a mix of several popular syntax...
Read more >
Render Markdown - Dynamic Routes | Learn Next.js
To render markdown content, we'll use the remark library. First, let's install it: npm install remark remark-html. Then, open lib/posts.js and add the ......
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