mirror of https://gitlab.com/curben/blog
2c82409317 | ||
---|---|---|
scaffolds | ||
source | ||
themes/typing | ||
.gitignore | ||
.gitlab-ci.yml | ||
.npmrc | ||
.nvmrc | ||
.snyk | ||
LICENSE.md | ||
README.md | ||
_config.yml | ||
netlify.toml | ||
package.json |
README.md
curben.netlify.com
Forked from GitLab's Hexo example with Typing theme.
Installation
Refer to this post for more detailed instruction.
- Change
<folder>
to a preferred name.
git clone https://gitlab.com/curben/blog <folder>
- Install Node.js.
# 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
- Install Hexo and its dependencies (defined in package.json).
hexo-cli
installation step can be skipped if you use this shortcut.
$ sudo npm install -g hexo-cli
$ cd <folder>
$ npm install --only=prod
- Generate static files to check for any error. You should always do this before pushing/merging commits to the
master
branch.
$ hexo generate
Quick Start
Create a new post
$ hexo new "My New Post"
More info: Writing
Run server
$ hexo server
More info: Server
Generate static files
$ hexo generate
More info: Generating
Deploy to remote sites
$ hexo deploy
More info: Deployment
Changes
The following are the major changes I made compared to the upstream.
Hexo site
- Update .gitlab-ci.yml to use the latest version of Node.js in Alpine docker image.
- Update package.json to use latest version of hexo and its related packages.
- Replace the bundled Landscape theme with Typing theme.
- Pre-compressed the assets using hexo-yam.
Typing theme
- Homepage shows index of posts.
- Use the latest version of clipboard.js and Fork Awesome (disabled by default).
- Remove jQuery, fancyBox, web analytics, comment plugins and donation links.
- Use more relative length, instead of absolute length in the css.
License
The content of this blog is licensed under the CC-BY-SA license, and the underlying source code used to format and display that content is licensed under the MIT license, unless indicated otherwise.
Useful links: