Some adjustment I’ve made.
Migrate files from Jekyll
Move all files in the Jekyll _posts
folder to the source/_posts
folder.
Modify the new_post_name setting in _config.yml
:
1 | new_post_name: :year-:month-:day-:title.md |
Image align center
themes\next\source\css_schemes\Mist_posts-expanded.styl
1 | .post-body img { margin: auto; } |
More info: ref
Two images side by side
themes\next\source\css_common\components\tags\group-pictures.styl
1 | .page-post-detail .post-body .group-picture-column { |
In markdown post,
1 | {% gp 2-2 %} |
Disqus
https://disqus.com/admin/
Settings
--> General
--> Shoretname
--> Your website shortname is xxxxx-xxxxxxxxxx
themes/next/_config.yml
1 | disqus: |
Categories and Tags
1. Categories page
1 | $ hexo new page categories |
source/categories/index.md
1 | --- |
2. Tags page
1 | $ hexo new page tags |
source/tags/index.md
1 | --- |
3. Menu Settings
themes/next/_config.yml
1 | menu: |
4. Font Matter
Add categories and tags to each post. Such as
1 | --- |
More info: hexo doc
5. Remove lines in logo
themes/next/layout/_partials/header/brand.swig
1 | <div class="custom-logo-site-title"> |
6. Generate and deploy
1 | $ hexo clean && hexo deploy -g |
Don’t forget “-g”, we need to generate categories pages and tags pages before deployment.
7. Write a draft and publish
- Create a markdown file
1 | $ hexo new draft "Draft 01" |
- Write something and check it on local server
1 | $ hexo server --draft --open |
- Publish
1 | $ hexo publish Draft-01 |
More info: ref
8. hexo-browsersync
- Install
1 | $ npm install hexo-browsersync --save |
Once installed, you are no longer need to refresh your browser again. 😃
1 | $ hexo server --draft --open |
Make some changes in your markdown file and save. The browser is synchronized automaticlly. 🎉
More info: GitHub repo