From e818323390ce493221808341fd1849a324d432cd Mon Sep 17 00:00:00 2001 From: MDLeom <43627182+curbengh@users.noreply.github.com> Date: Wed, 19 Aug 2020 03:04:07 +0000 Subject: [PATCH] docs(index): sync Node.js guide across languages - also add warning about snap issue --- source/docs/index.md | 4 ++++ source/ko/docs/index.md | 33 +++++++++++++++------------------ source/pt-br/docs/index.md | 34 +++++++++++++++------------------- source/ru/docs/index.md | 33 +++++++++++++++------------------ source/th/docs/index.md | 34 +++++++++++++++------------------- source/zh-cn/docs/index.md | 4 ++++ source/zh-tw/docs/index.md | 33 +++++++++++++++------------------ 7 files changed, 83 insertions(+), 92 deletions(-) diff --git a/source/docs/index.md b/source/docs/index.md index 348805a54e..056e4a8d90 100644 --- a/source/docs/index.md +++ b/source/docs/index.md @@ -56,6 +56,10 @@ If you use the official installer, make sure **Add to PATH** is checked (it's ch If you encounter `EACCES` permission error when trying to install Hexo, please follow [the workaround](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally) provided by npmjs; overriding with root/sudo is highly discouraged. {% endnote %} +{% note info Linux %} +If you installed Node.js using Snap, you may need to manually run `npm install` in the target folder when [initializing](/docs/commands#init) a blog. +{% endnote %} + ### Install Hexo Once all the requirements are installed, you can install Hexo with npm: diff --git a/source/ko/docs/index.md b/source/ko/docs/index.md index c7fa4b292a..41255a3726 100644 --- a/source/ko/docs/index.md +++ b/source/ko/docs/index.md @@ -39,31 +39,28 @@ $ npm install -g hexo-cli ### Node.js를 설치하세요 -Node.js는 [nvm](https://github.com/nvm-sh/nvm)을 통해 설치하는 것이 가장 좋습니다. +Node.js provides [official installer](https://nodejs.org/en/download/) for most platforms. -cURL: +Alternative installation methods: -``` bash -$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | sh -``` - -Wget: - -``` bash -$ wget -qO-https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | sh -``` +- Windows: Install it with [nvs](https://github.com/jasongin/nvs/) (recommended) or [nvm](https://github.com/nvm-sh/nvm). +- Mac: Install it with [Homebrew](https://brew.sh/) or [MacPorts](http://www.macports.org/). +- Linux (DEB/RPM-based): Install it with [NodeSource](https://github.com/nodesource/distributions). +- Others: Install it through respective package manager. Refer to [the guide](https://nodejs.org/en/download/package-manager/) provided by Node.js. -nvm이 설치되어 있다면, 터미널을 재시작하고 아래 명령어를 수행하세요. +nvs is also recommended for Mac and Linux to avoid possible permission issue. -``` bash -$ nvm install node -``` +{% note info Windows %} +If you use the official installer, make sure **Add to PATH** is checked (it's checked by default). +{% endnote %} -{% note info For Windows users %} -We recommend to use [Node Version Switcher](https://github.com/jasongin/nvs/) as an alternative to nvm on Windows, which has similar command-line syntax with nvm and can be installed through provided Windows Installer (MSI) package. +{% note warn Mac / Linux %} +If you encounter `EACCES` permission error when trying to install Hexo, please follow [the workaround](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally) provided by npmjs; overriding with root/sudo is highly discouraged. {% endnote %} -이런 방법 대신, [installer](http://nodejs.org/)를 다운로드 받아서 설치하는 방법도 있습니다. +{% note info Linux %} +If you installed Node.js using Snap, you may need to manually run `npm install` in the target folder when [initializing](/docs/commands#init) a blog. +{% endnote %} ### Hexo 설치하기 diff --git a/source/pt-br/docs/index.md b/source/pt-br/docs/index.md index 4f72692d41..de1bff092b 100644 --- a/source/pt-br/docs/index.md +++ b/source/pt-br/docs/index.md @@ -42,32 +42,28 @@ Você pode encontrar alguns problemas ao compilar. Instale o Xcode da App Store ### Instalando o Node.js -A melhor maneira de instalar o Node.js é com o [Node Version Manager](https://github.com/nvm-sh/nvm). -Felizmente, os criadores do nvm fornecem um script simples que instala automaticamente o nvm: +Node.js provides [official installer](https://nodejs.org/en/download/) for most platforms. -cURL: +Alternative installation methods: -``` bash -$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash -``` - -Wget: - -``` bash -$ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash -``` +- Windows: Install it with [nvs](https://github.com/jasongin/nvs/) (recommended) or [nvm](https://github.com/nvm-sh/nvm). +- Mac: Install it with [Homebrew](https://brew.sh/) or [MacPorts](http://www.macports.org/). +- Linux (DEB/RPM-based): Install it with [NodeSource](https://github.com/nodesource/distributions). +- Others: Install it through respective package manager. Refer to [the guide](https://nodejs.org/en/download/package-manager/) provided by Node.js. -Uma vez que o nvm esteja instalado, reinicie o terminal e execute o seguinte comando para instalar o Node.js: +nvs is also recommended for Mac and Linux to avoid possible permission issue. -``` bash -$ nvm install node -``` +{% note info Windows %} +If you use the official installer, make sure **Add to PATH** is checked (it's checked by default). +{% endnote %} -{% note info For Windows users %} -We recommend to use [Node Version Switcher](https://github.com/jasongin/nvs/) as an alternative to nvm on Windows, which has similar command-line syntax with nvm and can be installed through provided Windows Installer (MSI) package. +{% note warn Mac / Linux %} +If you encounter `EACCES` permission error when trying to install Hexo, please follow [the workaround](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally) provided by npmjs; overriding with root/sudo is highly discouraged. {% endnote %} -Alternativamente, é possível baixar e executar [o instalador do Node.js](http://nodejs.org/). +{% note info Linux %} +If you installed Node.js using Snap, you may need to manually run `npm install` in the target folder when [initializing](/docs/commands#init) a blog. +{% endnote %} ### Instalando Hexo diff --git a/source/ru/docs/index.md b/source/ru/docs/index.md index 262aadffe1..dc1fc0f61e 100644 --- a/source/ru/docs/index.md +++ b/source/ru/docs/index.md @@ -39,31 +39,28 @@ $ npm install -g hexo-cli ### Установка Node.js -Лучший способ установить Node.js это [nvm](https://github.com/nvm-sh/nvm). +Node.js provides [official installer](https://nodejs.org/en/download/) for most platforms. -cURL: +Alternative installation methods: -``` bash -$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | sh -``` - -Wget: - -``` bash -$ wget -qO-https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | sh -``` +- Windows: Install it with [nvs](https://github.com/jasongin/nvs/) (recommended) or [nvm](https://github.com/nvm-sh/nvm). +- Mac: Install it with [Homebrew](https://brew.sh/) or [MacPorts](http://www.macports.org/). +- Linux (DEB/RPM-based): Install it with [NodeSource](https://github.com/nodesource/distributions). +- Others: Install it through respective package manager. Refer to [the guide](https://nodejs.org/en/download/package-manager/) provided by Node.js. -После установки nvm запустите терминал и выполните следующую команду для установки Node.js. +nvs is also recommended for Mac and Linux to avoid possible permission issue. -``` bash -$ nvm install node -``` +{% note info Windows %} +If you use the official installer, make sure **Add to PATH** is checked (it's checked by default). +{% endnote %} -{% note info For Windows users %} -We recommend to use [Node Version Switcher](https://github.com/jasongin/nvs/) as an alternative to nvm on Windows, which has similar command-line syntax with nvm and can be installed through provided Windows Installer (MSI) package. +{% note warn Mac / Linux %} +If you encounter `EACCES` permission error when trying to install Hexo, please follow [the workaround](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally) provided by npmjs; overriding with root/sudo is highly discouraged. {% endnote %} -Или скачать и установить [установщик](http://nodejs.org/). +{% note info Linux %} +If you installed Node.js using Snap, you may need to manually run `npm install` in the target folder when [initializing](/docs/commands#init) a blog. +{% endnote %} ### Установка Hexo diff --git a/source/th/docs/index.md b/source/th/docs/index.md index c3d45c2c77..ea6405a1c4 100644 --- a/source/th/docs/index.md +++ b/source/th/docs/index.md @@ -50,32 +50,28 @@ $ npm install -g hexo-cli ### Install Node.js -วิธีดีท่ีสุดสำหรับการติดตั้ง Node.js คือ [Node Version Manager](https://github.com/nvm-sh/nvm) -ขอบคุณ ผู้ประดิษฐ์ nvm ท่ีได้แนะนำวิธีเรียบง่ายท่ีติดตั้ง nvm ได้โดยอัตโนมัติ +Node.js provides [official installer](https://nodejs.org/en/download/) for most platforms. -cURL: +Alternative installation methods: -``` bash -$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash -``` - -Wget: - -``` bash -$ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash -``` +- Windows: Install it with [nvs](https://github.com/jasongin/nvs/) (recommended) or [nvm](https://github.com/nvm-sh/nvm). +- Mac: Install it with [Homebrew](https://brew.sh/) or [MacPorts](http://www.macports.org/). +- Linux (DEB/RPM-based): Install it with [NodeSource](https://github.com/nodesource/distributions). +- Others: Install it through respective package manager. Refer to [the guide](https://nodejs.org/en/download/package-manager/) provided by Node.js. -เมื่อเสร็จการติดตั้ง nvm เปิด terminal ใหม่และรันคำสั่งต่อไปเพื่อติดตั้ง Node.js +nvs is also recommended for Mac and Linux to avoid possible permission issue. -``` bash -$ nvm install node -``` +{% note info Windows %} +If you use the official installer, make sure **Add to PATH** is checked (it's checked by default). +{% endnote %} -{% note info For Windows users %} -We recommend to use [Node Version Switcher](https://github.com/jasongin/nvs/) as an alternative to nvm on Windows, which has similar command-line syntax with nvm and can be installed through provided Windows Installer (MSI) package. +{% note warn Mac / Linux %} +If you encounter `EACCES` permission error when trying to install Hexo, please follow [the workaround](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally) provided by npmjs; overriding with root/sudo is highly discouraged. {% endnote %} -นอกจากนี้ยังดาวน์โหลดและรัน [the installer](http://nodejs.org/) ได้ +{% note info Linux %} +If you installed Node.js using Snap, you may need to manually run `npm install` in the target folder when [initializing](/docs/commands#init) a blog. +{% endnote %} ### Install Hexo diff --git a/source/zh-cn/docs/index.md b/source/zh-cn/docs/index.md index 98c1165055..4b810303cb 100644 --- a/source/zh-cn/docs/index.md +++ b/source/zh-cn/docs/index.md @@ -61,6 +61,10 @@ Node.js 为大多数平台提供了官方的 [安装程序](https://nodejs.org/e 如果在尝试安装 Hexo 的过程中出现 `EACCES` 权限错误,请遵循 [由 npmjs 发布的指导](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally) 修复该问题。强烈建议 **不要** 使用 root、sudo 等方法覆盖权限 {% endnote %} +{% note info Linux %} +If you installed Node.js using Snap, you may need to manually run `npm install` in the target folder when [initializing](/docs/commands#init) a blog. +{% endnote %} + ### 安装 Hexo 所有必备的应用程序安装完成后,即可使用 npm 安装 Hexo。 diff --git a/source/zh-tw/docs/index.md b/source/zh-tw/docs/index.md index ad1996b1a2..d8bb954ff4 100644 --- a/source/zh-tw/docs/index.md +++ b/source/zh-tw/docs/index.md @@ -41,31 +41,28 @@ $ npm install -g hexo-cli ### 安裝 Node.js -安裝 Node.js 的最佳方式是透過 [Node Version Manager](https://github.com/nvm-sh/nvm)。感謝 nvm 的開發者提供簡易自動安裝的腳本指令: +Node.js 為大多數平台提供了官方的 [安裝程序](https://nodejs.org/en/download/)。對於中國大陸地區用戶,可以前往 [淘寶 Node.js 鏡像](https://npm.taobao.org/mirrors/node) 下載。 -cURL: +其它的安裝方法: -``` bash -$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash -``` - -Wget: - -``` bash -$ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash -``` +- Windows:通過 [nvs](https://github.com/jasongin/nvs/)(推薦)或者[nvm](https://github.com/nvm-sh/nvm) 安裝。 +- Mac:使用 [Homebrew](https://brew.sh/) 或 [MacPorts](http://www.macports.org/) 安裝。 +- Linux(DEB/RPM-based):從 [NodeSource](https://github.com/nodesource/distributions) 安裝。 +- 其它:使用相應的軟件包管理器進行安裝,可以參考由 Node.js 提供的 [指導](https://nodejs.org/en/download/package-manager/) -一旦安裝完成,重啟終端機並執行下列指令以安裝 Node.js。 +對於 Mac 和 Linux 同樣建議使用 nvs 或者 nvm,以避免可能會出現的權限問題。 -``` bash -$ nvm install node -``` +{% note info Windows 用戶 %} +使用 Node.js 官方安裝程序時,請確保勾選 **Add to PATH** 選項(默認已勾選) +{% endnote %} -{% note info Windows 用户 %} -對於 Windows 用戶我們推薦使用 [Node Version Switcher](https://github.com/jasongin/nvs/),其具有和 nvm 相似的命令行語法,並且可以通過 Windows Installer (MSI) 安裝包進行安裝。 +{% note warn For Mac / Linux 用戶 %} +如果在嘗試安裝Hexo 的過程中出現`EACCES` 權限錯誤,請遵循[由npmjs 發布的指導](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally ) 修復該問題。強烈建議 **不要** 使用 root、sudo 等方法覆蓋權限 {% endnote %} -或者您也可以下載 [安裝程式](http://nodejs.org/) 來安裝。 +{% note info Linux %} +If you installed Node.js using Snap, you may need to manually run `npm install` in the target folder when [initializing](/docs/commands#init) a blog. +{% endnote %} ### 安裝 Hexo