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.31k stars 175 forks source link

主题配置文件问题 #41

Closed SungwaYu closed 3 years ago

SungwaYu commented 3 years ago

你好,我从ils升级到keep之后主题的配置文件好像不管用了。我按照keep官方文档里的主题配置文件来写我的主题配置文件,在开启code_copy之类的功能之后好像不管用,而且好以前在左边的目录也没有了。我记得这几个是不用装插件的吧。用的是esay hexo里hexo clean && hexo d -g这个命令部署的。能帮忙看下什么问题吗,谢谢。

XPoet commented 3 years ago

@SungwaYu 你当前使用是 keep 那个版本? 把你的主题配置文件发一份出来

XPoet commented 3 years ago

ILS -> Keep 主题源文件做了较大的改动,为了不影响正常使用,请使用最新的主题和主题配置文件

SungwaYu commented 3 years ago

在主页有进度条,进去了文章之后就很多都不生效(进度条,左边目录,代码复制)。

# ---------------------------------------------------------------------------------------
#  Your basic info
# ---------------------------------------------------------------------------------------
base_info:
  title: Sungwa's Blog
  author: Sungwa Yu
  url: https://sungwayu.github.io/

# ---------------------------------------------------------------------------------------
# Theme style settings
# ---------------------------------------------------------------------------------------
style:
  # Theme primary color
  primary_color: '#0066CC'

  # Avatar (You can use local image or image external link)
  avatar: /images/avatar.png

  # Favicon (You can use local image or image external link)
  favicon: /images/logo.png

  # Article image align position, value: left | center
  article_img_align: left

  # Left side width
  left_side_width: 260px

  # Content area max width
  content_max_width: 920px

  # Mouse hover
  hover:
    shadow: true   # shadow effect when the mouse hover
    scale: false    # scale effect when the mouse hover

  # First screen
  first_screen:
    enable: true
    background_img: /images/bg.svg
    description: Welcome to My Blog

  # Scroll style settings
  scroll:
    progress_bar:
      enable: true
    percent:
      enable: true

# ---------------------------------------------------------------------------------------
# Social contact link
# ---------------------------------------------------------------------------------------
social_contact:
  enable: true
  links:
    github: https://github.com/SungwaYu         # your GitHub URL
    weixin:          # your WeChat QR-Code URL
    qq:              # your QQ QR-Code URL
    weibo:           # your WeiBo URL
    zhihu:           # your ZhiHu URL
    twitter:         # your twitter URL
    facebook:        # your facebook URL
    email: yusungwa@gmail.com          # your email

# ---------------------------------------------------------------------------------------
# Navigation menu
# ---------------------------------------------------------------------------------------
menu:
  Home: /
  Archives: /archives
  Categories: /categories
  # Tags: /tags
  # Links: /links
  About: /about
  # Changelog: /changelog
  # ......

# ---------------------------------------------------------------------------------------
# Home page article block display settings
# ---------------------------------------------------------------------------------------
home_article:
  category:
    enable: true     # show category in home page article block
    limit: 3          # max number of categories shown in home page article block
  tag:
    enable: true     # show tags in home page article block
    limit: 5          # max number of tags shown in home page article block

# ---------------------------------------------------------------------------------------
# Code copy
# ---------------------------------------------------------------------------------------
code_copy:
  enable: true
  style: mac        # values: default | mac

# ---------------------------------------------------------------------------------------
# Table of Contents in the Sidebar
# ---------------------------------------------------------------------------------------
toc:
  enable: true

  # Automatically add list number to toc.
  number: true

  # If true, all level of TOC in a post will be displayed, rather than the activated part of it.
  expand_all: true

# ---------------------------------------------------------------------------------------
# Post copyright info
# ---------------------------------------------------------------------------------------
copyright_info:
  enable: false

# ---------------------------------------------------------------------------------------
# Post word count
# Dependencies: hexo-wordcount
# See: https://github.com/willin/hexo-wordcount
# ---------------------------------------------------------------------------------------
post_wordcount:
  enable: true
  wordcount: true  # word count, one article
  min2read: true   # time to read, one article

# ---------------------------------------------------------------------------------------
# Website count
# ---------------------------------------------------------------------------------------
website_count:
  # busuanzi
  # See: http://ibruce.info/2015/04/04/busuanzi/
  busuanzi_count:
    enable: true
    site_uv: false
    site_pv: false
    page_pv: true

# ---------------------------------------------------------------------------------------
# Local Search
# Dependencies: hexo-generator-searchdb
# See: https://github.com/theme-next/hexo-generator-searchdb
# ---------------------------------------------------------------------------------------
local_search:
  enable: true
  trigger: auto
  unescape: false
  preload: true     # Preload the search data when the page loads
# ---------------------------------------------------------------------------------------
# Comment plugin
# ---------------------------------------------------------------------------------------
comment:
  # Valine
  # See: https://github.com/xCss/Valine
  valine:
    enable: false
    appid:                # your leancloud application appid
    appkey:               # your leancloud application appkey
    placeholder:          # your placeholder

  # Gitalk
  # See: https://github.com/gitalk/gitalk
  gitalk:
    enable: false
    github_id:             # GitHub repo owner
    repository:            # Repository name to store issues
    client_id:             # GitHub Application Client ID
    client_secret:         # GitHub Application Client Secret

  # Twikoo
  # See: https://github.com/imaegoo/twikoo
  twikoo:
    enable: false
    env_id:                # Tencent Cloud environment id
    region:                # environment region. If select Guangzhou, fill in "ap-guangzhou".

# ---------------------------------------------------------------------------------------
# RSS
# Dependencies: hexo-generator-feed
# See: https://github.com/hexojs/hexo-generator-feed
# ---------------------------------------------------------------------------------------
rss:
  enable: false

# ---------------------------------------------------------------------------------------
# Lazyload image
# ---------------------------------------------------------------------------------------
lazyload:
  enable: false

# ---------------------------------------------------------------------------------------
# CDN
# ---------------------------------------------------------------------------------------
cdn:
  enable: false

# ---------------------------------------------------------------------------------------
# PJAX
# ---------------------------------------------------------------------------------------
pjax:
  enable: false

# ---------------------------------------------------------------------------------------
# Footer settings
# ---------------------------------------------------------------------------------------
footer:
  since: 2020

# ---------------------------------------------------------------------------------------
# Keep version (Please don't modify)
# ---------------------------------------------------------------------------------------
version: 3.3.0
XPoet commented 3 years ago

@SungwaYu 你的主题配置文件没问题。

看了下你的网站,除 home 页外,其他页面都存在JS等资源不存在的加载错误。

image

原因是你的资源路径配置导致的。

你的网站: image

正常的引用是: image

注意看:正确的路径前面有:"/"

XPoet commented 3 years ago

把你的 Hexo 配置文件也发一份我看下

XPoet commented 3 years ago

或者你直接在主题配置文件里开启 CDN,使用 CDN 的资源路径,就不用管hexo配置这些问题了

SungwaYu commented 3 years ago

@XPoet 解决了,relative_link: 这个我之前改成true了,现在改成false就好了。谢谢。