Skip to content

Commit

Permalink
Add favicons, fix build issues; fixes #68
Browse files Browse the repository at this point in the history
  • Loading branch information
jegtnes committed Feb 24, 2024
1 parent e42e5f7 commit 7ea9cf8
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 4 deletions.
8 changes: 5 additions & 3 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ const ariaCurrent = require("./src/_shortcodes/aria-current");
const { humanPostDate, isoPostDate } = require("./src/_filters/date");

module.exports = function (eleventyConfig) {
eleventyConfig.addPassthroughCopy("src/assets");
eleventyConfig.addPassthroughCopy({ 'src/robots.txt': '/robots.txt' });

eleventyConfig.addWatchTarget("src/_filters");
eleventyConfig.addWatchTarget("src/_shortcodes");
eleventyConfig.addWatchTarget("src/_styles");
Expand All @@ -33,6 +30,11 @@ module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(metagen);
eleventyConfig.addPlugin(EleventyVitePlugin);

eleventyConfig.addPassthroughCopy("public");
eleventyConfig.addPassthroughCopy("src/assets");
eleventyConfig.addPassthroughCopy({ "src/assets/favicons": "public" });
eleventyConfig.addPassthroughCopy({ "src/*.txt": "public" });

const mdLib = markdownIt({
html: true,
breaks: true,
Expand Down
4 changes: 4 additions & 0 deletions src/_layouts/global.njk
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
custom=custom,
css=["/assets/styles/styles.css"]
%}
<link rel="icon" href="/favicon.ico" sizes="48x48" >
<link rel="icon" href="/favicon.svg" sizes="any" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png"/>
<link rel="manifest" href="/manifest.json" />
</head>
<body>
{% include './_partials/header.njk' %}
Expand Down
Binary file added src/assets/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 src/assets/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 src/assets/favicons/apple-touch-icon.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 src/assets/favicons/favicon.ico
Binary file not shown.
4 changes: 4 additions & 0 deletions src/assets/favicons/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions src/assets/favicons/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "The website and blog of Alex Jegtnes, a freelance front-end developer",
"short_name": "Alex Jegtnes",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#001C54",
"display": "standalone"
}
2 changes: 1 addition & 1 deletion src/rss.njk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"permalink": "feed.xml"
"permalink": "/public/feed.xml"
eleventyExcludeFromCollections: true
metadata:
title: "Alex Jegtnes' blog"
Expand Down

0 comments on commit 7ea9cf8

Please sign in to comment.