Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support stable anchor links in bespoke template #518

Merged
merged 5 commits into from
Apr 16, 2023

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Apr 16, 2023

bespoke template has become to support links for the stable anchor that has assigned to the element in the slide content. (e.g. Slugified Markdown headings, supported by Marp Core v3.6.0)

By this PR, users can jump to the slide page based on contents even if not used a link to the page number such as [](#3).

Slugs

# Title

[Jump to Hello](#hello)

---

## Contents

- ...
- ...

---

## Hello

Example

In general Markdown document, a link of "Jump to Hello" can actually jump to "Hello" heading. By the change in this PR, the HTML with bespoke template also can jump to the slide page 3.

Named anchor (with --html option)

[Jump to closing slide](#closing-slide)

---

...

---

<a name="closing-slide"></a>

Thanks!

bespoke template also supports the anchor defined through <a name="..."></a>. It's useful when there is not any Markdown headings in the slide.

Stable anchor in fragmented lists

[Show up to "Item 2"](#item-2)

* ### Item 1
* ### Item 2
* ### Item 3

It may be a rare case, but bespoke template can handle the stable anchor within the fragmented list too.

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant