Where is title or app name for sails.js (using node.js and express.js)?

前端 未结 4 1347
无人共我
无人共我 2020-12-31 20:33

I\'m trying to change my websites name. Can\'t find where I can set title or app name.

4条回答
  •  猫巷女王i
    2020-12-31 21:16

    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
    

提交回复
热议问题