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.

Add support for Markdown in HTML pages

See original GitHub issue

What

Add a Markdown renderer to the kit dependencies.

Configure the prototype kit server to render all page HTML in the user’s prototype with the Markdown renderer after it has been rendered with Nunjucks.

Configure the Markdown renderer so that by default the output HTML has GOV.UK Frontend classes, but leave the option open of the user changing this.

Why

See #46 for details. This has been a hotly requested feature for ages.

Who needs to work on this

Developer

Who needs to review this

Developer, Designer, Tech Lead

Done when

  • Prototype authors can opt-in to using Markdown in their prototype
  • Prototype authors can use Markdown syntax in any part of any .html file in app/views
  • HTML rendered by Markdown has GOV.UK Frontend styles by default
  • Users can opt-out of GOV.UK Frontend styles for Markdown if they wish

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
nataliecareycommented, Dec 19, 2022

To clarify - settings right now can be changed in config.json, that’s good enough for this ticket. I’ll create another ticket for the settings page. At the moment I’m thinking it would be good to release them together if we can but this piece of work doesn’t rely on the settings page, just the setting in config.json.

0reactions
joelanmancommented, Dec 20, 2022

Thanks! It’s not a strong opinion but I’m just wondering if one benefit is making it easier for our users to understand the code they’re seeing. A tag would say explicitly ‘this is markdown’, in the same way curly braces say ‘this is nunjucks’

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Render Markdown on a Web Page With md-block
Using a simple library, you can host embedded Markdown in your web pages and have it converted to proper HTML on the fly....
Read more >
Is There a Way to Include Markdown in HTML/Websites?
I've tried using Strapdown but it only supports certain bootstrap themes and I would like to use my own HTML around the markdown...
Read more >
Getting Started | Markdown Guide
You can add Markdown formatting elements to a plaintext file using a text editor application. Or you can use one of the many...
Read more >
How to use Markdown in web development - Creative Bloq
In HTML, an image is added using the <img> tag and links are added using the <a> tag. In Markdown, images start with...
Read more >
Adding Markdown Pages - Gatsby
Gatsby can use markdown files to create pages in your site. You add plugins to read and understand folders with markdown files and...
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