Update page.js

修复背景渐变色无法生效
This commit is contained in:
aln
2024-10-04 13:28:38 +08:00
committed by GitHub
parent 2ca779a6ad
commit f62d76046d

View File

@@ -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};`