0.0.1 • Published 5 years ago

hexo-tag-include v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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

OptionDescriptionDefault
title_levelTitle tag name. h1~h6h2
titleProvide a custom title.
hide_titleWhether to hide title.false
escape_titleWhether to escape title.true
title_linknone for remove link.
expertInclude expert instead of the full content.false
class_nameProvide class names.
merge_tagsMerge tags.false
hide_contentWhether to hide content(include expert).false
collapse_contentCollapse 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.

0.0.1

5 years ago