Skip to content

Commit

Permalink
perf: 图片优化
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Sketon committed May 25, 2024
1 parent fdbd21c commit ad8d0bb
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ cover: rgb(255,117,117)

#### banner

The banner is stored in `themes/reimu/source/images/banner.jpg` and can be modified in the inner `_config.yml`
The banner is stored in `themes/reimu/source/images/banner.webp` and can be modified in the inner `_config.yml`

```yaml
banner: "/images/banner.jpg"
banner: "/images/banner.webp"
```

#### favicon
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ cover: rgb(255,117,117)

#### 头图

头图保存于 `themes/reimu/source/images/banner.jpg`,可在内层 `_config.yml` 中修改
头图保存于 `themes/reimu/source/images/banner.webp`,可在内层 `_config.yml` 中修改

```yaml
banner: "/images/banner.jpg"
banner: "/images/banner.webp"
```

#### 图标
Expand Down
3 changes: 1 addition & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ menu:
about: /about
friend: /friend

banner: "/images/banner.jpg" # themes/reimu/source/images/banner.jpg
banner: "/images/banner.webp" # themes/reimu/source/images/banner.webp
# You can also write it in the form of the following url
# banner: "https://example.com"
favicon: "/images/favicon.ico" # themes/reimu/source/images/favicon.ico
Expand Down Expand Up @@ -268,7 +268,6 @@ vendor:
base: fastly_jsdelivr_gh|MliKiowa/plugin-live2d/
js: fastly_jsdelivr_gh|MliKiowa/plugin-live2d/js/live2d-autoload.js
css:
highlight: webcache|[email protected]/index.css
fancybox: webcache|@fancyapps/[email protected]/dist/jquery.fancybox.min.css
katex: webcache|[email protected]/dist/katex.min.css
waline: webcache|@waline/client@v2/dist/waline.css
Expand Down
Binary file added source/images/banner.webp
Binary file not shown.
Binary file modified source/images/taichi-fill.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 source/images/taichi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions source/js/sw.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const PreCache = [
'/images/taichi.png',
'/images/banner.jpg',
'/images/banner.webp',
'/images/taichi-fill.png',
'/css/loader.css',
'/css/style.css',
Expand Down Expand Up @@ -76,4 +76,4 @@ if ('serviceWorker' in navigator) {
.catch((error) => {
console.log('Service Worker 注册失败: ', error);
});
}
}

0 comments on commit ad8d0bb

Please sign in to comment.