Skip to content

Commit 908fbb3

Browse files
committed
Remove favicon generator and use static icons
Drop middleman-favicon-maker, FaviconsHelper, and related config; add static favicon files and update layout Remove imagemagick APT caching step and cleanup Gemfile/Gemfile.lock
1 parent 462c147 commit 908fbb3

File tree

9 files changed

+6
-97
lines changed

9 files changed

+6
-97
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ jobs:
1919
build:
2020
runs-on: ubuntu-latest
2121
steps:
22-
- name: Install APT Packages
23-
uses: awalsh128/cache-apt-pkgs-action@v1
24-
with:
25-
packages: imagemagick
26-
2722
- name: Checkout
2823
uses: actions/checkout@v4
2924

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ source 'https://rubygems.org'
33
gem 'ostruct' # Required for Ruby 4.0+
44

55
gem 'middleman'
6-
gem 'middleman-favicon-maker'
76

87
gem 'middleman-inline_svg'
98
gem 'middleman-livereload'

Gemfile.lock

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ GEM
2525
concurrent-ruby (1.3.6)
2626
connection_pool (3.0.2)
2727
contracts (0.17.3)
28-
docile (1.4.1)
2928
dotenv (3.2.0)
3029
drb (2.2.3)
3130
em-websocket (0.5.3)
@@ -36,9 +35,8 @@ GEM
3635
execjs (2.10.0)
3736
fast_blank (1.0.1)
3837
fastimage (2.4.0)
39-
favicon_maker (1.3.1)
40-
docile (~> 1.1)
4138
ffi (1.17.3)
39+
ffi (1.17.3-arm64-darwin)
4240
haml (7.2.0)
4341
temple (>= 0.8.2)
4442
thor
@@ -92,9 +90,6 @@ GEM
9290
toml
9391
uglifier (>= 3, < 5)
9492
webrick
95-
middleman-favicon-maker (4.1.0)
96-
favicon_maker (~> 1.3, >= 1.3.1)
97-
middleman-core (~> 4.0)
9893
middleman-inline_svg (0.1.2)
9994
middleman-core (>= 3.4.1)
10095
nokogiri (>= 1.8)
@@ -111,6 +106,8 @@ GEM
111106
nokogiri (1.19.0)
112107
mini_portile2 (~> 2.8.2)
113108
racc (~> 1.4)
109+
nokogiri (1.19.0-arm64-darwin)
110+
racc (~> 1.4)
114111
ostruct (0.6.3)
115112
padrino-helpers (0.15.3)
116113
i18n (>= 0.6.7, < 2)
@@ -155,7 +152,6 @@ PLATFORMS
155152

156153
DEPENDENCIES
157154
middleman
158-
middleman-favicon-maker
159155
middleman-inline_svg
160156
middleman-livereload
161157
middleman-robots

config.rb

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
Dir['./*/*.rb'].each { |file| load file }
2-
include FaviconsHelper
32

43
# Build-specific configuration
54
# https://middlemanapp.com/advanced/configuration/#environment-specific-settings
@@ -24,7 +23,6 @@
2423
set :relative_links, true
2524
activate :asset_hash
2625
activate :directory_indexes
27-
activate :favicon_maker, icons: generate_favicons_hash
2826
activate :gzip
2927
activate :relative_assets
3028
activate :robots,
@@ -33,36 +31,6 @@
3331
end
3432
activate :inline_svg
3533

36-
set :favicons, [
37-
{
38-
rel: 'apple-touch-icon',
39-
size: '180x180',
40-
icon: 'apple-touch-icon.png'
41-
},
42-
{
43-
rel: 'icon',
44-
type: 'image/png',
45-
size: '32x32',
46-
icon: 'favicon32x32.png'
47-
},
48-
{
49-
rel: 'icon',
50-
type: 'image/png',
51-
size: '16x16',
52-
icon: 'favicon16x16.png'
53-
},
54-
{
55-
rel: 'shortcut icon',
56-
size: '64x64,32x32,24x24,16x16',
57-
icon: 'favicon.ico'
58-
},
59-
{
60-
rel: 'og-image',
61-
size: '1200x630',
62-
icon: 'og-image.png'
63-
}
64-
]
65-
6634
helpers do
6735
def current_page?(path)
6836
current_page.url.chomp('/') == path.chomp('/')

data/site.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: "CSA Admin"
22
baskets_count: 140000
33
host: "https://csa-admin.org"
44
thumbnail: "logo.svg"
5-
favicon: "_favicon_template.svg"
65
base_color: "#21952F"
76
repository: "https://github.com/csa-admin-org/csa-admin"
87
contact:

helpers/favicons_helper.rb

Lines changed: 0 additions & 50 deletions
This file was deleted.

source/images/apple-touch-icon.png

4.83 KB
Loading

source/layouts/layout.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@
107107
}
108108
</script>
109109

110-
<%= auto_display_favicon_tags %>
110+
<meta name="theme-color" content="<%= data.site.base_color %>">
111+
<link rel="icon" href="<%= image_path('favicon.svg') %>" type="image/svg+xml">
112+
<link rel="apple-touch-icon" href="<%= image_path('apple-touch-icon.png') %>">
111113
<%= stylesheet_link_tag 'site' %>
112114

113115
</head>

0 commit comments

Comments
 (0)