gnab / remark

A simple, in-browser, markdown-driven slideshow tool.
http://remarkjs.com
MIT License
12.68k stars 856 forks source link

Relative anchor links in a markdown file should jump to the matching slide #643

Open johnbeech opened 3 years ago

johnbeech commented 3 years ago

Summary

I'd like relative anchor links in a markdown file to jump to the matching slide. I think this could be achieved by having remark to auto-generate default name: page-name properties using the headings on a slide.

Context

When Github renders content; the headings are given anchors, e.g.:

---

## Channel Overview

Becomes an anchor:

<hr />
<h2><a id="channel-overview">Channel Overview</a></h2>

And so... it makes sense to link to a heading within markdown:

Topics:
- [Channel Overview](#channel-overview)

To make this slide linking work with remark; you need to add:

---

name: channel-overview

## Channel Overview

Which is requires lots of typing and repetition - this could be more automated and less prone to human error!

Suggestion

Acceptance Criteria