Leng
2021-08-17

About Lx

Hexo-Theme-Lx

logo

Github Release
Github License

Star me if you like.

Live Demo:

Stable:https://lx.js.org
Dev: https://lx.blleng.cn

Any problem: issue

Usage

Git clone

At theme blog root dir:

1
2
$ git clone https://github.com/blleng/hexo-theme-lx themes/lx
clone into 'themes/lx'...

Apply

Edit _config.yml:

1
theme: lx

Features

The description here is not complete. You should read the comment in themes/lx/_config.yml

Analytics

lx use Baidu and Google as analytics.

Usage:

Edit themes/lx/_config.yml:

1
2
google_analytics: ... ##Google analytics ID
baidu_analytics: ... ##Baidu analytics ID
  1. Install the hexo-generator-searchdb:

At the blog root dir:

1
$ npm install hexo-generator-searchdb -s
  1. Edit themes/lx/_config.yml:
1
2
local_search:
enable: true

More features in themes/lx/_config.yml

Comment

lx use valine as comment system.
The official site: https://valine.js.org

Usage:

Edit themes/lx/_config.yml:

1
2
3
4
5
6
7
8
9
10
11
comment:
enable: true
appid: ... #leancloud appid
appkey: ... #leancloud appkey
notify: false
verify: false
placeholder: Say something #placeholder
avatar: identicon #the guest avatar
guest_info: nick,mail,link #optional choice
pageSize: 10
language: en

In the page front-matter:
comment: true

1
2
3
4
5
6
7
8
---
date: ...
title: ...
categories: ...
tags: ...
comment: true //use comment in this page
mathjax: ...
---

You should create an application in Leancloud to get appid and appkey.

Edit the themes/_config.yml

1
2
3
4
5
6
social:
enable: true
links:
Github: //the name of the link
icon: gihub //font-awesmome icon
link: ... //link

Mathjax

Support Mathematical formulas and chemical equations

Usage:

Editthemes/lx/_config.yml:

1
2
3
mathjax:
enable: true
cdn: //cdn.bootcss.com/mathjax/2.7.5/latest.js?config=TeX-MML-AM_SVG

In the page front-matter: mathjax: true

1
2
3
4
5
6
7
8
---
date: ...
title: ...
categories: ...
tags: ...
comment: ...
mathjax: true //use Mathjax in this page
---

Font

1
2
3
4
5
6
7
8
9
font:
enable: true
host: //fonts.googleapis.com
codes: ##the font of codes
enable: true
family: Fira Code
else:
enable: false
family:

Custom css

1
2
custom_css: false
# If true, Lx will load 'source/css/custom.styl'.