Deprecate body_scrollbar.stable option

This commit is contained in:
Mimi 2026-08-04 12:32:47 +08:00
parent 8fa97a173a
commit 940b2263f6
2 changed files with 4 additions and 3 deletions

View File

@ -364,8 +364,6 @@ theme_color:
body_scrollbar:
# Place the scrollbar over the content.
overlay: false
# Reserving space for the scrollbar gutter even if the content is not overflowing.
stable: false
codeblock:
# Code Highlight theme

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, lazyload, leancloud_visitors } = hexo.theme.config;
const { body_scrollbar, 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,9 @@ module.exports = hexo => {
if (growingio_analytics) {
hexo.log.warn('growingio_analytics is deprecated. Please migrate to another analytics provider.');
}
if (body_scrollbar?.stable) {
hexo.log.warn('The `body_scrollbar.stable` theme option is deprecated and will be removed in the next version.');
}
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.');