Coder Social home page Coder Social logo

saicaca / hexo-theme-vivia Goto Github PK

View Code? Open in Web Editor NEW
349.0 349.0 43.0 16.89 MB

A clean and minimalist theme for Hexo.

Home Page: https://saicaca.github.io/vivia-preview/

License: MIT License

EJS 35.08% JavaScript 9.68% Stylus 55.25%
blog dark-theme hexo hexo-theme minimalist theme

hexo-theme-vivia's Introduction

🌱About me

  • Student majoring in Software Engineering
  • Golang, Java developer
  • Amateur UI designer and front-end developer
  • Contact: echo 'emVwaHlpcmRAZ21haWwuY29tCg==' | base64 -d
  • Lang: English, 中文, 少し日本語

hexo-theme-vivia's People

Contributors

1an8r0wn avatar fromann avatar hypercherry avatar lynxcatthethird avatar movelocity avatar saicaca avatar yy4382 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hexo-theme-vivia's Issues

功能:公式编辑

我编辑了几个公式块但是没办法正常显示,请问是不支持公式块吗?
image

功能:调整页宽

对于一些高分辨率的大屏,文章两边会空出一大截。希望能加入宽屏模式

侧边栏sidebar中必须要有滚动的组件

侧边栏

sidebar:
widgets: # 需要启用的组件 (profile, category, tag, archive, recent_posts)
normal: # 随页面滚动的组件
- profile
sticky: # 固定在页面顶部的组件
- category
- tag

无法从配置中取消随页面滚动的组件
如果我在配置中不填写,或者注释掉normal部分,或者单个组件,例如profile就无法加载
只能修改对应逻辑代码

我需要当normal或者sticky可以为空

Plugin load failed: hexo-word-counter

作者大大您好,请问部署vercel报错
Plugin load failed: hexo-word-counter
Error: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /vercel/path0/node_modules/hexo-word-counter/index.node)
是什么原因呢。本地hexo s没有任何问题,问别人说vercel不支持这么底层的操作,这个主题不能部署在vercel上面吗。

联想截图_20230711201759.png

Bug:在部分分辨率屏幕下会导致屏幕右侧留白

测试分辨率:1025*753(平板设备)

在某些分辨率中的屏幕中,若水平像素值不足以在footer右侧留下足够的缝隙,将会导致右侧出现一段留白
image

.back-to-top-wrapper
width: 60px
height: 60px
position: absolute
right: -84px
top: 0

由于right: -84px 将会导致右侧被强制撑开一段距离,造成留白,可以改为right:0px(紧靠main_grid)或者position:fixed+right:0px(紧靠全屏)来解决问题

这个问题在Fuwari中亦存在:fuwari/src/components/control/BackToTop.astro

类型报错,但看不出来哪有问题(

你好,打扰了,我按照教程安装后,使用hexo g生成静态页面时会提示上述错误。但不知道是哪一步操作出了问题?
静待回复,非常感谢!
image
image

ERROR Script load failed: node_modules/hexo-theme-vivia/scripts/color-generate.js

hexo new page about
INFO Validating config
ERROR Script load failed: node_modules/hexo-theme-vivia/scripts/color-generate.js
/cjdata/my_blogger/blog/node_modules/colorjs.io/dist/color.cjs:349
format.type ||= "function";
^^^

SyntaxError: Unexpected token '||='
at wrapSafe (internal/modules/cjs/loader.js:988:16)
at Module._compile (internal/modules/cjs/loader.js:1036:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19)
at req (/cjdata/my_blogger/blog/node_modules/hexo/lib/hexo/index.js:292:23)
at /cjdata/my_blogger/blog/node_modules/hexo-theme-vivia/scripts/color-generate.js:1:80
at /cjdata/my_blogger/blog/node_modules/hexo/lib/hexo/index.js:305:14
at tryCatcher (/cjdata/my_blogger/blog/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/cjdata/my_blogger/blog/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/cjdata/my_blogger/blog/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/cjdata/my_blogger/blog/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/cjdata/my_blogger/blog/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/cjdata/my_blogger/blog/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/cjdata/my_blogger/blog/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/cjdata/my_blogger/blog/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/cjdata/my_blogger/blog/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:464:21)

Bug: 日期和其它信息对不齐

现象: 如图:日期和其它信息(分类、词数)对不齐

image

出逝网址:https://lynxcatthethird.github.io/

主题版本:https://github.com/LynxCatTheThird/hexo-theme-vivia/tree/dev

_config.yml:

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

# Site
title: LynxCatTheThird 的小窝儿subtitle: '欢迎来到 LynxCatTheThird 的小窝儿'
description: '我是山猫三号,一个来自一百零三世纪的强人工智能。'
keywords:
author: LynxCatTheThird
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: https://lynxcatthethird.github.io/
permalink: article/:abbrlink/
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
  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: vivia
abbrlink:
  alg: crc32      #support crc16(default) and crc32
  rep: hex        #support dec(default) and hex
  drafts: false   #(true)Process draft,(false)Do not process draft. false(default) 
  # Generate categories from directory-tree
  # depth: the max_depth of directory-tree you want to generate, should > 0
  auto_category:
    enable: true  #true(default)
    depth:        #3(default)
    over_write: false 
  auto_title: false #enable auto title, it can auto fill the title by path
  auto_date: false #enable auto date, it can auto fill the date by time today
  force: false #enable force mode,in this mode, the plugin will ignore the cache, and calc the abbrlink for every post even it already had abbrlink. This only updates abbrlink rather than other front variables.
nofollow:
  enable: true
  field: site
  exclude:
    # - 'exclude1.com'
    # - 'exclude2.com'
minify:
  preview: true ## 本地预览时是否压缩  exclude: ['*.min.*']
  js:
    enable: true
    sourceMap:
      enable: false ## 生成 sourceMap
      ## 将 sourceMappingURL 插入压缩后的 js 文件,如果为 false 则需要在浏览器开发者工具中手动添加 sourceMap
      sourceMappingURL: false ## //# sourceMappingURL=xxx.js.map
    ## 详细配置: https://github.com/terser/terser#minify-options
    options: {}
  css:
    enable: true
    ## 详细配置: https://github.com/clean-css/clean-css#compatibility-modes
    options: {}
  html:
    enable: true
    ## 详细配置: https://github.com/kangax/html-minifier#options-quick-reference
    options:
      minifyJS: true # Compressed JavaScript
      minifyCSS: true # CSS Compressed
      removeComments: true # Remove the comments
      collapseWhitespace: true # Delete any extra space
      removeAttributeQuotes: true # Delete attribute quotes
  image:
    enable: true
    svg:
      enable: true
      ## 详细配置: https://github.com/imagemin/imagemin-svgo#imageminsvgooptionsbuffer
      options: {}
    jpg:
      enable: true
      ## 详细配置: https://github.com/imagemin/imagemin-jpegtran#options
      options: {}
    png:
      enable: true
      ## 详细配置: https://github.com/imagemin/imagemin-pngquant#options
      options: {}
    gif:
      enable: true
      ## 详细配置: https://www.npmjs.com/package/imagemin-gifsicle#options
      options: {}
    webp:
      enable: true
      ## 详细配置: https://github.com/imagemin/imagemin-webp#options
      options: {}
  font:
    enable: false
    ## 详细配置: https://github.com/Lete114/fontmin-spider#api
    options: {}
feed:
  enable: true
  type: atom
  path: atom.xml
mmedia:
  video:
    default:
      width: 100%
  meting:
    js: https://cdn.staticfile.org/meting/2.0.1/Meting.min.js
  aplayer:
    js: https://cdn.staticfile.org/aplayer/1.10.1/APlayer.min.js
    css: https://cdn.staticfile.org/aplayer/1.10.1/APlayer.min.css
  dplayer:
    js: https://cdn.staticfile.org/dplayer/1.27.1/DPlayer.min.js
    hls_js: https://cdn.staticfile.org/hls.js/1.4.10/hls.min.js
    dash_js: https://jsd.onmicrosoft.cn/npm/dashjs/dist/dash.all.min.js
    shaka_dash_js: https://cdn.staticfile.org/shaka-player/4.3.8/shaka-player.compiled.min.js
    flv_js: https://cdn.staticfile.org/flv.js/1.6.2/flv.min.js
    webtorrent_js: https://jsd.onmicrosoft.cn/npm/webtorrent/webtorrent.min.js
  artplayer:
    js: https://cdn.staticfile.org/artplayer/5.0.9/artplayer.min.js
    hls_js: https://cdn.staticfile.org/hls.js/1.4.10/hls.min.js
    dash_js: https://jsd.onmicrosoft.cn/npm/dashjs/dist/dash.all.min.js
    shaka_dash_js: https://cdn.staticfile.org/shaka-player/4.3.8/shaka-player.compiled.min.js
    flv_js: https://cdn.staticfile.org/flv.js/1.6.2/flv.min.js
    webtorrent_js: https://jsd.onmicrosoft.cn/npm/webtorrent/webtorrent.min.js
    default:
      style: width:100%;aspect-ratio:16/9;center
      contents:
        autoSize: false
        autoMini: false
        fullscreen: true
        fullscreenWeb: true
        flip: true
        playbackRate: true
        setting: true
        aspectRatio: true
        screenshot: true
  bilibili:
    default:
      page: 1
      danmaku: true
      allowfullscreen: allowfullscreen
      sandbox: allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups
      width: 100%
      margin: auto
  xigua:
    default:
      autoplay: false

# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
  - type: git
    repository: [email protected]:LynxCatTheThird/lynxcatthethird.github.io.git
    branch: main
  - type: git
    repository: [email protected]:ara1145/ara1145.github.io.git
    branch: main

_config.vivia.yml:

# Header
menu:
  Home: /
  Archives: /archives
  About: /about
rss: /atom.xml

home:
  style: default           # default, detail

favicon:                   # 填写网站图标的路径,根路径为本项目的 source/ 文件夹。Path to the custom favicon (e.g. "/favicon.png" if your favicon file is located at /source/favicon.png)
previewMode: false         # 调色板,默认开启。配置完毕可以手动关闭。color setting palatte, you can turn it off after you have chosen a favoriable color hue
hue: 270                   # 调色的值[1, 360],手动调到合适的值可以在这里设置为默认颜色。请不要设置为0,不然会出现奇怪的bug。The hue of the theme color (e.g. red: 0, orange: 60, blue: 260, purple: 300, pink: 345)

# Banner
banner:
  enable: true             # Display banner
  url: https://s2.hdslb.com/bfs/article/af02e5189cac3c20945b0b55d4a04a10ddfc4dd9.jpg@1e_1c.webp  # 背景图,根目录是本项目的 source/ 文件夹
  position: center         # Specifies the alignment of the image, see the "object-position" property in CSS
  onAllPages: false         # Display banner on all pages

# Personal info
avatar: https://s2.hdslb.com/bfs/album/335657374a640f1748c290003b8851caa7db114d.png@550w_550h_0e_1c.webp
links:
  - name: Twitter
    icon: fa-brands fa-twitter      # Find icon codes at https://fontawesome.com/search
    url: https://twitter.com/LynxCatTheThird
  - name: GitHub
    icon: fa-brands fa-github
    url: https://github.com/LynxCatTheThird

# 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

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

# Math
math:                        # 应该没有人想要同时启用两种渲染方式吧?
  katex:
    enable: true             # KaTex 性能优秀,建议使用 Katex
    copytex: true            # 启用后复制 Katex 元素会复制 Tex 代码而非显示的文本
    mhchem: true             # 启用后可以不受 LaTeX 的语法束缚,用最简明的代码写出规范的化学方程式
  mathjax:
    enable: false            # MathJax 性能较差,不建议启用

# Comment system
comment:
  valine:
    enable: false
    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: true
    envID: https://twikoo.lynxcatthethird.eu.org/
    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

#Copyright
copyright: #<a target="_blank" rel="noopener" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" style="margin-inline:5px" title="本站采用知识共享署名-非商业性使用-相同方式共享4.0国际许可协议进行许可"><img src="https://img.shields.io/badge/Copyright-BY--NC--SA%204.0-d42328?style=flat&amp;logo=Claris"></a>

package.json

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "hexo generate",
    "clean": "hexo clean",
    "deploy": "hexo deploy",
    "server": "hexo server"
  },
  "hexo": {
    "version": "6.3.0"
  },
  "dependencies": {
    "colorjs.io": "^0.4.5",
    "hexo": "^6.3.0",
    "hexo-deployer-git": "^4.0.0",
    "hexo-filter-nofollow": "^2.0.2",
    "hexo-generator-archive": "^2.0.0",
    "hexo-generator-category": "^2.0.0",
    "hexo-generator-feed": "^3.0.0",
    "hexo-generator-index": "^3.0.0",
    "hexo-generator-tag": "^2.0.0",
    "hexo-minify": "^1.8.1",
    "hexo-pangu": "^0.2.2",
    "hexo-renderer-ejs": "^2.0.0",
    "hexo-renderer-marked": "^6.0.0",
    "hexo-renderer-stylus": "^3.0.0",
    "hexo-server": "^3.0.0",
    "hexo-tag-mmedia": "^1.2.1",
    "hexo-word-counter": "^0.1.0",
    "stylus": "^0.60.0"
  }
}

color-generate.js 获取config中配置的 “hue” 变量失败

报错

在 color-generate.js 中

hexo.extend.filter.register('stylus:renderer', function(style) {
    let hue = hexo.config.theme_config.hue;
    ...

hue 变量看起来无法获取,从而导致 css 无法正常生成。报错如下:

neko@hp822 ~/C/Nya-Blog (main)> hexo s
INFO  Validating config
INFO  Start processing
INFO  Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.
ERROR Asset render failed: css/style.css
TypeError: Cannot read properties of undefined (reading 'hue')
    at Hexo.<anonymous> (/home/neko/Code/Nya-Blog/node_modules/hexo-theme-vivia/scripts/color-generate.js:14:40)
    at Filter.execSync (/home/neko/Code/Nya-Blog/node_modules/hexo/dist/extend/filter.js:72:36)
    at Hexo.execFilterSync (/home/neko/Code/Nya-Blog/node_modules/hexo/dist/hexo/index.js:394:35)
    at Renderer.<anonymous> (/home/neko/Code/Nya-Blog/node_modules/hexo-renderer-stylus/lib/renderer.js:54:24)
    at Renderer.use (/home/neko/Code/Nya-Blog/node_modules/stylus/lib/renderer.js:204:6)
    at Hexo.stylusFn (/home/neko/Code/Nya-Blog/node_modules/hexo-renderer-stylus/lib/renderer.js:54:6)
    at Hexo.tryCatcher (/home/neko/Code/Nya-Blog/node_modules/bluebird/js/release/util.js:16:23)
    at Hexo.ret (eval at makeNodePromisifiedEval (/usr/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:13:39)
    at /home/neko/Code/Nya-Blog/node_modules/hexo/dist/hexo/render.js:73:28
    at tryCatcher (/home/neko/Code/Nya-Blog/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/neko/Code/Nya-Blog/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/home/neko/Code/Nya-Blog/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/home/neko/Code/Nya-Blog/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/home/neko/Code/Nya-Blog/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/home/neko/Code/Nya-Blog/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/home/neko/Code/Nya-Blog/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/home/neko/Code/Nya-Blog/node_modules/bluebird/js/release/async.js:102:5)
    at Async.drainQueues [as _onImmediate] (/home/neko/Code/Nya-Blog/node_modules/bluebird/js/release/async.js:15:14)
    at process.processImmediate (node:internal/timers:478:21)

主题通过 npm install hexo-theme-vivia 安装。

主题配置文件

# Header
menu:
  Home: /
  Archives: /archives
  About: /about
rss: /atom.xml

home:
  style: default           # default, detail

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

# Banner
banner:
  enable: false            # Display banner
  url: /assets/banner.png
  position: center         # Specifies the alignment of the image, see the "object-position" property in CSS
  onAllPages: true         # Display banner on all pages

# Appearence
hue: 270                   # The hue of the theme color (e.g. red: 0, orange: 60, blue: 260, purple: 300, pink: 345)

# 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

# Widget behavior
archive_type: 'monthly'
recent_posts_limits: 5

# Personal info
avatar: 
author: NekoRectifer
subtitle: This is the subtitle
links:
  - name: Twitter
    icon: fa-brands fa-twitter      # Find icon codes at https://fontawesome.com/search
    url: https://twitter.com
  - name: Steam
    icon: fa-brands fa-steam
    url: https://store.steampowered.com
  - name: GitHub
    icon: fa-brands fa-github
    url: https://github.com

comment:
  valine:
    enable: false
    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

解决方法

将 hue 手动指定为 270 后,页面 css 正常生成。
let hue = 270;

关于页面汉化的一个小问题

最近在倒腾页面的时候,发现归档页面的这个Archive标题是固定的 ,想改成中文有点麻烦,需要到node_modules/hexo-theme-vivia/layout/_partial/archive.ejs进行修改,希望作者能把这个直接加到汉化里面
屏幕截图 2023-08-02 173457

屏幕截图 2023-08-02 174448

另外,真的真的特别喜欢这个主题,美炸了🥵

分类栏无法显示分类

使用的主题版本为 0.4.2
Hexo version: 7.0.0
给文章设置了对应的分类,但是分类栏中无法显示对应分类,请问我应该如何解决?
ABIH7SJS95{5M{3NHO}Y2WS

Markdown页内跳转跳不了

是我的问题还是不支持?

大概就是有一节标题为

## 5. 构建写好的 Extension

在文章最后一行有这么一句

[构建写好的 Extension](#5-构建写好的-extension)

在本地用VSCode预览时是可以正常跳转的,但是部署后就不行了。

关于一些功能的意见

偶然间发现了这个主题,同时折腾部署了一下,这个主题简直是好看到我的心吧上了,不过在部署的时候,发现了一些作者还未更新的地方,部分由于自己需要使用,所以自己写了下,希望作者看到后能够多多更新。
第一个是文章缩略图以及文章详细页面头图,最开始我没有用精简链接的那个插件,默认图片的路径是年/月/日/文章标题/图片名称,后面增加了精简链接的插件,图片路径更改为 path/图片名称。
阅读源码发现了这两个要修改的位置分别在article.ejs和gallery.ejs中,找到photo这个名称,这个名称就是图片链接的变量,原本的代码是直接获取文章头部的变量内容,但是由于在hexo编译后,会在路径前添加日期或者生成的唯一path,所以需要在此之前进行修改

    <% let date = new Date(post.date) %>
    <% let year =  date.getFullYear() %>
    <% let month = String(date.getMonth() + 1).padStart(2, '0') %>
    <% let day = String(date.getDate()).padStart(2, '0') %>
    <% let formattedDate = year + '/' + month + '/' + day + '/' %>
    <% let newPhoto = formattedDate + post.title + '/' + photo %>

第二个是搜索和目录,在待办清单上看到作者后期发布,希望作者加油,很期待这个主题的完全版本

关于Valine的配置

首先感谢作者提供这么好看的主题 🎉🎉🎉
关于Valine的配置,作者好像没有配置Valine的severURLs字段。
联想截图_20230712080553.png
现在问题是Failed to load resource: net::ERR_CONNECTION_RESET
联想截图_20230712080818.png
查阅了Valine的issue直接加serverURLs: '<%= theme.valine.serverURLs %>'会出现问题。
浏览了一圈vivia的站点好像也没有配置Valine的😥。

请问作者是如何在演示站配置Valine的呢,把us.leancloud.cn换成自己的域名不知道要怎么改

分类显示不完全

您好,主页显示分类不全,只能显示两个分类,
image

在build日志里面发现生成了对应分类的html文件
image

然后通过url访问也能进入
image

在本地启动预览,则能正常显示。
image

请问这个怎么解决。

關於新增文章中嵌入youtube iframe影片

首先先感謝大大提供這麼頂的介面!

想詢問在文章中嵌入youtube iframe影片的效果該如何使用markdown寫出,我目前試過

  1. {% youtube wbm1a_0Pnd8 %}
  2. [![Canchu](https://i.ytimg.com/vi/wbm1a_0Pnd8/maxresdefault.jpg)](https://youtu.be/wbm1a_0Pnd8 "Canchu")
  3. <iframe src="https://youtu.be/wbm1a_0Pnd8" width="700px" height="500px" frameborder="0" scrolling="no"> </iframe>

只有第二種有顯示出來但是也不是像demo的模樣
第一種還會拋出unknown block tag: youtube這樣的錯誤

要怎麼有下面這種樣子(包含youtube的播放按鈕等等的
截圖 2024-01-19 下午1 26 09

关于侧边栏目录的支持

首先感谢作者提供这么好看的主题 🎉🎉🎉
请问可以增加一个toc目录放在文章左边或者右边的功能吗?

分類欄位顯示問題

使用v0.4.2。
如題,文章實際上有被分類好,但是分類欄位顯示不出分類的標籤,除了在 _config.yml 裡面編輯category_map,還有需要做其他設定嗎?謝謝

image
image

font-awesome图标丢失

font-awesome的图标发生丢失
image

links:
  - name: GitHub
    icon: fa-brands fa-github
    url: https://github.com/DaydreamerH
  - name: Email
    icon: fa-brands fa-envelop
    url: xxx

同样也出现在末尾翻页条处
image
对应网站:https://daydreamerh.github.io/

获取图标报错如下:
image
显示跨域问题,是指定图标网站不公开资源了嘛?
(像是miku在引流
小白不懂,求大佬指教

Customizing favicon and logo

首先感谢作者提供这么好看的主题 🎉🎉🎉

我在 example_config.vivia.yml 中没有找到对应的配置,能否支持下。
image

关于无法成功使用 vivia,/layout/index.ejs /layout/_partial/article.ejs 报错

错误信息如下:

Unhandled rejection TypeError: /home/acerkaio/桌面/blog/blognew/themes/vivia/layout/index.ejs:2
    1| <% page.posts.each(function(post){ %>
 >> 2|   <%- partial('_partial/article', {post: post, index: true}) %>
    3| <% }) %>
    4| <% if (page.total > 1){ %>
    5|   <nav id="page-nav">

/home/acerkaio/桌面/blog/blognew/themes/vivia/layout/_partial/article.ejs:4
    2| 
    3| <article id="<%= post.layout %>-<%= post.slug %>" class="h-entry article article-type-<%= post.layout %>" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
 >> 4|   <% if (is_post() || theme.home.style == 'detail') { %>
    5|     <%- partial('post/gallery') %>
    6|   <% } %> 
    7|   <div class="article-inner">

Cannot read properties of null (reading 'home')
    at eval ("/home/acerkaio/桌面/blog/blognew/themes/vivia/layout/_partial/article.ejs":20:31)
    at article (/home/acerkaio/桌面/blog/blognew/node_modules/ejs/lib/ejs.js:703:17)
    at _View._compiledSync (/home/acerkaio/桌面/blog/blognew/node_modules/hexo/lib/theme/view.js:132:24)
    at _View.renderSync (/home/acerkaio/桌面/blog/blognew/node_modules/hexo/lib/theme/view.js:59:25)
    at Object.partial (/home/acerkaio/桌面/blog/blognew/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
    at eval ("/home/acerkaio/桌面/blog/blognew/themes/vivia/layout/index.ejs":13:17)
    at _Query.forEach (/home/acerkaio/桌面/blog/blognew/node_modules/warehouse/lib/query.js:36:7)
    at eval ("/home/acerkaio/桌面/blog/blognew/themes/vivia/layout/index.ejs":10:19)
    at index (/home/acerkaio/桌面/blog/blognew/node_modules/ejs/lib/ejs.js:703:17)
    at _View._compiled (/home/acerkaio/桌面/blog/blognew/node_modules/hexo/lib/theme/view.js:136:50)
    at _View.render (/home/acerkaio/桌面/blog/blognew/node_modules/hexo/lib/theme/view.js:39:17)
    at /home/acerkaio/桌面/blog/blognew/node_modules/hexo/lib/hexo/index.js:64:21
    at tryCatcher (/home/acerkaio/桌面/blog/blognew/node_modules/bluebird/js/release/util.js:16:23)
    at /home/acerkaio/桌面/blog/blognew/node_modules/bluebird/js/release/method.js:15:34
    at RouteStream._read (/home/acerkaio/桌面/blog/blognew/node_modules/hexo/lib/hexo/router.js:47:5)
    at Readable.read (node:internal/streams/readable:504:12)
    at resume_ (node:internal/streams/readable:1007:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

我使用 hexo init 后下载 vivia 主题 放入 themes 文件夹,更改 _config.yml 文件 hexo s 后报错。(已新建 about 页面)

求助。

文档描述问题

似乎主题里面那个yml要叫做_config.yml,否则ejs中theme为空,是nodejs版本问题吗?

提问

请问hexo g总会出现类似这样的报错可能是什么原因呢
谢谢 nodejs不是很熟悉

INFO  Validating config
INFO  Start processing
INFO  Files loaded in 553 ms
ERROR 
TypeError: /mnt/d/ubuntu-tmp/zengguanning/themes/vivia/layout/page.ejs:1
 >> 1| <%- partial('_partial/article', {post: page, index: false}) %>

/mnt/d/ubuntu-tmp/zengguanning/themes/vivia/layout/_partial/article.ejs:5
    3| 
    4| <article id="<%= post.layout %>-<%= post.slug %>" class="h-entry article article-type-<%= post.layout %>" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
 >> 5|   <% if (is_post() || theme.home.style == 'detail') { %>
    6|     <%- partial('post/gallery') %>
    7|   <% } %> 
    8|   <div class="article-inner">

Cannot read properties of undefined (reading 'style')
    at eval ("/mnt/d/ubuntu-tmp/zengguanning/themes/vivia/layout/_partial/article.ejs":23:36)
    at article (/mnt/d/ubuntu-tmp/zengguanning/node_modules/ejs/lib/ejs.js:703:17)
    at _View._compiledSync (/mnt/d/ubuntu-tmp/zengguanning/node_modules/hexo/lib/theme/view.js:132:24)
    at _View.renderSync (/mnt/d/ubuntu-tmp/zengguanning/node_modules/hexo/lib/theme/view.js:59:25)
    at Object.partial (/mnt/d/ubuntu-tmp/zengguanning/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
    at eval ("/mnt/d/ubuntu-tmp/zengguanning/themes/vivia/layout/page.ejs":10:17)
    at page (/mnt/d/ubuntu-tmp/zengguanning/node_modules/ejs/lib/ejs.js:703:17)
    at _View._compiled (/mnt/d/ubuntu-tmp/zengguanning/node_modules/hexo/lib/theme/view.js:136:50)
    at _View.render (/mnt/d/ubuntu-tmp/zengguanning/node_modules/hexo/lib/theme/view.js:39:17)
    at /mnt/d/ubuntu-tmp/zengguanning/node_modules/hexo/lib/hexo/index.js:64:21
    at tryCatcher (/mnt/d/ubuntu-tmp/zengguanning/node_modules/bluebird/js/release/util.js:16:23)
    at /mnt/d/ubuntu-tmp/zengguanning/node_modules/bluebird/js/release/method.js:15:34
    at RouteStream._read (/mnt/d/ubuntu-tmp/zengguanning/node_modules/hexo/lib/hexo/router.js:47:5)
    at Readable.read (node:internal/streams/readable:496:12)
    at resume_ (node:internal/streams/readable:999:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

文章头图

图片
像这种头图是怎么做的啊,是在front-matter里面加一行什么配置吗

对主题页面配置文件的修改无效

嗯,我想在主页的某个地方添加Aplayer播放器,但是由于vivia通过npm安装,我又采取把hexo工作目录直接push到仓库,再由netlify编译静态页面的方式。git push默认忽略.node_modules(也不可能让它一起传上去)而vivia的页面配置文件layout/*.ejs 在这里面,所以本地做修改无效。有没有什么解决方法?
另外 考不考虑加入pjax支持?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.