Required : nodejs and npm
Uexo Command Usage
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Usage: hexo <command> Commands: clean Remove generated files and cache. config Get or set configurations. deploy Deploy your website. generate Generate static files. help Get help on a command. init Create a new Hexo folder. list List the information of the site migrate Migrate your site from other system to Hexo. new Create a new post. publish Moves a draft post from _drafts to _posts folder. render Render files with renderer plugins. server Start the server. version Display version information.
Page - Markdown Markdown Cheat Sheet
1 2 3 4 5 6 7 hexo new page tags hexo new page categories hexo new page about hexo new "Post Name"
Post Header
1 2 3 4 5 6 title: My Hexo Note date: 2021-06-12 01:53:11 categories: hexo tags: hexo <!-- more -->
1 git clone https://github.com/theme-next/hexo-theme-next themes/next
NexT Config - themes/next/_config.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 minify: true pjax: true scheme: Gemini darkmode: auto copy_button: enable: true show_result: true style: mac mediumzoom: true busuanzi_count: enable: false enable: true
Google Analytics 1 2 google_analytics: tracking_id:
Login and Setup a Disqus Account: https://disqus.com/
1 2 3 4 disqus: enable: true shortname: ranger-chans-blog
1 npm install hexo-deployer-git --save
_config.yml
1 2 3 4 5 6 7 8 9 url: https://rangerz.github.io/blog deploy: type: git repo: git@github.com:rangerz/blog.git branch: github-pages message: Update blog at {{ now('YYYY-MM-DD HH:mm:ss') }}
1 npm install hexo-generator-sitemap --save
_config.yml
1 2 sitemap: path: sitemap.xml
1 npm install hexo-generator-feed --save
_config.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 feed: enable: true type: atom path: atom.xml limit: 20 hub: content: content_limit: 140 content_limit_delim: ' ' order_by: -date icon: icon.png autodiscovery: true template:
themes/next/_config.yml
themes/next/layout/_partials/sidebar/site-overview.swig
1 2 3 4 5 6 7 8 {% if theme.rss %} <div class ="feed-link motion-element" > <a href ="{{ url_for(theme.rss) }}" rel ="alternate" > <i class ="fa fa-rss" > </i > RSS </a > </div > {% endif %}
1 npm install hexo-autonofollow --save
_config.yml
1 npm install hexo-lazyload-image --save
_config.yaml
1 2 3 lazyload: enable: true onlypost: false
Google Search https://search.google.com/search-console/welcome
Input URL Prefix: https://rangerz.github.io/blog/
themes/next/layout/_partials/head/head.swig
1 <meta name ="google-site-verification" content ="aODVh6Swyz72uqikurLQBpNIqJO68gqxnPpEc2Pm9kI" />
1 npm install hexo-abbrlink --save
_config.yaml
1 2 3 4 5 permalink: posts/:abbrlink/ abbrlink: alg: crc32 rep: hex
1 npm install hexo-generator-searchdb --save
_config.yaml
1 2 3 4 5 search: path: search.xml field: post content: true format: html
themes/next/_config.yml
1 2 local_search: enable: true
robots.txt Add file: source/robots.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 User-agent: * Allow: / Allow: /about/ Allow: /archives/ Allow: /categories/ Allow: /tags/ Disallow: /images/ Disallow: /js/ Disallow: /css/ Disallow: /lib/ Sitemap: https://rangerz.github.io/blog/search.xml Sitemap: https://rangerz.github.io/blog/sitemap.xml