真棒字体未在Google App Engine中显示 [英] Font-awesome not show in Google App Engine

查看:85
本文介绍了真棒字体未在Google App Engine中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用超棒的整个应用程序引擎时遇到问题.

I have a problem in using font-awesome entire app engine.

通过Google Chrome开发者控制台,我发现了以下错误:

by Google Chrome Developer Console I found the following errors:

资源解释为字体,但以MIME类型text/html传输:"

Resource interpreted as Font but Transferred with MIME type text / html: "http://localhost:8080/wp-content/plugins/js_composer/assets/lib/font-awesome/fonts/fontawesome-webfont.woff/?v=4.2.0". Resource interpreted as Font but Transferred with MIME type text / html: "http://localhost:8080/wp-content/plugins/js_composer/assets/lib/font-awesome/fonts/fontawesome-webfont.ttf/?v=4.2.0".

我的文件app.yaml wordpress如下:

My files app.yaml wordpress is as follows:

application: app-001
version: app-001
Runtime: php
api_version: 1

inbound_services:
- Warmup

handlers:
- Url: /(.*\.(htm$|html$|css$|js$))
  static_files: wordpress / \ 1
  upload: wordpress /.* \. ($ htm | html $ | $ css | js $)
  application_readable: true

- Url: /wp-content/(.*\.(ico$|jpg$|png$|gif$))
  static_files: wordpress / wp-content / \ 1
  upload: wordpress / wp-content /.* \. (ico $ | $ jpg | png $ | gif $)
  application_readable: true

- Url: /(.*\.(ico$|jpg$|png$|gif$))
  static_files: wordpress / \ 1
  upload: wordpress /.* \. (ico $ | $ jpg | png $ | gif $)

- Url: /wp-admin/(.+)
  script: wordpress / wp-admin / \ 1
  secure: always

- Url: / wp-admin /
  script: wordpress / wp-admin / index.php
  secure: always

- Url: /wp-login.php
  script: wordpress / wp-login.php
  secure: always

- Url: /wp-cron.php
  script: wordpress / wp-cron.php
  login: admin

- Url: /xmlrpc.php
  script: wordpress / xmlrpc.php

- Url: /wp-(.+).php
  script: wordpress / wp- \ 1.php

- Url: /(.+)?/?
  script: wordpress / index.php

- Url: /(.*\.otf)
  static_files: wordpress / wp-includes / fonts / \ 1
  upload: wordpress / wp-includes / fonts / (. * \. otf)
  mime_type: application / x-font-otf
  
- Url: /wp-content/(.*\.ttf)$
  static_files: wordpress / wp-content / \ 1
  upload: wordpress / wp-content /.* \. $ ttf
  mime_type: application / x-font-ttf

- Url: /wp-content/(.*\.otf)$
  static_files: wordpress / wp-content / \ 1
  upload: wordpress / wp-content /.* \. otf $
  mime_type: application / x-font-otf

- Url: /wp-content/(.*\.woff)$
  static_files: wordpress / wp-content / \ 1
  upload: wordpress / wp-content /.* \. $ WOFF
  mime_type: application / x-font-WOFF

请帮助我解决问题. 非常感谢

Please help me to solve the problem. Thank you very much

推荐答案

我已解决了将其插入到app.yaml文件中的问题

I fix the problem with insert this in file app.yaml

handlers:

    - url: /(.*\.woff)
      static_files: wordpress/\1
      upload: wordpress/(.*\.woff)
      mime_type: application/font-woff

    - url: /(.*\.svg)
      static_files: wordpress/\1
      upload: wordpress/(.*\.svg)
      mime_type: image/svg+xml

    - url: /(.*\.eot)
      static_files: wordpress/\1
      upload: wordpress/(.*\.eot)
      mime_type: application/vnd.ms-fontobject

    - url: /(.*\.ttf)
      static_files: wordpress/\1
      upload: wordpress/(.*\.ttf)
      mime_type: application/x-font-ttf

    - url: /(.*\.otf)
      static_files: wordpress/\1
      upload: wordpress/(.*\.otf)
      mime_type: application/x-font-otf

这篇关于真棒字体未在Google App Engine中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆