mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-10-04 06:22:00 +08:00
feat: 移除 katex copy-tex.css
feat: CDN可配置 cdnjs feat: cdn可設置 version 和 custom format feat: 點擊歸檔日期跳轉到頁面,標題顯示日期而不是‘歸檔’二字 closed #925 fix: Algolia搜索沒有結果 closed #923
This commit is contained in:
1 parent
945ea89685
commit
9a33e23a9c
10 files changed
+316
-152
No files matched your search
+8
-4
@@ -843,13 +843,18 @@ inject:
|
|||||||
# 非必要請不要修改
|
# 非必要請不要修改
|
||||||
CDN:
|
CDN:
|
||||||
# The CDN provider of internal scripts (主題內部 js 的 cdn 配置)
|
# The CDN provider of internal scripts (主題內部 js 的 cdn 配置)
|
||||||
# option: local/jsdelivr/unpkg
|
# option: local/jsdelivr/unpkg/cdnjs/custom
|
||||||
# Dev version cannot choose jsdelivr/unpkg (dev版的主題不能設置為 jsdelivr/unpkg)
|
# Dev version can only choose. ( dev版的主題只能設置為 local )
|
||||||
internal_provider: local
|
internal_provider: local
|
||||||
# The CDN provider of third party scripts (第三方 js 的 cdn 配置)
|
# The CDN provider of third party scripts (第三方 js 的 cdn 配置)
|
||||||
# option: local/jsdelivr/unpkg
|
# option: local/jsdelivr/unpkg/cdnjs/custom
|
||||||
# when set it to local, you need to install hexo-butterfly-extjs
|
# when set it to local, you need to install hexo-butterfly-extjs
|
||||||
third_party_provider: jsdelivr
|
third_party_provider: jsdelivr
|
||||||
|
# Custom format
|
||||||
|
# For example: https://cdn.staticfile.org/${cdnjs_name}/${version}/${min_cdnjs_file}
|
||||||
|
custom_format:
|
||||||
|
# Add version number to CDN, true or false
|
||||||
|
version: false
|
||||||
option:
|
option:
|
||||||
# main_css:
|
# main_css:
|
||||||
# main:
|
# main:
|
||||||
@@ -874,7 +879,6 @@ CDN:
|
|||||||
# mathjax:
|
# mathjax:
|
||||||
# katex:
|
# katex:
|
||||||
# katex_copytex:
|
# katex_copytex:
|
||||||
# katex_copytex_css:
|
|
||||||
# mermaid:
|
# mermaid:
|
||||||
# canvas_ribbon:
|
# canvas_ribbon:
|
||||||
# canvas_fluttering_ribbon:
|
# canvas_fluttering_ribbon:
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ if !theme.disable_top_img && page.top_img !== false
|
|||||||
if top_img !== false
|
if top_img !== false
|
||||||
- var imgSource = top_img && top_img.indexOf('/') !== -1 ? `background-image: url('${url_for(top_img)}')` : `background: ${top_img}`
|
- var imgSource = top_img && top_img.indexOf('/') !== -1 ? `background-image: url('${url_for(top_img)}')` : `background: ${top_img}`
|
||||||
- var bg_img = top_img ? imgSource : ''
|
- var bg_img = top_img ? imgSource : ''
|
||||||
- var site_title = is_archive() ? fragment_cache('findArchivesTitle', function(){return findArchivesTitle(theme.menu);}) : page.title || page.tag || page.category || config.title
|
- var site_title = is_archive() ? findArchivesTitle(page, theme.menu, date) : page.title || page.tag || page.category || config.title
|
||||||
- var isHomeClass = is_home() ? 'full_page' : 'not-home-page'
|
- var isHomeClass = is_home() ? 'full_page' : 'not-home-page'
|
||||||
- is_post() ? isHomeClass = 'post-bg' : isHomeClass
|
- is_post() ? isHomeClass = 'post-bg' : isHomeClass
|
||||||
else
|
else
|
||||||
|
|||||||
-1
@@ -1,6 +1,5 @@
|
|||||||
link(rel="stylesheet" type="text/css" href=url_for(theme.asset.katex))
|
link(rel="stylesheet" type="text/css" href=url_for(theme.asset.katex))
|
||||||
script(src=url_for(theme.asset.katex_copytex))
|
script(src=url_for(theme.asset.katex_copytex))
|
||||||
link(rel="stylesheet" type="text/css" href=url_for(theme.asset.katex_copytex_css))
|
|
||||||
script.
|
script.
|
||||||
(() => {
|
(() => {
|
||||||
document.querySelectorAll('#article-container span.katex-display').forEach(item => {
|
document.querySelectorAll('#article-container span.katex-display').forEach(item => {
|
||||||
|
|||||||
Loaded 3 of 10 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user