I\'m trying to change my websites name. Can\'t find where I can set title or app name.
You can create any file in config/
directory, for example config/app.js
which contains comething like this:
module.exports = {
appName : 'My App'
};
Any property of exported object become an option of Sails` config.
appName
property is used as application title. For example, in default layout:
<title><%- title %></title>
where title
=== sails.config.appName
=== 'My App'
By default appName
config variable is set to 'Sails'.
To customise your app's name simply add the following to the module.exports = { … }
block in the file config/local.js
appName : 'My Brilliant App',
You can also override the page's title within your controller by passing in your own title
value to the view
renderer.
res.view({title: 'My brilliant title'});
and, to be SEO friendly, in your jade
template specify
head
title= sails.config.appName + " | " + title
I've got a good answer at the sails github issues#768.
Adding app name at the app.js and bootstrap.js file works fine for me.
As of Sails 1.2.2, you may change the app name in \views\layouts\layout.ejs
on line 4: <title>Your App Name</title>
.