Documentation

ยินดีต้อนรับเข้าสู่ documentation ของ hexo ถ้าคุณพบเจอปัญหาใดๆเวลาใช้ hexo
ไปดูข้อมูลได้ท่ี troubleshooting guide ไปเสนอ issue
ได้ที่ GitHub หรือไปเปิด topic ได้ท่ี Google Group

What is Hexo?

hexo เป็นกรอบบล็อกท่ีรวดเร็ว เรียบง่ายและมีประสิทธิภาพ
คุณเขียนโพสต์ได้ด้วยภาษา [Markdown](http://daringfireball
.net/projects/markdown/)(หรือภาษาอื่นๆ) และ hexo จะ generate
ไฟล์คงที่ท่ีประกอบด้วยธีมสวยงามภายในเวลาไม่กี่วินาที

Installation

การติดตั้ง hexo ต้องการเวลาหลายนาทีเท่านั้น ถ้าคุณพบเจอปัญหาท่ีแก้ไขไม่ได้
กรุณาไปเสนอ issue ได้ท่ี submit a GitHub issue

Requirements

การติดตั้ง hexo เป็นเรื่องง่ายๆ แต่คุณต้องการติดตั้งบางสิ่งก่อน:

  • Node.js (Should be at least Node.js 10.13, recommends 12.0 or higher)
  • Git

ถ้าคุณติดตั้งสองสิ่งนี้อยู่แล้วในคอม ขอแสดงความยินดี คุณจะติดตั้ง hexo ด้วย npm ได้อย่างนี้:

$ npm install -g hexo-cli

ถ้าคุณยังไม่ได้ติดตั้งสองสิ่งนี้ กรุณาปฏิบัติตามวิธีการใช้เพื่อติดตั้งทุกสิ่งท่ีต้องการ

For Mac users

คุณอาจจะพบปัญหาบ้างเมื่อ compiling กรุณาติดตั้ง Xcode จาก App Store ก่อน
เสร็จแล้วค่อยไปเปิด Xcode และ ไปถึง Preferences -> Download -> Command Line
Tools -> Install
เพื่อติดตั้งเครื่องมือคำสั่ง

Install Git

  • Windows: ดาวน์โหลด & ติดตั้ง git.
  • Mac: ติดตั้งด้วย Homebrew, [MacPorts]
    (http://www.macports.org/) หรือ [installer](http://sourceforge
    .net/projects/git-osx-installer/).
  • Linux (Ubuntu, Debian): sudo apt-get install git-core
  • Linux (Fedora, Red Hat, CentOS): sudo yum install git-core

Install Node.js

Node.js provides official installer for most platforms.

Alternative installation methods:

  • Windows: Install it with nvs (recommended) or nvm.
  • Mac: Install it with Homebrew or MacPorts.
  • Linux (DEB/RPM-based): Install it with NodeSource.
  • Others: Install it through respective package manager. Refer to the guide provided by Node.js.

nvs is also recommended for Mac and Linux to avoid possible permission issue.

Windows

If you use the official installer, make sure Add to PATH is checked (it’s checked by default).

Mac / Linux

If you encounter EACCES permission error when trying to install Hexo, please follow the workaround provided by npmjs; overriding with root/sudo is highly discouraged.

Linux

If you installed Node.js using Snap, you may need to manually run npm install in the target folder when initializing a blog.

Install Hexo

เมื่อความต้องการทุกอย่างได้ติดตั้งเรียบร้อยแล้ว คุณสามารถติดตั้ง hexo ด้วย npm

$ npm install -g hexo-cli

Required Node.js version

If you are stuck with older Node.js, you can consider installing a past version of Hexo.

Please note we do not provide bugfixes to past versions of Hexo.

We highly recommend to always install the latest version of Hexo and the recommended version of Node.js, whenever possible.

Hexo version Minimum (Node.js version) Less than (Node.js version)
7.0+ 14.0.0 latest
6.2+ 12.13.0 latest
6.0+ 12.13.0 18.5.0
5.0+ 10.13.0 12.0.0
4.1 - 4.2 8.10 10.0.0
4.0 8.6 8.10.0
3.3 - 3.9 6.9 8.0.0
3.2 - 3.3 0.12 unknown
3.0 - 3.1 0.10 or iojs unknown
0.0.1 - 2.8 0.10 unknown