hexo-tag-include

0.0.1 • Public • Published

hexo-tag-include

Downloads npm LICENSE

Include another post or page to a post or page as wiki does.

Installation

npm install hexo-tag-include

Syntax

Include a post

{% include_post slug '{options...}' %}

Include a page

{% include_page slug '{options...}' %}

Options

Option Description Default
title_level Title tag name. h1~h6 h2
title Provide a custom title.
hide_title Whether to hide title. false
escape_title Whether to escape title. true
title_link none for remove link.
expert Include expert instead of the full content. false
class_name Provide class names.
merge_tags Merge tags. false
hide_content Whether to hide content(include expert). false
collapse_content Collapse content panel. false

Example

{% include_post sub-post %}

{% include_page common-page '{"hide_title": true, "title_link": "none", "expert": false}' %}

{% include_page slug '{"hide_title": true, "title_link": "none", "expert": true, "title": "custom title", "title_level": "h3", "class_name": "classname"}' %}

Demo

TBD

TODO

  • [ ] fix circular reference error.
  • [ ] re-render when the included post was updated.
  • [ ] test cases.
  • [ ] merge tags.

Similar Include Plugins

License

Copyright (c) 2019 dailylist. Licensed under the MIT license.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    0

Package Sidebar

Install

npm i hexo-tag-include

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

7.75 kB

Total Files

4

Last publish

Collaborators

  • shenmark