feat: remove source image in public to prevent leakage (#278)

* refactor: change hires loader function name

* feat: add loading transition animation and improve performance

* feat: hide image source in exampleSite

* docs: update docs for publishResources
This commit is contained in:
Spedon
2024-02-06 23:40:46 +08:00
committed by GitHub
parent f7d2c7962c
commit 997207fa90
5 changed files with 12 additions and 0 deletions

View File

@@ -112,6 +112,8 @@ menu:
identifier: Erwitt identifier: Erwitt
title: Erwitt title: Erwitt
unifiedAlt: '© Elliott Erwitt' unifiedAlt: '© Elliott Erwitt'
_build:
publishResources: false
--- ---
``` ```
@@ -129,6 +131,8 @@ unifiedAlt: '© Elliott Erwitt'
- `unifiedAlt` is **optional**, If you left it empty, the alt attribute of the image will default to its file name; if it is set, the alt attributes of all images will be unified to the value you have set; - `unifiedAlt` is **optional**, If you left it empty, the alt attribute of the image will default to its file name; if it is set, the alt attributes of all images will be unified to the value you have set;
- `publishResources` is **optional but recommended**, setting it to false will hide unprocessed images in the `public` directory. By default, Hugos value for this option is true, which can potentially result in source image leakage.
- If this is a **showcase** page, simply place the images in the same directory as index.md. - If this is a **showcase** page, simply place the images in the same directory as index.md.
- If this is an **information** page, you can continue writing the information you want to display in index.md. - If this is an **information** page, you can continue writing the information you want to display in index.md.

View File

@@ -8,4 +8,6 @@ menu:
identifier: Erwitt identifier: Erwitt
title: Erwitt title: Erwitt
unifiedAlt: '© Elliott Erwitt' unifiedAlt: '© Elliott Erwitt'
_build:
publishResources: false
--- ---

View File

@@ -8,4 +8,6 @@ menu:
identifier: Gruyaert identifier: Gruyaert
title: Gruyaert title: Gruyaert
unifiedAlt: '© Harry Gruyaert' unifiedAlt: '© Harry Gruyaert'
_build:
publishResources: false
--- ---

View File

@@ -8,6 +8,8 @@ menu:
identifier: Info identifier: Info
title: Info title: Info
unifiedAlt: '' unifiedAlt: ''
_build:
publishResources: false
--- ---
Bridget is a _minimal_ Hugo theme designed for photographers/visual artists. Bridget is a _minimal_ Hugo theme designed for photographers/visual artists.

View File

@@ -8,4 +8,6 @@ menu:
identifier: Webb identifier: Webb
title: Webb title: Webb
unifiedAlt: '© Alex Webb' unifiedAlt: '© Alex Webb'
_build:
publishResources: false
--- ---