New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hexo-tag-post-link

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-tag-post-link

A hexo tag plugin for inserting post link in your post.

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

hexo-tag-post-link

npm version

A hexo tag plugin for inserting post link in your posts with your own format.

Installation

$ npm install hexo-tag-post-link --save

Usage

  1. Create "_data" folder under "source" folder, if you don't have it.

  2. Create "post_link.yml" in your "source/_data" folder

  3. Add your own post link format in ymal

    name: format
    

    Example

    header: <b>The link to this post: </b><a href="<%= post_permalink %>" target="_blank"><%= post_title %></a>
    
  4. Add post link tag to wherever you like in your post

    {% post_link <name> %}
    

    Example:

    {% post_link header %}
    

Adding post link to all posts

hexo-tag-post-link supports adding post link to all posts by setting the _config.yml file:

post_link:
  insert_before_post: <template_name>
  insert_after_post: <template_name>

Let's say we have template header and footer defined in our postlink.yml data file. Then we could use the following configuration to add them to all posts.

post_link:
  insert_before_post: header
  insert_after_post: footer

Adding post link to posts in certain category or with certain tag

hexo-tag-post-link also supports per type configurations in _config.yml file. For example:

post_link:
  per_type_configs:
    - type: category
      name: "category-name"
      insert_before_post: "header-for-category"
      insert_after_post: "footer-for-catefory"
    - type: tag
      name: "tag-name"
      insert_before_post: "header-for-tag"
      insert_after_post: "header-for-tag"

Disable global post link for certain post

Just add disable_global_post_link: true in the front matter.

---
title: title
categories:
  - category-name
tags:
  - tag-name
disable_global_post_link: true
---

Supported Variables:

  • site_title
  • site_subtitle
  • site_description
  • site_author
  • site_url
  • post_title
  • post_slug
  • post_created
  • post_created_date
  • post_created_time
  • post_updated
  • post_updated_date
  • post_updated_time
  • post_relative_url
  • post_permalink

License

BSD v3

Keywords

FAQs

Package last updated on 03 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc