Start

Hello, welcome to「Suka」!

Edit on GitHub

Hexo is a static site generator which based on Node.js. You can learn how to install Hexo and generate your own website or blog at Hexo’s Official Documents.

In this documents, we suppose you have already sucessfully installed hexo and used hexo init to bring up an site.

There are two config file in Hexo Project, one in the root directory of your Hexo Project and another in the theme directory. For convenience of description, in the following description, the former is referred to as the site config and the latter as the theme config.

Before using “Suka” theme, please read Hexo’s Official Documents carefully and configure the basic config, such as title, subtitle, description, author, timezone, language else.

Download “Suka”

Download latest Release

The latest release. Recommended for most users.

Download latest Canary Branch

Maybe unstable, but includes latest features. Recommended for developers or advanced users.

Download other version

You can decide which version to use. May no longer provide support.

Choose your the one you want to use, find Assets in new page, download Source Code (zip).
Here is an example of download version 0.2.0:

Unpack it and rename it to suka, then move it to themes directory of your Hexo Project.


Using Git

In this way you can decide which version and branch you want to use. You can use git pull to update the “Suka” if you are using this way.

cd themes
git clone https://github.com/SukkaW/hexo-theme-suka.git suka
cd suka
git checkout {branch/tags name/commit hash}

Install “Suka”

When install “Suka” you need extra steps which is diffrent from other theme. First you need to enter themes directory and install dependencies for “Suka”.

cd themes/suka
npm install --production

Then you need to make a copy of _config.example.yml and rename the copy to _config.yml.

cp -i _config.example.yml _config.yml

As the theme is developing, the theme config template will changes. It will avoid conflict for users who are using git pull to upgrade the theme.

If you are using git for your Hexo Project or you are using CI to generate and deploy your site, please read [Advanced Setting - CI] for more details.

Now back to the root directory of your Hexo Project, then run:

cat /themes/suka/site_config.yml >> _config.yml

Now your site config should be something like:

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: landscape

# Suka Theme config
# Documents: https://theme-suka.skk.moe/docs/
suka_theme:
  search:
    enable: false
    path: search.json
    field: post # Page | Post | All. Default post
  prism:
    enable: false
    line_number: true
    theme: default

Enable “Suka”

Change theme key’s value to suka.

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
-theme: landscape
+theme: suka

# Suka Theme config
# Documents: https://theme-suka.skk.moe/docs/
suka_theme:
  search:
    path: search.json
    field: post # Page | Post | All. Default post
  prism:
    line_number: true
    theme: default

Start “Suka”

Run the command below to start a local Hexo Server.

hexo s --debug

During the service startup process, pay attention to whether there are any abnormal information. If you want to report problems, those information will help.

When there were something like lines below

INFO  Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.

It means Hexo has already run on your device, check https://localhost:400 at your browser.

If you have problem using “Suka”, try search in the docs at sidebar or add new issue at GitHub.

Update “Suka”

If you downloaded “Suka” at GitHub release, then you should rename your theme directory from suka to suka-old, rename the new version “Suka” directory to suka. Then follow the guide at change log to migrate your configuration into newer one. After test you can delete suka-old directory.


If you used git to download “Suka”, you need to backup your theme config (for example, rename it to _config.old.yml) then run git pull to update the “Suka”. Now you have a new _config.example.yml, make a copy of it and rename the copy to _config.yml. Now you can migrate your old theme config from _config.old.yml to _config.yml. After the test you can delete _config.old.yml.