title | version | permalink | id | lang |
---|---|---|---|---|
Services |
1.4.0 |
en/services |
5 |
en |
"Material" has built in lots of Integrated Services. You can easily set up it.
First, you should install the plugin hexo-generator-feed. Read the plugin's README.md
to install and configure it.
Then configure theme config
url: rss with the URI.
Use this to pin post at the top of the list of posts.
If you want to use this WIP feature, please install hexo-helper-post-top
:
npm install hexo-helper-post-top --save
Now you can use front-matter
top: true
to pin your posts what you want to.
You can configure third-party services by navigating to Integrated Services
in the theme config
Used to set up a comment system.
See comment system for more information.
use
:disqus
disqus_click
changyan
163gentie
orlivere
When Using
disqus_click
, post won't load Disqus automatically. The pages will load Disqus when the vistors click the button. This feature will help to improve some people's browse exprience from where they can't load Disqus normally, such as China.
The livere built in the Material is
city_verison
.
shortname
: the shortname of duoshuo and disquschangyan_appid
: the APPID of changyanchangyan_conf
: the CONF of changyanchangyan_thread_key_type
: path #identifier of posts.path
as default.gentie_productKey
: You can find the productkey ininstall code
at 163gentie's console, something likegentie_productKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
gentie_thread_key_type
: Default is path. If using ID, you should addid
front-matter for every post. Then 163gentie will use it as identifier.livere_data_uid
: You can find thedatd_uid
from the provided code.
Call the Google search engine to search your site.
search:
use: google
The hexo-generator-search plugin needs to be installed when using local search.
search:
use: local
Sign up for Swiftype. In your Swiftype installation code, you'll find a line like _st ( 'install', 'myKey', '2.0.0');
.
search:
use: swiftype
swiftype_key: myKey
Material theme has a built in Baidu's, Google's website analytics and CNZZ's analytics service.You can easily set the ID to enable it.
use
: Set which analytics you want to use. Available values are baidu | google | cnzzsite_id
: the site_id that analytics service provide.
- Google will give the
site ID
withUA-
begin;- Baidu will give your a JavaScript URI like
hm.js?xxxxxxxxx
andxxxxxxxx
is the site_id that you need.- in CNZZ's code, there will be
z_stat.php?id=xxxxxxxxxxxx
and&web_id=xxxxxxxxx
. Both of thesexxxxxxxx
should be the same. And thisxxxxxxxxx
is the site_id.
You should set the use
with nothing. Then you can add the analytics code in head.yml
. You can read the expert about how to use head.yml
.
Open the LeanCloud website and go to the registration page to register. After the mailbox is activated, click on the avatar to access the console page as following:
Create a new application (the default type is JavaScript SDK), click Apply to enter;
Create a Class named Counter
Note: ACL Permissions
must be unrestricted
You can find app_id
and app_key
in application -> Settings -> Application Key
.
leancloud:
enable: true
app_id: #app_id
app_key: #app_key
av_core_mini: "https://cdn1.lncld.net/static/js/av-core-mini-0.6.1.js"
Add your blog domain to
application -> Settings -> Security Center
to ensure data security calls.
To use the view statistics, simply set:
busuanzi:
enable: true
all_site_uv: false
post_pv: false
busuanzi_pure_mini_js: "https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"
Parameters are:
all_site_uv
: counts the number of unique visitors to the sitepost_pv
: the number of page views for each postbusuanzi_pure_mini_js
: You can save the js to your webserver or CDN, then set the URI here.