문제

I am building a blog with jekyll. I would like to insert a link next each heading on the page but I have no easy way to modify the output HTML. Is there an alternative to is

<h1 is="x-link"></h1>

which doesn't require extra markup and allows me to target all h* elements?

도움이 되었습니까?

해결책

This is unrelated to Polymer.

On polymer-project.org we add anchor links to all headings. It's done client-side and the page has control whether or not it displays them using add_permalinks variable.

See:

It's also worth noting the Kramdown markdown engine has support for inline attributes on block elements. So you can do something like this:

# Heading
{:is="x-link"}

I might switch things over now that I know that works. Good idea :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top