goblindegook/fragmentions

Fragmentions 允许在WordPress网站上使用单词或短语链接到文档部分。

安装: 14

依赖: 0

建议: 0

安全: 0

星星: 0

观察者: 1

分支: 0

开放问题: 0

语言:JavaScript

类型:wordpress-plugin

1.4.0 2016-02-14 02:35 UTC

This package is not auto-updated.

Last update: 2024-09-24 04:20:11 UTC


README

Fragmentions 允许在WordPress网站上使用单词或短语链接到文档部分。

Fragmentions 是由 Kevin Marks 在 2014 年的一篇博客文章中提出的,作为使用片段进行超链接的更好替代方案。Fragmentions 使用 ## 来匹配文档中的单词或短语。

在以下示例中,点击 "TL;DR" 将跳转到包含 "Life, Liberty and the pursuit of Happiness" 的 <strong> 元素。

<article>
    <p>
        <a href="##pursuit">TL;DR</a>
    </p>

    <p>
        When in the Course of human events, it becomes necessary for one people 
        to dissolve the political bands which have connected them with another, 
        and to assume among the powers of the earth, the separate and equal 
        station to which the Laws of Nature and of Nature’s God entitle them, a 
        decent respect to the opinions of mankind requires that they should 
        declare the causes which impel them to the separation.
    </p>

    <p>
        We hold these truths to be self-evident, that all men are created 
        equal, that they are endowed by their Creator with certain unalienable 
        Rights, that among these are <strong>Life, Liberty and the pursuit of 
        Happiness</strong>.
    </p>
</article>

此插件依赖于Jonathan NealFragmentions 脚本