“ og:title”,其中多个标题由管道隔开

时间:2019-04-05 13:29:45

标签: html angular meta-tags open-graph-protocol rdfa

我有一个HTML页面,其中添加了og: title标签,但是现在我需要添加多个由管道分隔的标题。

如何在og: title中设置多个标题,如下所示?

  

|首页|免费SEO服务| SEO |我的SEO

我可以将其添加为单个字符串,例如:

{property: 'og:title', content: "|HOME |Free SEO Service | SEO |My SEO "},

还是我需要添加多个og: title标签,如下所示:

 {property: 'og:title', content: "|HOME"},
    {property: 'og:title', content: "|Free SEO Service"},
 
export class SEOService { 
       constructor(private meta: Meta) {
           meta.addTags([
              {name: 'description', content: 'Title and Meta tags examples'},   
              {name: 'viewport', content: 'width=device-width, initial-scale=1'},   
              {name: 'robots', content: 'INDEX, FOLLOW'},
              {name: 'author', content: 'ABCD'},
              {name: 'keywords', content: 'TypeScript, Angular'},
              {name: 'date', content: '2018-06-02', scheme: 'YYYY-MM-DD'},
              {httpEquiv: 'Content-Type', content: 'text/html'},
              {property: 'og:title', content: "My Text"},
              {property: 'og:type', content: "website"},
              {charset: 'UTF-8'}
           ]);       
       }
    } 

0 个答案:

没有答案