项目作者: Creatiwity

项目描述 :
Favicon Gatsby plugin
高级语言: JavaScript
项目地址: git://github.com/Creatiwity/gatsby-plugin-favicon.git
创建时间: 2017-08-08T14:34:11Z
项目社区:https://github.com/Creatiwity/gatsby-plugin-favicon

开源协议:MIT License

下载


gatsby-plugin-favicon

Generates all favicons for Web, Android, iOS, …

Install

yarn add gatsby-plugin-favicon

or

npm install --save gatsby-plugin-favicon

How to use

  1. Include the plugin in your gatsby-config.js file.
  2. Add a favicon.png file in your src folder. The recommended size for the
    file is: 1500x1500px.
  1. // in gatsby-config.js
  2. plugins: [
  3. `gatsby-plugin-favicon`
  4. ];

Options

Here is a full list of options with their default values you can use to configure this plugin.

  1. // in gatsby-config.js
  2. plugins: [
  3. {
  4. resolve: `gatsby-plugin-favicon`,
  5. options: {
  6. logo: "./src/favicon.png",
  7. // WebApp Manifest Configuration
  8. appName: null, // Inferred with your package.json
  9. appDescription: null,
  10. developerName: null,
  11. developerURL: null,
  12. dir: 'auto',
  13. lang: 'en-US',
  14. background: '#fff',
  15. theme_color: '#fff',
  16. display: 'standalone',
  17. orientation: 'any',
  18. start_url: '/?homescreen=1',
  19. version: '1.0',
  20. icons: {
  21. android: true,
  22. appleIcon: true,
  23. appleStartup: true,
  24. coast: false,
  25. favicons: true,
  26. firefox: true,
  27. yandex: false,
  28. windows: false
  29. }
  30. }
  31. }
  32. ];

Gatsby v1

Starting from v3, this plugin is not compatible anymore with Gatsby v1, you should stick to the version 2.1.1 of this plugin with Gatsby v1.