Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Bring back complete favicon feature set #364

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"template":
[
"default",
"modern"
"modern",
"template"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe call this npgsql_template to make it clearer it's our customizations etc.

],
"content":
[
Expand Down
Binary file added favicons/android-chrome-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified favicons/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/android-chrome-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/android-chrome-36x36.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/android-chrome-384x384.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/android-chrome-48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified favicons/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/android-chrome-72x72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/android-chrome-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/apple-touch-icon-114x114-precomposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/apple-touch-icon-114x114.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/apple-touch-icon-120x120-precomposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/apple-touch-icon-120x120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/apple-touch-icon-144x144-precomposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/apple-touch-icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/apple-touch-icon-152x152-precomposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/apple-touch-icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/apple-touch-icon-180x180-precomposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/apple-touch-icon-57x57-precomposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/apple-touch-icon-57x57.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/apple-touch-icon-60x60-precomposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/apple-touch-icon-60x60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/apple-touch-icon-72x72-precomposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/apple-touch-icon-72x72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added favicons/apple-touch-icon-76x76-precomposed.png
Binary file added favicons/apple-touch-icon-76x76.png
Binary file added favicons/apple-touch-icon-precomposed.png
Binary file modified favicons/apple-touch-icon.png
7 changes: 4 additions & 3 deletions favicons/browserconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="/mstile-70x70.png"/>
<square150x150logo src="/mstile-150x150.png"/>
<square310x310logo src="/mstile-310x310.png"/>
<square70x70logo src="/favicons/mstile-70x70.png"/>
<square150x150logo src="/favicons/mstile-150x150.png"/>
<square310x310logo src="/favicons/mstile-310x310.png"/>
<wide310x150logo src="/favicons/mstile-310x150.png"/>
<TileColor>#2b5797</TileColor>
</tile>
</msapplication>
Expand Down
Binary file modified favicons/favicon-16x16.png
Binary file modified favicons/favicon-32x32.png
Binary file modified favicons/favicon.ico
Binary file not shown.
Binary file modified favicons/mstile-144x144.png
Binary file modified favicons/mstile-150x150.png
Binary file modified favicons/mstile-310x150.png
Binary file modified favicons/mstile-310x310.png
Binary file modified favicons/mstile-70x70.png
107 changes: 70 additions & 37 deletions favicons/safari-pinned-tab.svg
41 changes: 38 additions & 3 deletions favicons/site.webmanifest
Original file line number Diff line number Diff line change
@@ -1,14 +1,49 @@
{
"name": "Npgsql Documentation",
"short_name": " Npgsql docs",
"short_name": "Npgsql docs",
"icons": [
{
"src": "/android-chrome-192x192.png",
"src": "/favicons/android-chrome-36x36.png",
"sizes": "36x36",
"type": "image/png"
},
{
"src": "/favicons/android-chrome-48x48.png",
"sizes": "48x48",
"type": "image/png"
},
{
"src": "/favicons/android-chrome-72x72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "/favicons/android-chrome-96x96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "/favicons/android-chrome-144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "/favicons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"src": "/favicons/android-chrome-256x256.png",
"sizes": "256x256",
"type": "image/png"
},
{
"src": "/favicons/android-chrome-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "/favicons/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
Expand Down
46 changes: 46 additions & 0 deletions template/partials/head.tmpl.partial
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}

<head>
Copy link
Member

@roji roji Sep 21, 2024

Choose a reason for hiding this comment

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

Just noting that this override means we need to react if there are any upstream changes in the modern template... This is what caused things when I was upgrading things, which is why I removed it.

I'm hoping maybe there's some way to just add our favicons rather than replacing the entire <head>, which seems like it could cause similar trouble in the future... Is something like that possible, like some more targeted partial or extensibility hook specifically for favicon?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm hoping maybe there's some way to just add our favicons rather than replacing the entire

Not out of the box. That would be an upstream PR to docfx.

<meta charset="utf-8">
{{#_googleAnalyticsTagId}}
<script async src="https://www.googletagmanager.com/gtag/js?id={{_googleAnalyticsTagId}}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', '{{_googleAnalyticsTagId}}');
</script>
{{/_googleAnalyticsTagId}}
{{#redirect_url}}
<meta http-equiv="refresh" content="0;URL='{{redirect_url}}'">
{{/redirect_url}}
{{^redirect_url}}
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}</title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}">
{{#_description}}<meta name="description" content="{{_description}}">{{/_description}}
{{#description}}<meta name="description" content="{{description}}">{{/description}}
<link rel="apple-touch-icon" sizes="180x180" href="{{_rel}}favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="{{_rel}}favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="192x192" href="{{_rel}}favicons/android-chrome-192x192.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{_rel}}favicons/favicon-16x16.png">
<link rel="manifest" href="{{_rel}}favicons/site.webmanifest">
<link rel="mask-icon" href="{{_rel}}favicons/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="{{_rel}}favicons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Npgsql Documentation">
<meta name="application-name" content="Npgsql Documentation">
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="msapplication-TileImage" content="{{_rel}}favicons/mstile-144x144.png">
<meta name="msapplication-config" content="{{_rel}}favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="{{_rel}}styles/docfx.vendor.min.css">
<link rel="stylesheet" href="{{_rel}}styles/docfx.css">
<link rel="stylesheet" href="{{_rel}}styles/main.css">
<meta property="docfx:navrel" content="{{_navRel}}">
<meta property="docfx:tocrel" content="{{_tocRel}}">
{{#_noindex}}<meta name="searchOption" content="noindex">{{/_noindex}}
{{#_enableSearch}}<meta property="docfx:rel" content="{{_rel}}">{{/_enableSearch}}
{{#_enableNewTab}}<meta property="docfx:newtab" content="true">{{/_enableNewTab}}
{{/redirect_url}}
</head>