mirror of
https://github.com/remy/inliner.git
synced 2024-08-16 20:00:35 +03:00
feat: inline favicons with rel="shortcut icon"
If the page is using rel="shortcut icon" instead of rel="icon", the author will be surprised that the icon was not inlined, and may not notice. It would be better to inline that icon. Includes updates to the favicon tests. Related to issue #126
This commit is contained in:
parent
ae4c110976
commit
68c345ae8e
@ -20,7 +20,7 @@ var tasks = {
|
||||
js: 'script',
|
||||
svg: 'svg',
|
||||
links: 'link[rel=stylesheet]',
|
||||
favicon: 'link[rel=icon]',
|
||||
favicon: 'link[rel=icon],link[rel="shortcut icon"]',
|
||||
styles: 'style',
|
||||
'style-attrs': '[style]:not(svg *)', // only style attrs in HTML, not SVG
|
||||
images: 'img',
|
||||
|
2
test/fixtures/favicon.result.html
vendored
2
test/fixtures/favicon.result.html
vendored
@ -1 +1 @@
|
||||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>inline favicon</title> <link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX/TQBcNTh/AAAACklEQVR4nGNiAAAABgADNjd8qAAAAABJRU5ErkJggg=="> </head> <body> </body> </html>
|
||||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>inline favicon</title> <link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX/TQBcNTh/AAAACklEQVR4nGNiAAAABgADNjd8qAAAAABJRU5ErkJggg=="> <link rel="shortcut icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX/TQBcNTh/AAAACklEQVR4nGNiAAAABgADNjd8qAAAAABJRU5ErkJggg=="> </head> <body> </body> </html>
|
||||
|
3
test/fixtures/favicon.src.html
vendored
3
test/fixtures/favicon.src.html
vendored
@ -4,7 +4,8 @@
|
||||
<meta charset="utf-8">
|
||||
<title>inline favicon</title>
|
||||
<link rel="icon" type="image/png" href="colour.png">
|
||||
<link rel="shortcut icon" type="image/png" href="colour.png">
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user