New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

express-title

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-title

middleware for title tags

  • 0.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 30 Aug 2014

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc