diff --git a/README.md b/README.md index c909995..445ecba 100644 --- a/README.md +++ b/README.md @@ -9,19 +9,26 @@ Forked from GitLab's [Hexo](https://gitlab.com/pages/hexo) example with [Typing] ## Installation +> Refer to [this post](https://curben.netlify.com/2018/09/21/how-to-create-a-hexo-blog/) for more detailed instruction. + 1. Change `` to a preferred name. ```bash git clone https://gitlab.com/curben/blog ``` 2. Install Node.js. ```bash -# Installing npm will also install nodejs as dependency. -# Ubuntu/Debian -sudo apt-get install npm -# Fedora/Red Hat -sudo yum install npm +# Ubuntu 16.04 or newer +$ sudo snap install node --classic --channel=10 +# Debian +$ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - +$ sudo apt-get install -y nodejs +# Fedora 29 +$ sudo dnf install npm +# Fedora 28 or older +$ curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash - +$ sudo yum -y install nodejs # Arch Linux -sudo pacman -S npm +$ sudo pacman -S npm ``` 3. Install Hexo and its dependencies (defined in [package.json](package.json)). `hexo-cli` installation step can be skipped if you use [this shortcut](https://curben.netlify.com/2018/10/24/running-locally-installed-node-packages/#Method-1). ```bash diff --git a/source/_posts/hexo-blog-github.md b/source/_posts/hexo-blog-github.md index 06ea3ba..c271af6 100644 --- a/source/_posts/hexo-blog-github.md +++ b/source/_posts/hexo-blog-github.md @@ -61,7 +61,7 @@ deploy: ## Installation 1. Having Hexo means you can debug locally, rather than waiting for [Travis](https://travis-ci.com/). You can even run a local server to preview your blog (see step 6 below). 2. Clone your repo to your workstation. -3. Install Node.js 10. Other distro, see this [guide](https://nodejs.org/en/download/package-manager/) or [here](https://github.com/nodesource/distributions). +3. Install Node.js 10 (current [active LTS](https://github.com/nodejs/Release)). Other distro, see this [guide](https://nodejs.org/en/download/package-manager/) or [here](https://github.com/nodesource/distributions). ```bash # Installing npm will also install nodejs as dependency. @@ -70,7 +70,7 @@ $ sudo snap install node --classic --channel=10 # Debian $ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - $ sudo apt-get install -y nodejs -# Fedora 29 +# Fedora 29 or newer $ sudo dnf install npm # Fedora 28 or older $ curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash - @@ -83,7 +83,7 @@ $ sudo pacman -S npm ```bash $ cd -$ npm install +$ npm install --only=prod $ echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile ``` diff --git a/source/_posts/how-to-create-a-hexo-blog.md b/source/_posts/how-to-create-a-hexo-blog.md index d5eec62..5726d79 100644 --- a/source/_posts/how-to-create-a-hexo-blog.md +++ b/source/_posts/how-to-create-a-hexo-blog.md @@ -36,16 +36,15 @@ Create a website/blog using Hexo on [GitLab Pages](https://about.gitlab.com/feat ## Installation 1. Having Hexo means you can debug locally, rather than waiting for [CI](https://docs.gitlab.com/ee/ci/). You can even run a local server to preview your blog (see step 6 below). 2. Clone your repo to your workstation. -3. Install Node.js 10. Other distro, see this [guide](https://nodejs.org/en/download/package-manager/) or [here](https://github.com/nodesource/distributions). +3. Install Node.js 10 (current [active LTS](https://github.com/nodejs/Release)). Other distro, see this [guide](https://nodejs.org/en/download/package-manager/) or [here](https://github.com/nodesource/distributions). ```bash -# Installing npm will also install nodejs as dependency. # Ubuntu 16.04 or newer $ sudo snap install node --classic --channel=10 # Debian $ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - $ sudo apt-get install -y nodejs -# Fedora 29 +# Fedora 29 or newer $ sudo dnf install npm # Fedora 28 or older $ curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash - @@ -58,7 +57,7 @@ $ sudo pacman -S npm ```bash $ cd -$ npm install +$ npm install --only=prod $ echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile ```