hexo-artitalk-test
v1.0.0
Published
一款Hexo插件,只需简单的配置即可快速生成Artitalk页面
Downloads
4
Readme
Hexo-Artitalk
一款Hexo插件,只需简单的配置即可快速生成Artitalk页面
前提: 必须先完成相应的配置 官方教程
使用
安装插件
npm install hexo-artitalk --save
添加配置信息
hexo配置文件或者主题配置文件,任选其一,若两个配置文件都写了配置信息,则hexo配置文件优先级高于主题配置文件
# Artitalk
## https://artitalk.js.org
artitalk:
enable: true # 是否开启
source: https://cdn.jsdelivr.net/npm/artitalk
title: Artitalk # 标题
path: artitalk/index.html # 路径
appid: # LeanCloud appId
appkey: # LeanCloud appKey
atEmoji: # 自定义表情包
option: # 根据官方文档选项配置 https://artitalk.js.org/settings.html
before: # artitalk 之前(请使用数组形式)
after: # artitalk 之后(请使用数组形式)
html: | # artitalk 之前 显示html与上方before选项类似(‘|’可用让你写多行)
其中option
选项的用法
以 官方文档中的lang
选项为示例
# Artitalk
## https://artitalk.js.org
artitalk:
enable: true
# ... 省略其他选项
option:
lang: en # 默认为zh 可选:en(英语)、es(西班牙语)
其中html
选项的用法
根据个人需求选择使用,如果你想在artitalk_main
之前自定义一些内容
比如:欢迎查看我都动态(支持html) 就会在
artitalk_main
之前添加如下内容(支持html标签)
# Artitalk
## https://artitalk.js.org
artitalk:
enable: true
# ... 省略其他选项
html: 欢迎查看我都动态
需要写多行?
# Artitalk
## https://artitalk.js.org
artitalk:
enable: true
# ... 省略其他选项
html: |
欢迎查看我都动态
这时多行显示
古诗
床前明月光,疑是地上霜。
举头望明月,低头思故乡。
什么?你发现它没有居中?
这时就需要用到before
或after
选项了
# Artitalk
## https://artitalk.js.org
artitalk:
enable: true
# ... 省略其他选项
before:
- '<style>.test{text-align: center;}</style>'
#- <link rel="stylesheet" href="你自定义的css文件路径.css">
after: # 同上,只是加载位置不同
html: |
<p class="test">欢迎查看我都动态</p>
<p class="test">这时多行显示</p>
<p class="test"> 古诗</p>
<p class="test">床前明月光,疑是地上霜。</p>
<p class="test">举头望明月,低头思故乡。</p>