Skip to content

Commit

Permalink
Remove eleventy-plugin-gen-favicons due to #91 (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwojcik authored Mar 1, 2024
1 parent b3a8ffa commit da6d2c3
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 25 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

**Bliss** is a single-column blog template for [Eleventy static site generator](https://11ty.dev) with strong focus on simplicity without sacrificing functionality.

It is a modified and improved version of the theme running [Offbeat Bits - my personal blog](https://offbeatbits.com/).
It is a modified and improved version of the theme running [my personal blog](https://blog.lukaszwojcik.net/).

## Features

- **light / dark mode switcher** + honoring browser color scheme preference
- **sharing buttons for popular social media** (including Mastodon!) + copying post URL to clipboard
- **Mastodon integration:** generating `.well-known/webfinger` file + automatic generation of `<link rel="me">` tags for site ownership verification
- **translation ready** (support for custom language tags + separate file with static phrases)
- **automatic favicon generation**
- **manifest file** for PWA
- **automatic OpenGraph image generation**
- **code syntax highlighting** with PrismJS using [Eleventy syntax highlighting plugin](https://www.11ty.dev/docs/plugins/syntaxhighlight/)
Expand All @@ -36,8 +35,6 @@ npm run dev # to launch the project for modifications
npm run build # to build production version
```

**If you use Windows / Powershell 7:** If you get an error `Error: EBUSY: resource busy or locked` while starting the project, check [this issue](https://github.com/lwojcik/eleventy-template-bliss/issues/91) for possible workarounds.

## Instant deploy

Netlify:
Expand Down Expand Up @@ -75,7 +72,8 @@ Non-exhaustive list of steps to make the template **your own**. Some of them are
- [ ] If you use post disclaimers at the beginning of your posts - consider using the built-in disclaimer feature - see [`06-10-sample-post-33-disclaimer.md`](./content/posts/2023/06-10-sample-post-33-disclaimer.md) or [`05-31-sample-post-32-linked-disclaimer.md`](./content/posts/2023/05-31-sample-post-32-linked-disclaimer.md) for reference
- [ ] Add your own pages - use one of the existing placeholder pages as a reference
- [ ] Add / remove meta pages in the footer - see [`siteConfig.js`](./content/_data/siteConfig.js)
- [ ] Replace a favicon file (`favicon.svg`) with your own - only one file is needed, the remaining ones will be generated on build
- [ ] Replace a favicon files (`favicon.svg`, `favicon.ico`, `apple-touch-icon.png`, `icon-192.png`, `icon-512.png`) with your own
- [ ] Update `manifest.webmanifest` file with data relevant to your site
- [ ] Replace OpenGraph images with ones relevant to your site
- [ ] Decide if you want to use automated OpenGragh image generation + consider modifying their appearance to suit your taste (see `siteConfig.js` for more info)
- [ ] Copy your existing static assets to `assets` folder. Note that the top of `assets` folder corresponds to the _root directory_ of your site (`_site`)
Expand All @@ -102,6 +100,12 @@ into the following:

You can do the same for pages by modifying `content/pages/pages.json` file.

### Automatic favicon generation

Until version 2.4.0 Bliss was bundled with a [favicon generation plugin](https://www.npmjs.com/package/eleventy-plugin-gen-favicons). Due to unresolved bugs this plugin is no longer included with the template.

If you want to reimplement it yourself, change history from [this pull request](https://github.com/lwojcik/eleventy-template-bliss/pull/99) may be helpful.

## Contributions

Contributions of the following kind are welcome:
Expand Down
18 changes: 0 additions & 18 deletions _11ty/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const eleventyNavigationPlugin = require('@11ty/eleventy-navigation');
const srcSet = require('./plugins/srcset');
const pluginPWA = require('eleventy-plugin-pwa-v2');
const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight');
const faviconsPlugin = require('eleventy-plugin-gen-favicons');

const productionPlugins = IS_PRODUCTION
? [
Expand Down Expand Up @@ -59,23 +58,6 @@ const plugins = [
{
body: syntaxHighlight,
},
{
body: faviconsPlugin,
options: {
manifestData: {
name: siteConfig.site.title,
lang: siteConfig.site.language,
short_name: siteConfig.site.title,
description: siteConfig.site.description,
start_url: '/',
scope: '/',
display: 'standalone',
theme_color: siteConfig.manifestJson.themeColor,
background_color: siteConfig.manifestJson.backgroundColor,
orientation: 'any',
},
},
},
];

module.exports = [...plugins, ...pwaPluginConfig, ...productionPlugins];
Binary file added assets/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 assets/favicon.ico
Binary file not shown.
Binary file added assets/icon-192.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 assets/icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions assets/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "Bliss",
"lang": "en",
"short_name": "Bliss",
"description": "Simple Eleventy blog template",
"start_url": "/",
"scope": "/",
"display": "standalone",
"theme_color": "#1773cf",
"background_color": "#1773cf",
"orientation": "any",
"icons": [
{
"src": "/icon-192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "/icon-512.png",
"type": "image/png",
"sizes": "512x512"
}
]
}
5 changes: 4 additions & 1 deletion content/_includes/partials/head/favicons.njk
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{%- favicons 'assets/favicon.svg', appleIconPadding=0 -%}
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="manifest" href="/manifest.webmanifest">
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"cross-env": "^7.0.3",
"crypto-js": "^4.2.0",
"eleventy-plugin-emoji": "^1.1.0",
"eleventy-plugin-gen-favicons": "^1.1.2",
"eleventy-plugin-pwa-v2": "^1.0.1",
"eslint": "^8.56.0",
"eslint-plugin-import": "^2.29.1",
Expand Down

0 comments on commit da6d2c3

Please sign in to comment.