A responsive, dark and simple Hexo theme for a personal website.
🌵 Demo
- Version : 2.1
- Compatibility : Hexo 3 or later
- Fully responsive
- Disqus
- Googe analytics
- Font Awesome icons
- Pick your own code highlighting scheme
- Configurable navigation menu
- Support for local search
- Projects list
- Simplicity
- I18n support
-
In the
root
directory:$ git clone https://github.com/probberechts/cactus-dark.git themes/cactus-dark $ npm install hexo-pagination --save
-
Change the
theme
property in theconfig.yml
file.# theme: landscape theme: cactus-dark
-
Run:
hexo generate
andhexo server
Setup the navigation menu in the theme's _config.yml
:
nav:
Home: /
About: /about/
Writing: /archives/
Projects: http://github.com/probberechts
LINK_NAME: URL
You have two options for the list of blog posts on the home page:
-
Show only the 5 most recent posts (default)
customize: show_all_posts: false post_count: 5
-
Show all posts
customize: show_all_posts: true
Create a projects file source/_data/projects.json
.
[
{
"name":"Hexo",
"url":"https://hexo.io/",
"desc":"A fast, simple & powerful blog framework"
},
{
"name":"Font Awesome",
"url":"http://fontawesome.io/",
"desc":"The iconic font and CSS toolkit"
}
]
Cactus Dark can automatically add links to your social media accounts. Therefore, update the theme's _config.yml
:
customize:
social_links:
github: your-github-url
twitter: your-twitter-url
NAME: your-NAME-url
where NAME
is the name of a Font Awesome icon.
If you are new to Hexo and internationalization (i18n), please read Hexo documentation - internationalization (i18n) section
Currently, the theme is delivered with:
- English (en), default
- Chinese (Simplified, PRC) (zh-CN)
- French (fr)
- Dutch (nl)
If you would like to use one the languages listed above, simply set language
to the desired language (e.g., fr
) in _config.yml
.
Otherwise, you can follow the steps below (E.g., to add a Japanese (ja) translation):
- Set
language
toja
in Hexo configuration file_config.yml
- Create a
ja.yml
file in thethemes/cactus_dark/languages/
folder - Copy the content of
themes/cactus_dark/languages/default.yml
and paste it it into theja.yml
file - Replace all English strings by their Japanese translation
Note: Cactus Dark does not support multi-language sites.
Set the rss
field in the theme's _config.yml
to one of the following values:
rss: false
will totally disable rss (default).rss: atom.xml
sets a specific feed link.rss:
leave empty to use the hexo-generator-feed plugin.
Add you Google Analytics tracking_id
to the theme's _config.yml
.
plugins:
gooogle_analytics: 'UA-49627206-1' # Format: UA-xxxxxx-xx
First, create a site on Disqus: https://disqus.com/admin/create/.
Next, update the theme's _config.yml
file:
plugins:
disqus_shortname: SITENAME
where SITENAME
is the name you gave your site on Disqus.
Pick one of the available colorschemes and add it to the theme's _config.yml
:
customize:
highlight: COLORSCHEME_NAME
First, install the hexo-generate-search plugin, which will generate a search index file.
$ npm install hexo-generator-search --save
Next, create a page to display the search engine:
$ hexo new page Search
and put search: true
in the front-matter.
Finally, edit the theme's _config.yml
and add a link to the navigation menu.
nav:
...
Search: /Search/
...
MIT