Socket
Socket
Sign inDemoInstall

express-title

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    express-title

middleware for title tags


Version published
Weekly downloads
8
decreased by-33.33%
Maintainers
1
Install size
3.67 kB
Created
Weekly downloads
 

Readme

Source

express-title

NPM Version NPM Downloads Node.js Version Build Status Coverage Status

Fill in your <title> tags via middleware.

Add it as middleware:

app.use(require('express-title')());

Set a base title:

app.set('title', 'Epic Website');

Add page titles:

app.get(function(req, res, next) {
  res
    .title('What an awesome title?!')
    .render('template');
});

Add title to your view:

doctype html
html(lang='en')

  head
    title= title
  body
    //- ...

Now you've got beautifully dynamic page titles:

  <title>What an awesome title?! · Epic Website</title>

Bonus: use a custom formatter:

app.use(title('%base% - %title%'));

Installation

$ npm install express-title
var title = require('express-title');
// ...
var app = express();
// ...
app.use(title())

MIT Licensed

Keywords

FAQs

Last updated on 30 Aug 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc