diff --git a/scripts/helpers/page.js b/scripts/helpers/page.js index 2bdcffd..061f24d 100644 --- a/scripts/helpers/page.js +++ b/scripts/helpers/page.js @@ -82,7 +82,7 @@ hexo.extend.helper.register('getBgPath', path => { const absoluteUrlPattern = /^(?:[a-z][a-z\d+.-]*:)?\/\//i const relativeUrlPattern = /^(\.\/|\.\.\/|\/|[^/]+\/).*$/ - const colorPattern = /^(#|rgb|rgba|hsl|hsla|linear-gradient|radial-gradient)/i + const colorPattern = /^(#|rgb|rgba|hsl|hsla)/i if (colorPattern.test(path)) { return `background-color: ${path};`