Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
node.js jade-如何在jade中设置内容类型_Node.js_Pug - Fatal编程技术网

node.js jade-如何在jade中设置内容类型

node.js jade-如何在jade中设置内容类型,node.js,pug,Node.js,Pug,我有一个视图,其中返回的MIME类型不同。如何设置标题部分中的内容类型 这就是我要做的 !!! html head title #{site.title} - #{site.version} link(rel='stylesheet', href='/stylesheets/style.css') script(type='text/javascript', src='/javascripts/jquery-1.5.1.min.js') content-typ

我有一个视图,其中返回的MIME类型不同。如何设置标题部分中的内容类型

这就是我要做的

!!!
html
  head
    title #{site.title} - #{site.version}
    link(rel='stylesheet', href='/stylesheets/style.css')
    script(type='text/javascript', src='/javascripts/jquery-1.5.1.min.js')
    content-type #{mimetype}
  body!= body
您可以指定类似的选项,如下所示:


请记住,内容类型的标记是
OP询问的是mime内容类型,而不是SEO关键字。@broofa请再次阅读该问题。他在问如何设置标签。。。是的,我抓住了错误的特定部分,我只是使用了我手中的第一个示例。我想我完全误解了他所说的“如何设置内容类型”;)@为了公平起见,我在阅读这个问题时的第一个想法是“转到控制器,将其设置在标题上”,但随后我看到他试图通过给出的示例将其内联到哪里;)
meta(http-equiv="content-type", content="#{contentType}; charset=UTF-8")