1.0.0 • Published 8 years ago
metalsmith-static-related v1.0.0
metalsmith-related
A Metalsmith plugin for static related post.
setup
Metalsmith is pluggable static site generator. All of the logic in Metalsmith is handled by plugins.
metalsmith-related
is a metalsmith plugin that allows to create static related posts.
npm i -s metalsmith-related
demo
Take a look at the file build-related.js to have a demo of the correct usage.
The results are available under sample/dist-related
folder.
how to define two posts as related?
file1.md
---
postId: 1
title: foobar
related [2, 3]
---
Content of the post
In this case this post has two related posts, whose ids are: 2
, and 3
.
options
metalsmith-related
accepts the following settings:
matchOn
---
The name of the property based on which two posts are considered related
1.0.0
8 years ago