jekyll-favicon 0.2.7 → 1.0.0.pre.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. checksums.yaml +5 -5
  2. data/.devcontainer/Dockerfile +22 -0
  3. data/.devcontainer/devcontainer.json +42 -0
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +10 -13
  5. data/.github/PULL_REQUEST_TEMPLATE.md +11 -9
  6. data/.github/workflows/gem-push.yml +40 -0
  7. data/.github/workflows/test.yml +38 -0
  8. data/.gitignore +4 -0
  9. data/.reek.yml +25 -0
  10. data/.vscode/launch.json +16 -0
  11. data/.vscode/settings.json +7 -0
  12. data/.vscode/tasks.json +15 -0
  13. data/CHANGELOG.md +38 -0
  14. data/Gemfile +3 -1
  15. data/README.md +77 -22
  16. data/Rakefile +9 -7
  17. data/bin/console +1 -0
  18. data/bin/debug +22 -0
  19. data/config/jekyll/favicon.yml +115 -0
  20. data/config/jekyll/favicon/static_file.yml +3 -0
  21. data/config/jekyll/favicon/static_file/convertible.yml +41 -0
  22. data/config/jekyll/favicon/static_file/mutable.yml +22 -0
  23. data/config/jekyll/favicon/static_file/referenceable.yml +15 -0
  24. data/config/jekyll/favicon/static_file/sourceable.yml +3 -0
  25. data/config/jekyll/favicon/static_file/taggable.yml +22 -0
  26. data/jekyll-favicon.gemspec +24 -24
  27. data/lib/jekyll-favicon.rb +7 -16
  28. data/lib/jekyll/favicon.rb +19 -16
  29. data/lib/jekyll/favicon/configuration.rb +73 -0
  30. data/lib/jekyll/favicon/configuration/defaults.rb +49 -0
  31. data/lib/jekyll/favicon/generator.rb +10 -84
  32. data/lib/jekyll/favicon/hooks.rb +12 -10
  33. data/lib/jekyll/favicon/static_data_file.rb +17 -0
  34. data/lib/jekyll/favicon/static_file.rb +97 -0
  35. data/lib/jekyll/favicon/static_file/convertible.rb +129 -0
  36. data/lib/jekyll/favicon/static_file/mutable.rb +81 -0
  37. data/lib/jekyll/favicon/static_file/referenceable.rb +22 -0
  38. data/lib/jekyll/favicon/static_file/sourceable.rb +73 -0
  39. data/lib/jekyll/favicon/static_file/taggable.rb +53 -0
  40. data/lib/jekyll/favicon/static_graphic_file.rb +21 -0
  41. data/lib/jekyll/favicon/tag.rb +14 -17
  42. data/lib/jekyll/favicon/utils.rb +48 -0
  43. data/lib/jekyll/favicon/utils/configuration/compact.rb +58 -0
  44. data/lib/jekyll/favicon/utils/configuration/merge.rb +70 -0
  45. data/lib/jekyll/favicon/utils/configuration/patch.rb +49 -0
  46. data/lib/jekyll/favicon/utils/convert.rb +39 -0
  47. data/lib/jekyll/favicon/utils/tag.rb +70 -0
  48. data/lib/jekyll/favicon/version.rb +3 -1
  49. metadata +69 -67
  50. data/.rubocop.yml +0 -5
  51. data/.ruby-version +0 -1
  52. data/.travis.yml +0 -21
  53. data/Gemfile.lock +0 -97
  54. data/lib/browserconfig.rb +0 -54
  55. data/lib/hash.rb +0 -12
  56. data/lib/image.rb +0 -33
  57. data/lib/jekyll/favicon/config/defaults.yml +0 -54
  58. data/lib/jekyll/favicon/icon.rb +0 -73
  59. data/lib/jekyll/favicon/metadata.rb +0 -12
  60. data/lib/jekyll/favicon/templates/chrome.html.erb +0 -5
  61. data/lib/jekyll/favicon/templates/classic.html.erb +0 -8
  62. data/lib/jekyll/favicon/templates/ie.html.erb +0 -4
  63. data/lib/jekyll/favicon/templates/safari.html.erb +0 -8
  64. data/lib/string.rb +0 -14
  65. data/lib/webmanifest.rb +0 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 218508fbabc682014853065308c51db130593dfb
4
- data.tar.gz: 356462e4cfb0b8b6532613c0972fd11a8a4363b6
2
+ SHA256:
3
+ metadata.gz: 2143f5ca47523996edd21924f528455195a44924ce70ff0769bff1a1945c5e1d
4
+ data.tar.gz: b51d9acfbad24d42d244a0e2d0cf992eb2f1c3e22742228887a1da08893d1444
5
5
  SHA512:
6
- metadata.gz: 44505c0684395214fb9ba940ef4a033b53aaf3419c9ff99f2d25be7119eea6755fd9e0fa815137c34c99fab6deee361af0a4c9f28b018b358fc2576d94c727a0
7
- data.tar.gz: 2dea6475eabf7a4e44efed4f56ed1c25063aa723997fe4acf39c50b5141b40843dc9e7ffcae808a5802e260ac3747d84056506fec4efd3967e494d8a9caae193
6
+ metadata.gz: eeb8f081b15aba2072554ced2a44838b59405aa6e4c1cd56e4cb605bf98eda5a27cd54c78d2ebeaebdb4f8bd03b18da10558f76a2a9c6c37b88a31faf309a820
7
+ data.tar.gz: 0203d4422b676347b4d398735201dc38b238113176e8d8f80af8e86acee013d13bea905070d79e6154ece2dec095583b33b9e8fc8d26f3dad544ad589ffe9bc9
@@ -0,0 +1,22 @@
1
+ # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.162.0/containers/ruby/.devcontainer/base.Dockerfile
2
+
3
+ # [Choice] Ruby version: 3, 3.0, 2, 2.7, 2.6, 2.5
4
+ ARG VARIANT="3"
5
+ FROM mcr.microsoft.com/vscode/devcontainers/ruby:0-${VARIANT}
6
+
7
+ # [Option] Install Node.js
8
+ ARG INSTALL_NODE="true"
9
+ ARG NODE_VERSION="lts/*"
10
+ RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
11
+
12
+ # [Optional] Uncomment this section to install additional OS packages.
13
+ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
14
+ && apt-get -y install librsvg2-bin
15
+ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
16
+ && apt-get -y install imagemagick
17
+
18
+ # [Optional] Uncomment this line to install additional gems.
19
+ RUN gem install reek standard webrick
20
+
21
+ # [Optional] Uncomment this line to install global node packages.
22
+ # RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
@@ -0,0 +1,42 @@
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2
+ // https://github.com/microsoft/vscode-dev-containers/tree/v0.162.0/containers/ruby
3
+ {
4
+ "name": "Ruby",
5
+ "build": {
6
+ "dockerfile": "Dockerfile",
7
+ "args": {
8
+ // Update 'VARIANT' to pick a Ruby version: 3, 3.0, 2, 2.7, 2.6, 2.5
9
+ "VARIANT": "3",
10
+ // Options
11
+ "INSTALL_NODE": "false",
12
+ "NODE_VERSION": "lts/*"
13
+ }
14
+ },
15
+
16
+ // Set *default* container specific settings.json values on container create.
17
+ "settings": {
18
+ "terminal.integrated.profiles.linux": {
19
+ "zsh (login)": {
20
+ "path": "zsh",
21
+ "args": [
22
+ "-l"
23
+ ]
24
+ }
25
+ }
26
+ },
27
+
28
+ // Add the IDs of extensions you want installed when the container is created.
29
+ "extensions": [
30
+ "rebornix.Ruby"
31
+ ],
32
+
33
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
34
+ // "forwardPorts": [],
35
+
36
+ // Use 'postCreateCommand' to run commands after the container is created.
37
+ "postCreateCommand": "bundle install",
38
+
39
+ // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
40
+ "remoteUser": "vscode"
41
+
42
+ }
@@ -10,9 +10,9 @@ A clear and concise description of what the bug is.
10
10
  **To Reproduce**
11
11
  Steps to reproduce the behavior:
12
12
  1. Go to '...'
13
- 2. Click on '....'
14
- 3. Scroll down to '....'
15
- 4. See error
13
+ 2. Create a new project or clone one from '...'
14
+ 3. Add gem
15
+ 4. Bundle/Run/Test/...
16
16
 
17
17
  **Expected behavior**
18
18
  A clear and concise description of what you expected to happen.
@@ -20,16 +20,13 @@ A clear and concise description of what you expected to happen.
20
20
  **Screenshots**
21
21
  If applicable, add screenshots to help explain your problem.
22
22
 
23
- **Desktop (please complete the following information):**
24
- - OS: [e.g. iOS]
25
- - Browser [e.g. chrome, safari]
26
- - Version [e.g. 22]
27
-
28
- **Smartphone (please complete the following information):**
29
- - Device: [e.g. iPhone6]
30
- - OS: [e.g. iOS8.1]
31
- - Browser [e.g. stock browser, safari]
32
- - Version [e.g. 22]
23
+ **Environment:**
24
+ - OS name and version
25
+ - Ruby manager name and version (if present)
26
+ - Ruby version
27
+ - Bundler version
28
+ - Jekyll version
29
+ - Jekyll Favicon version
33
30
 
34
31
  **Additional context**
35
32
  Add any other context about the problem here.
@@ -1,14 +1,16 @@
1
1
  # PR Template
2
2
 
3
- Include at least this concepts:
3
+ - Tell us...
4
+ - what you wanted to achieve
5
+ - how you did it (use Markdown and screenshots if needed)
4
6
 
5
- - Explain what you wanted to achieve
7
+ - Did you...
8
+ - [ ] update the README? (if needed)
9
+ - [ ] update the CHANGELOG? (if needed)
10
+ - [ ] update the tests?
11
+ - [ ] run the tests?
12
+ - [ ] check with Rubocop?
6
13
 
7
- - Explain what you did
14
+ Don't forget to visit the [GitHub Action workflows](https://github.com/afaundez/jekyll-favicon/actions) after creating the PR.
8
15
 
9
- - use markdown
10
- - include screenshots if helps to explain
11
-
12
- - Explain how to test it
13
-
14
- Thanks for contrubuting!
16
+ Thanks for contributing!
@@ -0,0 +1,40 @@
1
+ name: Gem Push
2
+
3
+ on:
4
+ release:
5
+ types: [ published ]
6
+
7
+ jobs:
8
+ build:
9
+ name: Build + Publish
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: Set up Ruby 2.5
15
+ uses: actions/setup-ruby@v1
16
+ with:
17
+ ruby-version: 2.5.x
18
+
19
+ - name: Publish to GPR
20
+ run: |
21
+ mkdir -p $HOME/.gem
22
+ touch $HOME/.gem/credentials
23
+ chmod 0600 $HOME/.gem/credentials
24
+ printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
25
+ gem build *.gemspec
26
+ gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
27
+ env:
28
+ GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
29
+ OWNER: ${{ github.repository_owner }}
30
+
31
+ - name: Publish to RubyGems
32
+ run: |
33
+ mkdir -p $HOME/.gem
34
+ touch $HOME/.gem/credentials
35
+ chmod 0600 $HOME/.gem/credentials
36
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
37
+ gem build *.gemspec
38
+ gem push *.gem
39
+ env:
40
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
@@ -0,0 +1,38 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, next, update-ci ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ test:
11
+ env:
12
+ BUNDLE_GEMFILE: test/gemfiles/${{ matrix.gemfile }}.gemfile
13
+
14
+ runs-on: ${{ matrix.os }}
15
+
16
+ steps:
17
+ - uses: actions/checkout@v2
18
+
19
+ - name: Set up Ruby ${{ matrix.ruby-version }}
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ bundler-cache: true
23
+ ruby-version: ${{ matrix.ruby-version }}
24
+
25
+ - name: Run tests with ${{ matrix.gemfile }}
26
+ run: bundle exec rake
27
+
28
+ strategy:
29
+ matrix:
30
+ exclude:
31
+ - ruby-version: '3.0'
32
+ gemfile: jekyll36
33
+ - ruby-version: '3.0'
34
+ gemfile: jekyll37
35
+
36
+ gemfile: [ jekyll36, jekyll37, jekyll38, jekyll39, jekyll40, jekyll41, jekyll42 ]
37
+ os: [ ubuntu-latest ]
38
+ ruby-version: [ 2.6, 2.7, '3.0' ]
data/.gitignore CHANGED
@@ -6,4 +6,8 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ .jekyll-cache
10
+ .ruby-version
9
11
  *.gem
12
+ Gemfile.lock
13
+ *.gemfile.lock
data/.reek.yml ADDED
@@ -0,0 +1,25 @@
1
+ ---
2
+ detectors:
3
+ ControlParameter:
4
+ exclude:
5
+ - "Jekyll::Favicon::StaticFile::Convertible#write" # overrides Jekyll::StaticFile method
6
+ UtilityFunction:
7
+ exclude:
8
+ - "Jekyll::Favicon::Generator#generate" # overrides Jekyll::Generator method
9
+ - "Jekyll::Favicon::Tag#render" # overrides Liquid::Tag method
10
+ - "Jekyll::Favicon::Utils::Configuration::Compact::ClassMethods#compact" # TODO: refactor
11
+ - "Jekyll::Favicon::Utils::Configuration::Merge::ClassMethods#merge" # TODO: refactor
12
+ - "Jekyll::Favicon::Utils::Configuration::Patch::ClassMethods#patch" # TODO: refactor
13
+ - "Jekyll::Favicon::Utils::Convert::ClassMethods#convert" # TODO: refactor
14
+ - "Jekyll::Favicon::Utils::Tag::ClassMethods#build_element" # TODO: refactor
15
+ - "Jekyll::Favicon::Utils::Tag::ClassMethods#build_tag" # TODO: refactor
16
+ - "Jekyll::Favicon::Utils::Tag::ClassMethods#mutate_element" # TODO: refactor
17
+ NestedIterators:
18
+ exclude:
19
+ - "fixture"
20
+ directories:
21
+ "test/unit":
22
+ InstanceVariableAssumption:
23
+ enabled: false
24
+ TooManyMethods:
25
+ enabled: false
@@ -0,0 +1,16 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+
8
+ {
9
+ "name": "jekyll serve",
10
+ "type": "Ruby",
11
+ "cwd": "${workspaceRoot}",
12
+ "request": "launch",
13
+ "program": "bin/debug"
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "ruby.lint": {
3
+ "reek": true,
4
+ "standard": true
5
+ },
6
+ "ruby.useLanguageServer": true
7
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "tasks": [
4
+ {
5
+ "type": "rake",
6
+ "task": "test",
7
+ "group": {
8
+ "kind": "build",
9
+ "isDefault": true
10
+ },
11
+ "problemMatcher": [],
12
+ "label": "rake: test"
13
+ }
14
+ ]
15
+ }
data/CHANGELOG.md CHANGED
@@ -6,6 +6,44 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.0.pre.3] - 2021-06-12
10
+ ### Fixed
11
+ - fix SVG to PNG quality
12
+
13
+ ## [1.0.0.pre.2] - 2021-06-11
14
+ ### Fixed
15
+ - mime time error when starting new project
16
+
17
+ ## [1.0.0.pre.1] - 2021-05-26
18
+ ### Removed
19
+ - Delete Gemfile.lock
20
+ - Delete .ruby-version
21
+ - Remove unsupported versions from travis config
22
+ - Remove bundler and rubocop gemspec's development dependencies
23
+ - Remove graphicmagick from travis config
24
+ - Remove travis-ci config
25
+ - Remove nokogiri gemspec development dependency
26
+ ### Changed
27
+ - Move supported ruby versions to 2.5
28
+ - Update nokogiri, minitest, and minitest-hooks gemspec's development dependencies
29
+ - Update mini_magick gemspec's runtime dependencies
30
+ - Update travis rvm versions
31
+ - Rename Gem Push github action workflow
32
+ ### Added
33
+ - gitignore Gemfile.lock
34
+ - gitignore .jekyll-cache
35
+ - Add Test github action workflow
36
+ - Regenration
37
+
38
+ ## [0.2.9] - 2021-02-10
39
+ ### Added
40
+ - Optional `crossorigin` attribute for Chrome manifest
41
+
42
+ ## [0.2.8] - 2019-09-11
43
+ ### Changed
44
+ - Upgrade mini_magick 4.9.4 in gemspec for security fix
45
+ - Update gemspec to support Jekyll 4.0
46
+
9
47
  ## [0.2.7] - 2019-05-27
10
48
  ### Fixed
11
49
  - Set default background back to none
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
- source 'https://rubygems.org'
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
2
4
 
3
5
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
6
 
data/README.md CHANGED
@@ -3,25 +3,22 @@
3
3
  This [Jekyll](https://jekyllrb.com) plugin adds:
4
4
 
5
5
  - a generator for
6
- - a `favicon.ico`
7
- - multiple `favicon-[width]x[height].png`
6
+ - an ICO favicon
7
+ - PNG favicons
8
+ - SVG favicons
8
9
  - a [webmanifest](https://developer.mozilla.org/en-US/docs/Web/Manifest)
9
10
  - a [browser configuration schema](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/dn320426%28v=vs.85%29)
10
11
  - a tag to generate all the corresponding links and metadata needed in the head tag
11
12
 
12
13
  ## Prerequisites
13
14
 
14
- Before using this plugin your system must have installed [ImageMagick](http://www.imagemagick.org) ~~(or [GraphicsMagick](http://www.graphicsmagick.org/))~~.
15
+ This plugin assumes you have [ImageMagick](http://www.imagemagick.org) installed.
15
16
 
16
17
  Check if it is already installed by running:
17
18
 
18
19
  ```sh
19
- $ convert --version
20
+ $ convert --version | grep Version
20
21
  Version: ImageMagick 7.0.8-46 Q16 x86_64 2019-05-19 https://imagemagick.org
21
- Copyright: © 1999-2019 ImageMagick Studio LLC
22
- License: https://imagemagick.org/script/license.php
23
- Features: Cipher DPC HDRI Modules OpenMP(3.1)
24
- Delegates (built-in): bzlib freetype heic jng jp2 jpeg lcms ltdl lzma openexr png tiff webp xml zlib
25
22
  ```
26
23
 
27
24
  If you have a [problem converting SVG files](https://github.com/afaundez/jekyll-favicon/issues/9#issuecomment-473862194), you may need to install the package `librsvg2-bin`. For example, in Ubuntu/Debian systems:
@@ -30,18 +27,16 @@ If you have a [problem converting SVG files](https://github.com/afaundez/jekyll-
30
27
  sudo apt install librsvg2-bin
31
28
  ```
32
29
 
33
- If you have a [problem converting SVG files](https://github.com/afaundez/jekyll-favicon/issues/9#issuecomment-473862194), you may need to install the package `librsvg2-bin`. For example, in Ubuntu/Debian systems:
30
+ You may need to install ImageMagick after installing the RSVG renderer.
34
31
 
35
- ```sh
36
- sudo apt install librsvg2-bin
37
- ```
32
+ Check the devcontainer's [Dockerfile](.devcontainer/Dockerfile) for more practical details.
38
33
 
39
34
  ## Installation
40
35
 
41
36
  Add this line to your application's Gemfile:
42
37
 
43
38
  ```ruby
44
- gem 'jekyll-favicon', '~> 0.2.7', group: :jekyll_plugins
39
+ gem 'jekyll-favicon', '~> 1.0.0.pre.3', group: :jekyll_plugins
45
40
  ```
46
41
 
47
42
  ## Usage
@@ -50,23 +45,27 @@ If you are going to use this plugin in a hosted build/service, be sure that they
50
45
 
51
46
  As [Github Pages](https://pages.github.com) build doesn't load custom plugins, this plugin won't work. As an alternative, you can build your site and push all files (for example, build to `docs`, version it and push it, although this works only for project pages).
52
47
 
48
+ Tested with:
49
+
50
+ - Jekyll 3.6 to 3.7, ruby 2.6 to 2.7
51
+ - Jekyll 3.8 to 4.2, ruby 2.6 to 3.0
52
+
53
53
  ### Generator
54
54
 
55
- By installing the plugin, it will be automatically activated. It will search for the file `/favicon.svg` and generate a set of files in `/assets/images` and few more items at the site's root. It also will exclude the original sources from being copied as a regular static file.
55
+ By installing the plugin, it will be automatically activated without further configurations.
56
56
 
57
- You can override these settings in your sites's `_config.yml`:
57
+ You can override these settings in your sites's `_config.yml`. The simplest configuration would be this:
58
58
 
59
59
  ```yaml
60
60
  favicon:
61
61
  source: custom-favicon-png-or.svg
62
- path: /assets/img
63
62
  ```
64
63
 
65
- This plugin works best if you use an SVG with a square viewbox as the source, but you can also use a PNG instead (at least 558x588). Check [favicon.svg](/test/fixtures/sites/minimal/favicon.svg) as an example.
64
+ This plugin works best if you use an SVG with a square viewbox as the source, but you can also use a PNG instead (at least 558x588). Check the fixtures [favicon.svg](test/fixtures/favicon.svg) or [favicon.png](test/fixtures/favicon.png) as examples.
66
65
 
67
66
  ### Favicon tag
68
67
 
69
- To get the links and meta, just add the favicon tag `{{ favicon }}`. For example, on your `index.html`
68
+ To get the links and meta, just add the favicon tag `{% favicon %}`. For example, on your `index.html`
70
69
 
71
70
  ```html
72
71
  ---
@@ -77,17 +76,73 @@ To get the links and meta, just add the favicon tag `{{ favicon }}`. For example
77
76
  {% favicon %}
78
77
  </head>
79
78
  <body>
80
- <h1>Jekyll Favicon</h1>
81
79
  </body>
82
80
  </html>
83
81
  ```
84
82
 
83
+ ## Configuration
84
+
85
+ The plugin customization goes in the `favicon` key in the `_config.yml` file. There are four key parameters:
86
+
87
+ | attribute name | type | default | description |
88
+ |----------------|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|
89
+ | source | hash/string | <div class="highlight highlight-source-yaml position-relative"><pre><span class="pl-ent">name</span>: <span class="pl-s">favicon.svg</span><br><span class="pl-ent">dir</span>: <span class="pl-s">.</span></pre></div> | SVG or PNG file relative to site's source. Any favicon without explicit source will use this attribute as default. |
90
+ | background | string | `transparent` | Color keyword or Hex representation. Any favicon without explicit convert background will use this attribute as default. |
91
+ | dir | string | `.` | Path relative to site's source. Any favicon without explicit source dir will use this attribute as default. |
92
+ | assets | array | see [defaults](config/jekyll/favicon.yml) | Array of asset configuration. Any asset define here will be controlled with this plugin. |
93
+
94
+ ### Assets
95
+
96
+ The assets is an array of file spec:
97
+
98
+ | attribute name | type | default | description |
99
+ |----------------|---------------|-------------|--------------------------------------------|
100
+ | name | string | | file's basename. Required. |
101
+ | dir | string/symbol | `:site_dir` | file's dir, relative to site's destination |
102
+ | source | hash | | file's source. Required. |
103
+ | convert | hash | `{}` | see [convert defaults](#convert) |
104
+ | tags | array | `[]` | see [tags defaults](#tags) |
105
+ | refer | hash | `[]` | see [refer defaults](#refer) |
106
+
107
+ Symbol values:
108
+
109
+ - `:background`: favicon's global background
110
+ - `:site_dir`: favicon's global dir
111
+ - `:href`: favicons absolute URL path
112
+
113
+ #### Convert
114
+
115
+ The convert configuration is specific for each type of convertion: SVG to ICO/PNG/SVG and PNG to ICO/PNG.
116
+
117
+ | attribute name | type | default | description |
118
+ |----------------|---------------|-------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
119
+ | alpha | string | see [convert config](config/jekyll/favicon/static_file/convertible.yml) | see [imagemagick alpha docs](https://imagemagick.org/script/command-line-options.php#alpha) |
120
+ | background | string/symbol | see [convert config](config/jekyll/favicon/static_file/convertible.yml) | see [imagemagick background docs](https://imagemagick.org/script/command-line-options.php#background) |
121
+ | define | string/symbol | see [convert config](config/jekyll/favicon/static_file/convertible.yml) | see [imagemagick define docs](https://imagemagick.org/script/command-line-options.php#define) | |
122
+ | extent | string/symbol | see [convert config](config/jekyll/favicon/static_file/convertible.yml) | see [imagemagick extent docs](https://imagemagick.org/script/command-line-options.php#extent) |
123
+ | gravity | string | see [convert config](config/jekyll/favicon/static_file/convertible.yml) | see [imagemagick gravity docs](https://imagemagick.org/script/command-line-options.php#gravity) |
124
+ | resize | string | see [convert config](config/jekyll/favicon/static_file/convertible.yml) | see [imagemagick resize docs](https://imagemagick.org/script/command-line-options.php#resize) |
125
+ | size | string | see [convert config](config/jekyll/favicon/static_file/convertible.yml) | see [imagemagick size docs](https://imagemagick.org/script/command-line-options.php#size) |
126
+
127
+ Symbol values:
128
+
129
+ - `:auto`: if sizes is not a square, then sizes
130
+ - `:max`: 3 times the largest dimension
131
+
132
+ #### Tags
133
+
134
+ The tags configuration is a list of hashes with only one key, `link` or `meta`, and only one value, a hash with the HTML attributes associated to the key. See [tags defaults](config/jekyll/favicon/static_file/taggable.yml) for more details.
135
+
136
+ #### Refer
137
+
138
+ The refer configuration is a list of hashes with only one key, `webmanifest` or `browserconfig`, and only one value, a hash that will override the associated file. See [refer defaults](config/jekyll/favicon/static_file/referenceable.yml) for more details.
139
+
85
140
  ## Development
86
141
 
87
142
  If you want to add something, just make a PR. There is a lot to do:
88
143
 
89
144
  - Define and check SVG/PNG attributes before execute
90
- - Review SVG to PNG conversion, it working as it is, but some parameters are hard coded and may only work with the samples
145
+ - Review SVG to PNG conversion, it working as it is, but some parameters are hardcoded and may only work with the samples
91
146
  - Encapsulate image conversion
92
147
  - Tests everywhere
93
148
 
@@ -97,11 +152,11 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/afaund
97
152
 
98
153
  ## License
99
154
 
100
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
155
+ The gem is available as open-source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
101
156
 
102
157
  ## Code of Conduct
103
158
 
104
- Everyone interacting in the Jekyll Favicon project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/afaundez/jekyll-favicon/blob/master/CODE_OF_CONDUCT.md).
159
+ Everyone interacting in the Jekyll Favicon project’s codebases, issue trackers, chat rooms, and mailing lists is expected to follow the [code of conduct](https://github.com/afaundez/jekyll-favicon/blob/master/CODE_OF_CONDUCT.md).
105
160
 
106
161
  ## Acknowledgments
107
162