Giter VIP home page Giter VIP logo

hexo-filter-titlebased-link's Introduction

hexo-filter-titlebased-link

Transfer wiki links (based on the title) in Markdown files to permalink.

将基于标题的双向链接转换为 Hexo 设定的永久链接。

This plugin makes you easy to use wiki links (its form may be [[Title]] or [[Title|Alias]]) in Hexo. It would be more useful when you use Obsidian to manage your blogs.

Note

  • Make sure that no more than one vertical bar (|) in a wiki link.
  • If one vertical bar included, Alias should not be empty.
  • In addition, the title of all your articles should be unique.

Installation

npm install hexo-filter-titlebased-link --save

Usage

Hexo sets every post a Permalinks, which can be configured in the _config.yml.

Here is an example:

# in _config.yml
permalink: p/:year/:month/:day/:hour/:minute/:second/

Assume that you have a post named my_post_1 whose permalink is p/2024/04/12/14/18/50/. In another post named my_post_2, you wrote a wiki link to my_post_1:

This is my_post_2, 

you can see my last post by clicking this link: [[my_post_1]],

or [[my_post_1|this link]].

After rendering by Hexo, the result html file of my_post_2.md will be:

<p>This is my_post_2, </p>
<p>you can see my last post by clicking this link: <a href="/p/2024/04/12/14/18/50/">my_post_1</a>,</p>
<p>or <a href="/p/2024/04/12/14/18/50/">this link</a>.</p>

Related Hexo Plugins

  • hexo-filter-link-post: Transfer relative post link in markdown file to post link. 将文件里的通过相对路径引用的 markdown 文件转为对应的文章的链接。
  • hexo-abbrlink: Create one and only link for every post for hexo. 为每一篇 Hexo 文章创建独一无二的永久链接。

License

MIT

hexo-filter-titlebased-link's People

Contributors

uuanqin avatar

Stargazers

Jasper Hale avatar th avatar

Watchers

 avatar

Forkers

jasper-1024

hexo-filter-titlebased-link's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.