XPoet / hexo-theme-keep

:rainbow: A simple and light theme for Hexo. It makes you more focused on writing.
https://xpoet.cn
GNU Affero General Public License v3.0
1.34k stars 180 forks source link

许可链接失效 #257

Closed inuyasha-660 closed 1 year ago

inuyasha-660 commented 1 year ago

Issue Checklist | Issue 检查清单

Expected behavior | 预期行为

正确跳转至CC BY-NC-SA 4.0 : https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh-hans

Actual behavior | 实际行为

跳转页面404 ,https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh

Steps to reproduce the behavior | 重现步骤

  1. 主题_config.yml中开启copyright_info
  2. 打开文章底部CC BY-NC-SA 4.0 链接

Node.js and NPM Information | Node.js 和 NPM 信息

v20.8.0
10.1.0

Hexo Configuration | Hexo 配置

# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
title: Inuyasha
subtitle: '欢迎来到我的博客,随便看看吧'
description: '相见时难别亦难,东风无力百花残'
keywords: 
author: Inuyasha
language: zh-CN
timezone: 'Asia/Shanghai'

# URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: http://blog.inuya.ltd
permalink: :year-:month-:day/:abbrlink.html
abbrlink:
  alg: crc32
  rep: hex
permalink_defaults:
pretty_urls:
  trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
  trailing_html: true # Set to false to remove trailing '.html' from permalinks

# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link:
  enable: true # Open external links in new tab
  field: site # Apply to the whole site
  exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
  enable: true
  exclude_languages:
    - mermaid
  line_number: true
  auto_detect: false
  tab_replace: ''
  wrap: true
  hljs: false
prismjs:
  enable: false
  preprocess: true
  line_number: true
  tab_replace: ''

# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
  path: ''
  per_page: 10
  order_by: -date

# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## updated_option supports 'mtime', 'date', 'empty'
updated_option: 'mtime'

# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page

# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: keep

search:
  path: search.json
  field: post
  content: true
  format: striptags

symbols_count_time:
  symbols: true
  time: true
  total_symbols: false
  total_time: false
  exclude_codeblock: false
  awl: 2
  wpm: 300
  suffix: "mins."

# Feed Atom
# npm install hexo-generator-feed
feed:
  type: atom
  path: atom.xml
  limit: 20

# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
  type: 'git'
  repo: git@github.com:inuyasha-660/inuyasha-660.github.io.git
  branch: master

Keep Configuration | Keep 配置

# Post copyright info
  copyright_info: true  # Option values: true | false

Other Information | 其它信息

chromium | Ubuntu 22.04 lts

修改themes/keep/layout/_partial/post/post-copyright-info.ejs

  </div>
                <div class="content tooltip" data-tooltip-content="CC BY-NC-SA 4.0">
                    <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh-hans">
                        <i class="fa-brands fa-creative-commons"></i>
                        <i class="fa-brands fa-creative-commons-by"></i>
                        <i class="fa-brands fa-creative-commons-nc"></i>
                        <i class="fa-brands fa-creative-commons-sa"></i>

<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh-hans">中的链接替换成正确的即可解决问题

XPoet commented 1 year ago

该问题已修复,请使用 v3.8.2