The content #{} runs as standard JS, so you can pass helper functions for use with such things. You did not specify, but assuming that you are using Jade with Express, you can do something like this:
app.locals.ucfirst = function(value){ return value.charAt(0).toUpperCase() + value.slice(1); };
A function named ucfirst will be exposed in the Jade template. You can also pass it as part of the locals with every render, but if you use Express, it will do it automatically.
source share