Deprecate lazyload option

This commit is contained in:
Mimi 2026-08-02 23:57:30 +08:00
parent 333b2c7908
commit d54ab89ea2
2 changed files with 6 additions and 6 deletions

View File

@ -88,7 +88,6 @@ open_graph:
#twitter_id: <twitter:creator>
#twitter_site: <twitter:site>
#twitter_image: <twitter:image>
#google_plus: <g+:profile_link>
#fb_admins: <fb:admin_id>
#fb_app_id: <fb:app_id>
@ -600,10 +599,6 @@ fancybox: false
# For more information: https://medium-zoom.francoischalifour.com
mediumzoom: false
# Vanilla JavaScript plugin for lazyloading images.
# For more information: https://apoorv.pro/lozad.js/demo/
lazyload: false
# Automatically insert whitespace between CJK and half-width characters.
# For more information: https://github.com/vinta/pangu.js
# Server-side plugin: https://github.com/next-theme/hexo-pangu

View File

@ -10,7 +10,7 @@ module.exports = hexo => {
hexo.log.warn('Documentation: https://theme-next.js.org/docs/getting-started/configuration.html');
}
const { cache, changyan, growingio_analytics, language_switcher, leancloud_visitors } = hexo.theme.config;
const { cache, changyan, growingio_analytics, language_switcher, lazyload, leancloud_visitors } = hexo.theme.config;
const warning = function(...args) {
hexo.log.warn(`Since ${args[0]} is turned on, the ${args[1]} is disabled to avoid potential hazards.`);
};
@ -29,6 +29,11 @@ module.exports = hexo => {
if (growingio_analytics) {
hexo.log.warn('growingio_analytics is deprecated. Please migrate to another analytics provider.');
}
if (lazyload) {
hexo.log.warn('The `lazyload` theme option is deprecated and will be removed in the next version.');
hexo.log.warn('Use `marked.lazyload: true` in Hexo `_config.yml` instead. hexo-renderer-marked will add `loading="lazy"` to images.');
hexo.log.warn('Documentation: https://github.com/hexojs/hexo-renderer-marked#options');
}
if (leancloud_visitors?.enable) {
hexo.log.warn('LeanCloud will stop public services on 2027-01-12. Please migrate your data as soon as possible.');
hexo.log.warn('Announcement: https://docs.leancloud.app/sdk/announcements/sunset-announcement/');