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

Automatically add a title from processed file – This plugin is up for adoption

License

Notifications You must be signed in to change notification settings

mayo/metalsmith-title

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Automatically add a title from processed file – This plugin is up for adoption

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published