saicaca / hexo-theme-vivia

A clean and minimalist theme for Hexo.
https://saicaca.github.io/vivia-preview/
MIT License
363 stars 44 forks source link

Hue not applying / 色调不适用 #81

Open Unbloated opened 19 hours ago

Unbloated commented 19 hours ago

First of all, thanks alot for the theme, it's really pretty! / 首先,非常感谢你的主题,它真的很漂亮!

It seems like even thought I keep setting the hue and doing hexo g, I keep seeing the default color on my website. 看来,即使我不断设置色调并进行 “hexo g ”操作,我在网站上看到的仍然是默认颜色。

image

Here's what is happening, versus what is supposed to happen / 以下是正在发生的事情与应该发生的事情的对比情况 : image What currently happens, the hue is not set even thought it's written in the config / 目前发生的情况是,色调没有设置,即使配置中已写明

image What it should have looked like, meanwhile previewMode: true is currently enabled / 在当前启用 previewMode:true 的情况下,它应该是什么样子的

_config.vivia.yml

# Header
menu:                      # Links in the navigation bar
  Home: /
  Archives: /archives
  About: https://unbloated.lol
rss: /

home:
  style: detail           # default, detail

favicon: /favicon.png                  # Path to the custom favicon relative to /source (e.g. "/favicon.png" if your favicon file is located at /source/favicon.png)

# Banner
banner:
  enable: true                  # Display banner
  url: /banner.jpg                # Path to the banner image relative to /source. Web url is also supported
  position: center               # Specifies the alignment of the image, see the "object-position" property in CSS
  onAllPages: true               # Display banner on all pages instead of only the home page

# Appearance
hue: 0                        # The hue of the theme color (e.g. red: 0, orange: 60, blue: 260, purple: 300, pink: 345)
                                 # Visit `saicaca.github.io/vivia-preview` to preview the theme color
previewMode: false

# Personal info
avatar: /avatar.png                            # Path to the avatar image relative to /source
author: Unbloated
subtitle: Silly odd but curious champ.
links:
  - name: Matrix
    icon: fa-solid fa-comment          # Find icon codes at https://fontawesome.com/search
    url: https://matrix.to/#/@unbloated:matrix.org
  - name: Steam
    icon: fa-brands fa-steam
    url: https://steamcommunity.com/id/unbloated
  - name: Website
    icon: fa-solid fa-link
    url: https://unbloated.lol

# Sidebar
sidebar:
  widgets:                 # Plugins to be enabled (profile, category, tag, archive, recent_posts)
    normal:                # Scroll along with the page
      - profile
    sticky:                # Stick to the top of the page
      - category
      - tag
#      - archive
#      - recent_posts

# Sidebar Widget behavior
archive_type: 'monthly'
recent_posts_limits: 5
categories:
  max_depth: 2             # Maximum depth of categories displayed in the widget (null for unlimited)

# Third-party comment system
comment:
  valine:
    enable: false         # Enable Valine comment system
    appId: 
    appKey: 
    placeholder: Just go go
    pageSize: 10
    highlight: true
    serverURLs: 
    # Other supported parameters can be added here if needed
    # Visit https://valine.js.org/configuration.html for more details
  twikoo:
    enable: false          # Enable Twikoo comment system
    envID:
    region:
    path: location.pathname
    lang:
    # See also: https://github.com/imaegoo/twikoo

#Analytics
gauges_analytics: false
google_analytics: false #UA-xxxxxx
baidu_analytics: false # ddxxxxxxxxxxxxxxxxx In the https://hm.baidu.com/hm.js? Afterwards
# analytics are bad :(

_config.yml

title: Unbloated's Blog
subtitle: 'Yes, really!'
description: "Hey there! You just stumbled across my blog. If you're the sort of being bored, come here check out my stuff!"
keywords: null
author: Unbloated
language: en
timezone: ''
url: https://unbloated.lol
permalink: ':year/:month/:day/:title/'
permalink_defaults: null
pretty_urls:
  trailing_index: true
  trailing_html: true
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: ':lang'
skip_render: null
new_post_name: ':title.md'
default_layout: post
titlecase: false
external_link:
  enable: true
  field: site
  exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
syntax_highlighter: highlight.js
highlight:
  line_number: true
  auto_detect: false
  tab_replace: ''
  wrap: true
  hljs: false
prismjs:
  preprocess: true
  line_number: true
  tab_replace: ''
index_generator:
  path: ''
  per_page: 10
  order_by: '-date'
default_category: uncategorized
category_map: null
tag_map: null
meta_generator: true
date_format: DD-MM-YYYY
time_format: HH:mm:ss
updated_option: mtime
per_page: 0
pagination_dir: page
include: null
exclude: null
ignore: null
theme: vivia
deploy:
  type: ''

中文部分是用翻译器翻译的,所以可能不准确,如果有不明白的地方请告诉我,非常抱歉!

Unbloated commented 18 hours ago

End up after messing further, I think I found a fix, either I'm not sure if it was really made on purpose, or I'm just, terribly dumb. 最后,在进一步捣鼓之后,我想我找到了一个修复方法,但我不确定这是否真的是故意做出来的,或者我就是,笨得要命。

After setting the hue on the config, type this on your terminal : 在配置中设置色调后,在终端上键入 :

hexo clean
hexo g

...Did not thought that was that easy. But I'm keeping this here in case the creator of the theme wants to make it easier to directly generate, or for people who are dumb as me. It seems like when you change the hue, and generate, it does not do it, until you clean. Odd, but I guess I understand. ......没想到这么简单。但我还是把这个保留在这里,以防主题的创建者想让直接生成变得更容易,或者像我一样笨的人也能用上。 似乎当你改变色调并生成时,它并不会这样做,直到你进行清理。奇怪,但我想我能理解。

Again, kudos to the creator, this theme is awesome. / 再次感谢创作者,这个主题太棒了。