diff --git a/source/docs/index.md b/source/docs/index.md index bf858b6ff4..9df7e4fd42 100644 --- a/source/docs/index.md +++ b/source/docs/index.md @@ -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 ` -2. Linux users can set relative path of `node_modules/` folder: +``` bash +$ git clone https://github.com/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 `: - then run Hexo using `hexo ` +```bash +echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile +``` +{% endnote %} ### Required Node.js version diff --git a/source/docs/setup.md b/source/docs/setup.md index 58735b96c8..045bac3de0 100644 --- a/source/docs/setup.md +++ b/source/docs/setup.md @@ -9,7 +9,6 @@ Once Hexo is installed, run the following commands to initialize Hexo in the tar ``` bash $ hexo init $ cd -$ npm install ``` Once initialized, here's what your project folder will look like: diff --git a/source/ja/docs/index.md b/source/ja/docs/index.md index c078a53a9f..984f3b9615 100644 --- a/source/ja/docs/index.md +++ b/source/ja/docs/index.md @@ -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 ` -2. Linuxユーザーは`node_modules/`フォルダの相対パスを設定できます: +``` bash +$ git clone https://github.com/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 `: - その後、`hexo `を使用してHexoを実行します。 +```bash +echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile +``` +{% endnote %} ### 必要なNode.jsのバージョン diff --git a/source/ja/docs/setup.md b/source/ja/docs/setup.md index 8e6ab048a5..6b6f505cad 100644 --- a/source/ja/docs/setup.md +++ b/source/ja/docs/setup.md @@ -7,7 +7,6 @@ Hexoがインストールされたら、以下のコマンドを実行して対 ``` bash $ hexo init $ cd -$ npm install ``` 初期化されると、プロジェクトフォルダは次のようになります: diff --git a/source/ko/docs/index.md b/source/ko/docs/index.md index 3dbc74ae44..d771307c25 100644 --- a/source/ko/docs/index.md +++ b/source/ko/docs/index.md @@ -18,18 +18,10 @@ 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) 에서 다운로드해서 설치하세요. @@ -37,6 +29,10 @@ $ npm install -g hexo-cli - 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. @@ -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://github.com/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 `: + +```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. diff --git a/source/ko/docs/setup.md b/source/ko/docs/setup.md index d0deedbe01..84adfeaf02 100644 --- a/source/ko/docs/setup.md +++ b/source/ko/docs/setup.md @@ -6,7 +6,6 @@ Hexo를 설치했다면, 타겟 ``의 Hexo를 초기화하기 위해 아 ``` bash $ hexo init $ cd -$ npm install ``` 초기화가 완료되면 다음과 같은 폴더 구조를 가지게 될 것입니다. diff --git a/source/pt-br/docs/index.md b/source/pt-br/docs/index.md index 6b9d9f75da..4c3fba7bf4 100644 --- a/source/pt-br/docs/index.md +++ b/source/pt-br/docs/index.md @@ -21,18 +21,10 @@ 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). @@ -40,6 +32,10 @@ Você pode encontrar alguns problemas ao compilar. Instale o Xcode da App Store - 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. @@ -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://github.com/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 `: + +```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. diff --git a/source/pt-br/docs/setup.md b/source/pt-br/docs/setup.md index 3b295d13d2..efecd5de76 100644 --- a/source/pt-br/docs/setup.md +++ b/source/pt-br/docs/setup.md @@ -9,7 +9,6 @@ Uma vez instalado o Hexo, execute os seguintes comandos para inicializar um site ``` bash $ hexo init $ cd -$ npm install ``` Após inicializado, o diretório do seu projeto ficará com a seguinte estrutura: diff --git a/source/ru/docs/index.md b/source/ru/docs/index.md index 77762032d9..8948d82d67 100644 --- a/source/ru/docs/index.md +++ b/source/ru/docs/index.md @@ -18,18 +18,10 @@ 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). @@ -37,6 +29,10 @@ $ npm install -g hexo-cli - 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 /) для большинства платформ. @@ -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://github.com/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 `: + +```bash +echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile +``` +{% endnote %} + ### необходимая версия Node.js Если вы застряли с устаревшими версиями Node.js , вы можете рассмотреть возможность установки предыдущей версии Hexo. diff --git a/source/ru/docs/setup.md b/source/ru/docs/setup.md index 3283c1e8ff..56e77f5db6 100644 --- a/source/ru/docs/setup.md +++ b/source/ru/docs/setup.md @@ -6,7 +6,6 @@ title: Установка ``` bash $ hexo init $ cd -$ npm install ``` После инициализации папка будет выглядеть так: diff --git a/source/th/docs/index.md b/source/th/docs/index.md index 913ef0714d..73a92e4c9d 100644 --- a/source/th/docs/index.md +++ b/source/th/docs/index.md @@ -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 @@ -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 @@ -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://github.com/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 `: + +```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. diff --git a/source/th/docs/setup.md b/source/th/docs/setup.md index c9b24c1716..37c79ecde4 100644 --- a/source/th/docs/setup.md +++ b/source/th/docs/setup.md @@ -9,7 +9,6 @@ title: Setup ``` bash $ hexo init $ cd -$ npm install ``` เมื่อเสร็จการ initialization โครงสร้าง folder ของ project คุณจะเป็นอย่างนี้: diff --git a/source/zh-cn/docs/index.md b/source/zh-cn/docs/index.md index 667b8d6d99..b145c6dbc4 100644 --- a/source/zh-cn/docs/index.md +++ b/source/zh-cn/docs/index.md @@ -21,7 +21,7 @@ Hexo 是一个快速、简洁且高效的博客框架。Hexo 使用 [Markdown](h - [Node.js](http://nodejs.org/) (Node.js 版本需不低于 10.13,建议使用 Node.js 12.0 及以上版本) - [Git](http://git-scm.com/) -如果您的电脑中已经安装上述必备程序,那么恭喜您!你可以直接前往 [安装 Hexo](#安装-Hexo) 步骤。 +如果您的电脑中已经安装上述必备程序,那么恭喜您!您可以直接前往 [安装 Hexo](#安装-Hexo) 步骤。 如果您的电脑中尚未安装所需要的程序,请根据以下安装指示完成安装。 @@ -73,22 +73,28 @@ Node.js 为大多数平台提供了官方的 [安装程序](https://nodejs.org/z $ npm install -g hexo-cli ``` -### 进阶安装和使用 - -对于熟悉 npm 的进阶用户,可以仅局部安装 `hexo` 包。 +通过以上命令安装的 Hexo 是全局有效的,如果安装成功,执行以下命令将会显示版本信息。 ``` bash -$ npm install hexo +$ hexo --version ``` -安装以后,可以使用以下两种方式执行 Hexo: +{% note info %} +对于熟悉 npm 的进阶用户,可以仅局部安装 `hexo` 包,而不是全局安装,这样可以避免全局安装 Hexo 可能出现的权限问题。例如,可以克隆一个已有的 Hexo 博客源码仓库,在安装依赖包后,即可通过 `npx hexo` 执行 Hexo 的命令。 + +``` bash +$ git clone https://github.com/hexojs/hexo-starter +$ cd hexo-starter +$ npm install +$ npx hexo --version +``` -1. `npx hexo ` -2. Linux 用户可以将 Hexo 所在的目录下的 `node_modules` 添加到环境变量之中即可直接使用 `hexo `: +如果选择局部安装 `hexo`,Linux 用户可以将 Hexo 所在的目录下的 `node_modules` 添加到环境变量之中即可直接使用 `hexo `: - ``` bash - echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile - ``` +``` bash +echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile +``` +{% endnote %} ### Node.js 版本限制 diff --git a/source/zh-cn/docs/setup.md b/source/zh-cn/docs/setup.md index f26724a08f..11eff234a7 100644 --- a/source/zh-cn/docs/setup.md +++ b/source/zh-cn/docs/setup.md @@ -9,7 +9,6 @@ title: 建站 ``` bash $ hexo init $ cd -$ npm install ``` 新建完成后,指定文件夹的目录如下: diff --git a/source/zh-tw/docs/index.md b/source/zh-tw/docs/index.md index bbe605ccb4..d4bb67c42a 100644 --- a/source/zh-tw/docs/index.md +++ b/source/zh-tw/docs/index.md @@ -20,18 +20,10 @@ Hexo 是一個快速、簡單且強大的網誌框架。Hexo 使用 [Markdown](h - [Node.js](http://nodejs.org/) (Node.js 版本需不低於8.10,建議使用 Node.js 10.0 及以上版本) - [Git](http://git-scm.com/) -若您的電腦已經安裝上述的必備軟體,那麼恭喜您!只需要透過 npm 即可完成 Hexo 的安裝。 - -``` bash -$ npm install -g hexo-cli -``` +若您的電腦已經安裝上述的必備軟體,那麼恭喜您!You can skip to the [安裝 Hexo](#安裝-Hexo) step. 如果您的電腦尚未安裝必備軟體的話,請根據下列的安裝指示來完成安裝。 -{% note warn Mac 使用者 %} -您在編譯時可能會碰到問題,請先至 App Store 安裝 Xcode,一旦 Xcode 安裝完成後,開啟它並前往 **Preferences -> Download -> Command Line Tools -> Install** 安裝命令列工具。 -{% endnote %} - ### 安裝 Git - Windows:下載並安裝 [git](https://git-scm.com/download/win). @@ -39,6 +31,10 @@ $ npm install -g hexo-cli - Linux (Ubuntu, Debian):`sudo apt-get install git-core` - Linux (Fedora, Red Hat, CentOS):`sudo yum install git-core` +{% note warn Mac 使用者 %} +您在編譯時可能會碰到問題,請先至 App Store 安裝 Xcode,一旦 Xcode 安裝完成後,開啟它並前往 **Preferences -> Download -> Command Line Tools -> Install** 安裝命令列工具。 +{% endnote %} + ### 安裝 Node.js Node.js 為大多數平台提供了官方的 [安裝程序](https://nodejs.org/en/download/)。對於中國大陸地區用戶,可以前往 [淘寶 Node.js 鏡像](https://npmmirror.com/mirrors/node/) 下載。 @@ -72,6 +68,29 @@ Node.js 為大多數平台提供了官方的 [安裝程序](https://nodejs.org/e $ 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://github.com/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 `: + +```bash +echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile +``` +{% endnote %} + ### 必要的 Node.js 版本 如果您堅持使用較舊版本的 Node.js,你可以考慮安裝過往版本的 Hexo。 diff --git a/source/zh-tw/docs/setup.md b/source/zh-tw/docs/setup.md index 0ac993e0d7..a29d939d2b 100644 --- a/source/zh-tw/docs/setup.md +++ b/source/zh-tw/docs/setup.md @@ -9,7 +9,6 @@ title: 建立 ``` bash $ hexo init $ cd -$ npm install ``` 建立完成後,專案資料夾會有下列檔案: diff --git a/themes/navy/layout/index.njk b/themes/navy/layout/index.njk index 4b4ff5eb96..de2275e23b 100644 --- a/themes/navy/layout/index.njk +++ b/themes/navy/layout/index.njk @@ -30,7 +30,6 @@
  • npm install hexo-cli -g
  • hexo init blog
  • cd blog
  • -
  • npm install
  • hexo server