Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(install): update local installation guide #2179

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
26 changes: 15 additions & 11 deletions source/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,28 @@ Once all the requirements are installed, you can install Hexo with npm:
$ npm install -g hexo-cli
```

### Advanced installation and usage

Advanced users may prefer to install and use `hexo` package instead.
The Hexo installed using the commands above is globally effective. If the installation is successful, executing the following command will display the version information.

``` bash
$ npm install hexo
$ hexo --version
```

Once installed, you can run Hexo in two ways:
{% note info %}
For advanced users familiar with npm, you can opt for a local installation of the `hexo` package instead of a global one. This approach can help avoid potential permission issues associated with global installations. For example, you can clone an existing Hexo blog repository, and after installing dependencies, execute Hexo commands using `npx hexo`.

1. `npx hexo <command>`
2. Linux users can set relative path of `node_modules/` folder:
``` bash
$ git clone https:/hexojs/hexo-starter
$ cd hexo-starter
$ npm install
$ npx hexo --version
```

``` bash
echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile
```
If you choose a local installation of `hexo`, Linux users can add the `node_modules` directory in the Hexo directory to their PATH environment variable to directly use `hexo <command>`:

then run Hexo using `hexo <command>`
```bash
echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to delete this part of modifying path setting. Modifying path may be a dangerous action. For example, some bin of node_modules overwrite some user's software, or some node_modules contain dangerous actions or even malicious code. For those familiar with Linux, they know how to do. For ordinary users, just recommend that they use npx hexo.

If anyone thinks npx hexo is too long, consider using alias

```
{% endnote %}

### Required Node.js version

Expand Down
1 change: 0 additions & 1 deletion source/docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Once Hexo is installed, run the following commands to initialize Hexo in the tar
``` bash
$ hexo init <folder>
$ cd <folder>
$ npm install
```

Once initialized, here's what your project folder will look like:
Expand Down
26 changes: 15 additions & 11 deletions source/ja/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,28 @@ Snapを使用してNode.jsをインストールした場合、ブログを[初
$ npm install -g hexo-cli
```

### 高度なインストール方法

Node.jsに慣れたユーザーであれば、代わりに`hexo`パッケージをインストールして使用することを好むかもしれません。
The Hexo installed using the commands above is globally effective. If the installation is successful, executing the following command will display the version information.

``` bash
$ npm install hexo
$ hexo --version
```

インストール後、次の2つの方法でHexoを実行できます:
{% note info %}
For advanced users familiar with npm, you can opt for a local installation of the `hexo` package instead of a global one. This approach can help avoid potential permission issues associated with global installations. For example, you can clone an existing Hexo blog repository, and after installing dependencies, execute Hexo commands using `npx hexo`.

1. `npx hexo <command>`
2. Linuxユーザーは`node_modules/`フォルダの相対パスを設定できます:
``` bash
$ git clone https:/hexojs/hexo-starter
$ cd hexo-starter
$ npm install
$ npx hexo --version
```

``` bash
echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile
```
If you choose a local installation of `hexo`, Linux users can add the `node_modules` directory in the Hexo directory to their PATH environment variable to directly use `hexo <command>`:

その後、`hexo <command>`を使用してHexoを実行します。
```bash
echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile
```
{% endnote %}

### 必要なNode.jsのバージョン

Expand Down
1 change: 0 additions & 1 deletion source/ja/docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Hexoがインストールされたら、以下のコマンドを実行して対
``` bash
$ hexo init <folder>
$ cd <folder>
$ npm install
```

初期化されると、プロジェクトフォルダは次のようになります:
Expand Down
37 changes: 28 additions & 9 deletions source/ko/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,21 @@ Hexo의 설치는 꽤 쉽습니다. 하지만, 설치 전에 몇 가지 요구
- [Node.js](http://nodejs.org/) (Should be at least Node.js 10.13, recommends 12.0 or higher)
- [Git](http://git-scm.com/)

컴퓨터에 이미 이런 것들이 설치되어 있다면, 축하드립니다! 이제 npm을 이용하여 Hexo를 설치하기만 하면 됩니다.

``` bash
$ npm install -g hexo-cli
```
컴퓨터에 이미 이런 것들이 설치되어 있다면, 축하드립니다! You can skip to the [Hexo 설치하기](#Hexo-설치하기) step.

설치되어 있지 않다면, 아래의 설명을 따라 요구사항들을 설치하세요.

{% note warn For Mac users %}
컴파일 중에 몇 가지 문제가 발생할 수 있습니다. 우선 앱스토어를 통해 Xcode를 설치하세요. 그 다음, Xcode를 실행하고 **Preferences -> Download -> Command Line Tools -> Install** 의 방법으로 command line tool을 설치하세요.
{% endnote %}

### Git을 설치하세요

- Windows: [git](https://git-scm.com/download/win) 에서 다운로드해서 설치하세요.
- Mac: [Homebrew](http://mxcl.github.com/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`

{% note warn For Mac users %}
컴파일 중에 몇 가지 문제가 발생할 수 있습니다. 우선 앱스토어를 통해 Xcode를 설치하세요. 그 다음, Xcode를 실행하고 **Preferences -> Download -> Command Line Tools -> Install** 의 방법으로 command line tool을 설치하세요.
{% endnote %}

### Node.js를 설치하세요

Node.js provides [official installer](https://nodejs.org/en/download/) for most platforms.
Expand Down Expand Up @@ -70,6 +66,29 @@ If you installed Node.js using Snap, you may need to manually run `npm install`
$ npm install -g hexo-cli
```

The Hexo installed using the commands above is globally effective. If the installation is successful, executing the following command will display the version information.

``` bash
$ hexo --version
```

{% note info %}
For advanced users familiar with npm, you can opt for a local installation of the `hexo` package instead of a global one. This approach can help avoid potential permission issues associated with global installations. For example, you can clone an existing Hexo blog repository, and after installing dependencies, execute Hexo commands using `npx hexo`.

``` bash
$ git clone https:/hexojs/hexo-starter
$ cd hexo-starter
$ npm install
$ npx hexo --version
```

If you choose a local installation of `hexo`, Linux users can add the `node_modules` directory in the Hexo directory to their PATH environment variable to directly use `hexo <command>`:

```bash
echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile
```
{% endnote %}

### Required Node.js version

If you are stuck with older Node.js, you can consider installing a past version of Hexo.
Expand Down
1 change: 0 additions & 1 deletion source/ko/docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Hexo를 설치했다면, 타겟 `<folder>`의 Hexo를 초기화하기 위해 아
``` bash
$ hexo init <folder>
$ cd <folder>
$ npm install
```

초기화가 완료되면 다음과 같은 폴더 구조를 가지게 될 것입니다.
Expand Down
37 changes: 28 additions & 9 deletions source/pt-br/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,21 @@ Instalar o Hexo é bastante fácil. No entanto, você precisa ter algumas outras
- [Node.js](http://nodejs.org/) (Should be at least Node.js 10.13, recommends 12.0 or higher)
- [Git](http://git-scm.com/)

Se o seu computador já possui estes, parabéns! Basta instalar o Hexo com o npm:

``` bash
$ npm install -g hexo-cli
```
Se o seu computador já possui estes, parabéns! You can skip to the [Instalando Hexo](#Instalando-Hexo) step.

Caso contrário, siga as instruções a seguir para instalar todos os requisitos.

{% note warn Para usuários Mac %}
Você pode encontrar alguns problemas ao compilar. Instale o Xcode da App Store primeiro. Depois que o Xcode estiver instalado, abra o Xcode e vá para **Preferences -> Download -> Command Line Tools -> Install** para instalar as ferramentas de linhas de comandos.
{% endnote %}

### Instalando o Git

- Windows: Download e instalação do [Git](https://git-scm.com/download/win).
- Mac: Intalação com o [Homebrew](http://mxcl.github.com/homebrew/), [MacPorts](http://www.macports.org/) ou [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`

{% note warn Para usuários Mac %}
Você pode encontrar alguns problemas ao compilar. Instale o Xcode da App Store primeiro. Depois que o Xcode estiver instalado, abra o Xcode e vá para **Preferences -> Download -> Command Line Tools -> Install** para instalar as ferramentas de linhas de comandos.
{% endnote %}

### Instalando o Node.js

Node.js provides [official installer](https://nodejs.org/en/download/) for most platforms.
Expand Down Expand Up @@ -73,6 +69,29 @@ Uma vez que todos os requisitos estão instalados, você pode instalar o Hexo co
$ npm install -g hexo-cli
```

The Hexo installed using the commands above is globally effective. If the installation is successful, executing the following command will display the version information.

``` bash
$ hexo --version
```

{% note info %}
For advanced users familiar with npm, you can opt for a local installation of the `hexo` package instead of a global one. This approach can help avoid potential permission issues associated with global installations. For example, you can clone an existing Hexo blog repository, and after installing dependencies, execute Hexo commands using `npx hexo`.

``` bash
$ git clone https:/hexojs/hexo-starter
$ cd hexo-starter
$ npm install
$ npx hexo --version
```

If you choose a local installation of `hexo`, Linux users can add the `node_modules` directory in the Hexo directory to their PATH environment variable to directly use `hexo <command>`:

```bash
echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile
```
{% endnote %}

### Required Node.js version

If you are stuck with older Node.js, you can consider installing a past version of Hexo.
Expand Down
1 change: 0 additions & 1 deletion source/pt-br/docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Uma vez instalado o Hexo, execute os seguintes comandos para inicializar um site
``` bash
$ hexo init <folder>
$ cd <folder>
$ npm install
```

Após inicializado, o diretório do seu projeto ficará com a seguinte estrutura:
Expand Down
37 changes: 28 additions & 9 deletions source/ru/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,21 @@ Hexo — это быстрый, простой и мощный фреймвор
- [Node.js](http://nodejs.org/) (Версия должна быть как минимум Node.js 8.10, рекомендовано использовать 10.0 или выше)
- [Git](http://git-scm.com/)

Если всё это уже есть, поздравляю! Просто установите Hexo с помощью npm:

``` bash
$ npm install -g hexo-cli
```
Если всё это уже есть, поздравляю! You can skip to the [Установка Hexo](#Установка-Hexo) step.

Если нет, выполните следующие действия, чтобы установить всё, что требуется.

{% note warn Для пользователей Mac %}
Вы можете столкнуться с проблемами при компиляции. Пожалуйста, сначала установите Xcode из магазина App Store. После установки откройте xcode и перейдите в **Настройки -> Загрузки -> Командная строка -> Установить** (**Preferences -> Download -> Command Line Tools -> Install**), чтобы установить утилиту командной строки.
{% endnote %}

### Установка Git

- Windows: Скачать и установить [git](https://git-scm.com/download/win).
- Mac: Установите с помощью [Homebrew](http://mxcl.github.com/homebrew/), [MacPorts](http://www.macports.org/) или [установочного файла](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`

{% note warn Для пользователей Mac %}
Вы можете столкнуться с проблемами при компиляции. Пожалуйста, сначала установите Xcode из магазина App Store. После установки откройте xcode и перейдите в **Настройки -> Загрузки -> Командная строка -> Установить** (**Preferences -> Download -> Command Line Tools -> Install**), чтобы установить утилиту командной строки.
{% endnote %}

### Установка Node.js

Node.js предоставляет [официальный установщик](http://nodejs.org/en/download /) для большинства платформ.
Expand Down Expand Up @@ -70,6 +66,29 @@ nvs также рекомендуется для Mac и Linux, чтобы изб
$ npm install -g hexo-cli
```

The Hexo installed using the commands above is globally effective. If the installation is successful, executing the following command will display the version information.

``` bash
$ hexo --version
```

{% note info %}
For advanced users familiar with npm, you can opt for a local installation of the `hexo` package instead of a global one. This approach can help avoid potential permission issues associated with global installations. For example, you can clone an existing Hexo blog repository, and after installing dependencies, execute Hexo commands using `npx hexo`.

``` bash
$ git clone https:/hexojs/hexo-starter
$ cd hexo-starter
$ npm install
$ npx hexo --version
```

If you choose a local installation of `hexo`, Linux users can add the `node_modules` directory in the Hexo directory to their PATH environment variable to directly use `hexo <command>`:

```bash
echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile
```
{% endnote %}

### необходимая версия Node.js

Если вы застряли с устаревшими версиями Node.js , вы можете рассмотреть возможность установки предыдущей версии Hexo.
Expand Down
1 change: 0 additions & 1 deletion source/ru/docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ title: Установка
``` bash
$ hexo init <folder>
$ cd <folder>
$ npm install
```

После инициализации папка будет выглядеть так:
Expand Down
39 changes: 29 additions & 10 deletions source/th/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,9 @@ hexo เป็นกรอบบล็อกท่ีรวดเร็ว เ
- [Node.js](http://nodejs.org/) (Should be at least Node.js 10.13, recommends 12.0 or higher)
- [Git](http://git-scm.com/)

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

``` bash
$ npm install -g hexo-cli
```
ถ้าคุณติดตั้งสองสิ่งนี้อยู่แล้วในคอม ขอแสดงความยินดี You can skip to the [Hexo installation](#Install-Hexo) step.

ถ้าคุณยังไม่ได้ติดตั้งสองสิ่งนี้ กรุณาปฏิบัติตามวิธีการใช้เพื่อติดตั้งทุกสิ่งท่ีต้องการ
{% note warn For Mac users %}
คุณอาจจะพบปัญหาบ้างเมื่อ compiling กรุณาติดตั้ง Xcode จาก App Store ก่อน
เสร็จแล้วค่อยไปเปิด Xcode และ ไปถึง **Preferences -> Download -> Command Line
Tools -> Install** เพื่อติดตั้งเครื่องมือคำสั่ง
{% endnote %}

### Install Git

Expand All @@ -47,6 +38,11 @@ $ npm install -g hexo-cli
.net/projects/git-osx-installer/).
- Linux (Ubuntu, Debian): `sudo apt-get install git-core`
- Linux (Fedora, Red Hat, CentOS): `sudo yum install git-core`
{% note warn For Mac users %}
คุณอาจจะพบปัญหาบ้างเมื่อ compiling กรุณาติดตั้ง Xcode จาก App Store ก่อน
เสร็จแล้วค่อยไปเปิด Xcode และ ไปถึง **Preferences -> Download -> Command Line
Tools -> Install** เพื่อติดตั้งเครื่องมือคำสั่ง
{% endnote %}

### Install Node.js

Expand Down Expand Up @@ -81,6 +77,29 @@ If you installed Node.js using Snap, you may need to manually run `npm install`
$ npm install -g hexo-cli
```

The Hexo installed using the commands above is globally effective. If the installation is successful, executing the following command will display the version information.

``` bash
$ hexo --version
```

{% note info %}
For advanced users familiar with npm, you can opt for a local installation of the `hexo` package instead of a global one. This approach can help avoid potential permission issues associated with global installations. For example, you can clone an existing Hexo blog repository, and after installing dependencies, execute Hexo commands using `npx hexo`.

``` bash
$ git clone https:/hexojs/hexo-starter
$ cd hexo-starter
$ npm install
$ npx hexo --version
```

If you choose a local installation of `hexo`, Linux users can add the `node_modules` directory in the Hexo directory to their PATH environment variable to directly use `hexo <command>`:

```bash
echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile
```
{% endnote %}

### Required Node.js version

If you are stuck with older Node.js, you can consider installing a past version of Hexo.
Expand Down
1 change: 0 additions & 1 deletion source/th/docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ title: Setup
``` bash
$ hexo init <folder>
$ cd <folder>
$ npm install
```

เมื่อเสร็จการ initialization โครงสร้าง folder ของ project คุณจะเป็นอย่างนี้:
Expand Down
Loading