Questions tagged [remarkjs]

A JavaScript library that creates client-side HTML5 slideshows from Markdown source. Or an unrelated Markdown parser used by Gatsbyjs.

Remark.js (also on GitHub) is a JavaScript library that creates client-side slideshows from Markdown source.

Remark is also the name of a collection of libraries for working with Markdown. Despite the name and shared concepts, Remark.js is not built on Remark, the JavaScript library.

See also:

98 questions
25
votes
2 answers

Custom frontmatter variables with Markdown Remark in Gatsby.js

I am building a website using Gatsbyjs and NetlifyCMS. I've started using this starter https://github.com/AustinGreen/gatsby-starter-netlify-cms, and I am trying to customise it now. I want to use custom variables in the frontmatter of a markdown…
Robert Wolf
  • 1,312
  • 13
  • 18
18
votes
2 answers

Incremental slides do not work with a two-column layout

I am using the xaringan package for r for a presentation: https://cran.r-project.org/web/packages/xaringan/index.html which builds upon the remark.js library. I would like to use a two column layout, i.e. something like this from the original…
Woosah
  • 422
  • 5
  • 10
15
votes
2 answers

Gatsby and Graphql - How to filter allMarkdownRemark by folder

I'm using Gatsby and MarkdownRemark. I want to query the markdown files and then filter them down to the files contained within a sub-directory. My folder structure looks like this: - src - pages -index.md -about.md - team -…
PAT-O-MATION
  • 1,907
  • 1
  • 20
  • 20
13
votes
1 answer

What's the Difference between Remark & Rehype?

I'm a bit confused. I think remark is a markdown processor, rehype is an html processor. So remark takes some markdown, transforms it, and gives me back some markdown. Rehype takes some html, transforms it, and gives me back some html - is this…
antonwilhelm
  • 5,768
  • 4
  • 19
  • 45
13
votes
1 answer

Print xaringan slides with presenter notes

Is it possible to print xaringan slides with the presenter notes? I know I can print the slides using these methods (https://github.com/yihui/xaringan/wiki/Export-Slides-to-PDF). But I can't get a print out with the presenter notes. Thanks!
Daniel D. Sjoberg
  • 8,820
  • 2
  • 12
  • 28
10
votes
1 answer

Include markdown file contents in HTML for remark.js

Is there a (preferably light-weight way) to include the raw contents of a markdown file in HTML? I'm using remark.js to create a slideshow and I'd like to keep the markdown file separate from the HTML, so that the HTML is very simple (and does not…
Ian
  • 1,294
  • 3
  • 17
  • 39
9
votes
1 answer

How to get AST tree from markdown via remark

using code like this: var remarkAbstract = require("remark"); var remark = remarkAbstract(); let remark = remarkAbstract(); var ast = remark.process(input); but it returns output like: AssertionError: VFile { contents: '# header\n\n20 December…
8
votes
1 answer

How to change Markdown link relative path as preprocessing of gatsby-transformer-remark

I am developping a static blog using Gatsby. It use gatsby-transformer-remark and gatsby-plugin-i18n plugin to support multiple languages. I am managing the articles in the GitHub repository as…
danmaq
  • 115
  • 1
  • 9
6
votes
2 answers

Can't require remark and rehype plugins for gatsby-plugin-mdx

I was trying to follow the documentation on including rehype plugins for gatsby-plugin-mdx. Specifically I was trying to use the rehype-slug plugin. I installed the packaged with npm and set my gatsby.config.js file to module.exports = { …
bitesizebo
  • 163
  • 1
  • 5
6
votes
1 answer

How to configure remark.js to parse HTML embedded in Markdown?

I am using remark to get an AST for a Markdown document that includes HTML tags. When I run this: const remark = require('remark') const result = remark.parse('

First

') console.log(JSON.stringify(result, null, 2)) I get an AST that includes…
Greg Wilson
  • 1,015
  • 10
  • 24
5
votes
0 answers

code chunk following verbatim inline code breaks slide separator

In a xaringan presentation I want to show how to put R Code in an R Markdown document. Which leads me to the dangerous waters of verbatim R Markdown in an xaringan (R Markdown) document. Displaying verbatim inline code works as long as there is no R…
rnuske
  • 83
  • 7
5
votes
3 answers

Vertical scrollbar for long functions with knitr slides

Is it possible to make vertical scrollbar for long functions with knitr slides (using xaringan custom style)? I was trying some options based on this previous question How to make vertical scrollbar appear in RMarkdown code chunks (html view) but no…
user1157485
4
votes
2 answers

How to access the frontmatter using remark-frontmatter?

I am trying to use the remarkjs ecosystem to parse a file containing markdown and frontmatter, and turn it into HTML. The file could look something like this: --- title: Title --- # This is a heading I managed to parse the markdown, which can be…
muell
  • 383
  • 1
  • 15
4
votes
1 answer

How to import remark-gfm in next.config.js?

I want to use MDX in next.js and remark-gfm plugin. I found Next.js Docs about MDX and follow this. and add import statement. // next.config.js import remarkGfm from 'remark-gfm;' const withMDX = require('@next/mdx')({ extension: /\.mdx?$/, …
baba1
  • 49
  • 3
4
votes
0 answers

Add a banner at the bottom of xaringan slide

I am trying to add a banner at the bottom of the xaringan slide with xaringanextra. The banner is to put in the organisation name. What's the best way to do this?
codedancer
  • 1,504
  • 9
  • 20
1
2 3 4 5 6 7