Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Latest commit

 

History

History
executable file
·
49 lines (31 loc) · 1.04 KB

Readme.md

File metadata and controls

executable file
·
49 lines (31 loc) · 1.04 KB

I no longer use this project and do not maintain the code.

Build Status

metalsmith-title

A Metalsmith plugin that automatically add page title from first heading in processed file

This clone of metalsmith-title adds an option to remove title after detecting it and setting it as metadata. Useful when you want to use markdown documents verbatim, but have special treatments for titles in your templates, such as putting them inside of

tags.

Installation

$ npm install metalsmith-title

Usage

var date = require('metalsmith-title');

metalsmith.use(title());

That will add title to all

	<title>{{ title }}</title>
var date = require('metalsmith-title');

metalsmith.use(title({ remove: true }));

CLI Usage

Install via npm and then add the metalsmith-title key to your metalsmith.json:

{
  "plugins": {
    "metalsmith-title": true
  }
}

License

MIT