Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: Update paths for webmanifest and add svg. #167

Merged
merged 3 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/favicon/browserconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<square150x150logo src="/profiles/contrib/yusaopeny/assets/favicon/mstile-150x150.png"/>
<TileColor>#0060af</TileColor>
</tile>
</msapplication>
Expand Down
1 change: 1 addition & 0 deletions assets/favicon/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/favicon/site.webmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"src": "/profiles/contrib/yusaopeny/assets/favicon/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"src": "/profiles/contrib/yusaopeny/assets/favicon/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
Expand Down
2 changes: 2 additions & 0 deletions config/optional/responsive_favicons.settings.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
path_type: path
path: /profiles/contrib/yusaopeny/assets/favicon
tags:
- '<link rel="icon" type="image/svg+xml" href="/favicon.svg">'
- '<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">'
- '<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">'
- '<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">'
- '<link rel="manifest" href="/site.webmanifest">'
- '<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#0089d0">'
- '<meta name="msapplication-TileColor" content="#0060af">'
- '<meta name="msapplication-config" content="browserconfig.xml">'
- '<meta name="theme-color" content="#ffffff">'
remove_default: 1
15 changes: 15 additions & 0 deletions openy.install
Original file line number Diff line number Diff line change
Expand Up @@ -1311,3 +1311,18 @@ function openy_update_8097() {
// Clear all cache to rebuild cached favicon
drupal_flush_all_caches();
}

/**
* Update favicon config.
*/
function openy_update_8098() {
$path = \Drupal::service('extension.list.profile')->getPath('openy') . '/config/optional';
/** @var \Drupal\config_import\ConfigImporterService $config_importer */
$config_importer = \Drupal::service('config_import.importer');
$config_importer->setDirectory($path);
$config_importer->importConfigs([
'responsive_favicons.settings',
]);
// Clear all cache to rebuild cached favicon
drupal_flush_all_caches();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way to invalidate only needed cache bin without flushing all caches?
upgrade path is heavy (

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}