https://github.com/theme-next/hexo-front-matter-include
Include some front-matter from config or data file.
https://github.com/theme-next/hexo-front-matter-include
Last synced: 10 months ago
JSON representation
Include some front-matter from config or data file.
- Host: GitHub
- URL: https://github.com/theme-next/hexo-front-matter-include
- Owner: theme-next
- License: lgpl-3.0
- Created: 2019-10-11T16:31:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-11T16:39:11.000Z (over 6 years ago)
- Last Synced: 2025-08-08T18:22:02.706Z (11 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= hexo-front-matter-include
NexT team;
:lib: hexo-front-matter-include
:repo: theme-next/hexo-front-matter-include
image:https://img.shields.io/npm/v/{lib}?style=flat-square[npm]
image:https://img.shields.io/github/package-json/v/{repo}?style=flat-square[version]
== Install
[source,bash,subs="verbatim,attributes"]
----
# use npm tool
npm i {repo}
# or use yarn
yarn add {repo}
----
== Use
You defined one or more keys that you want to include from `config` or `data` file.
In your post file front-matter use `include`:
[source,yaml]
----
---
title: Some Word...
include: post_overview
# include: [post_overview, post_webfront, ....]
---
----
And you should config your keys in `config` file. Like:
[source,yaml]
----
post_overview:
categories: [overview]
tags: [overview]
comments: false
toc_number: false
...
----
Or write in `post_overview` data file (`source/_data/post_overview.yml`).
[source,yaml]
----
categories: [overview]
tags: [overview]
comments: false
toc_number: false
...
----