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:
Jerry
2022-06-12 01:07:09 +08:00
parent 945ea89685
commit 9a33e23a9c
10 changed files with 316 additions and 152 deletions

View File

@@ -71,7 +71,13 @@ hexo.extend.helper.register('injectHtml', function (data) {
return result
})
hexo.extend.helper.register('findArchivesTitle', function (menu) {
hexo.extend.helper.register('findArchivesTitle', function (page, menu, date) {
if (page.year) {
const dateStr = page.month ? `${page.year}-${page.month}` : `${page.year}`
const date_format = page.month ? hexo.theme.config.aside.card_archives.format : 'YYYY'
return date(dateStr, date_format)
}
const defaultTitle = this._p('page.archives')
if (!menu) return defaultTitle