How to add custom string to "title = title" in jade?

I am currently introducing myself to jade with node.js

As I want to avoid redundancy, I thought about adding a domain name to the currect header, for example. Blog | example.com

My Jade template gets Blogthrough node.js router how title. Now I want to add | example.comto the header, but I do not know how to do this when my template looks like this:

!!! 5
html(lang="de")
  head
    meta(charset="utf-8")
    title= title

How do I change the last line to add text?

I hope my question is clear enough.

+3
source share
1 answer

Below I worked for me.

!!! 5
html(lang="de")
  head
    meta(charset="utf-8")
    title= title + " example.com"

If you want to use it in a body with h1 and p tags, use this:

body
  h1 #{title} example.com
  p #{title} example.com
+5
source

All Articles