This theme is based on CodeDaraW/Hacker
A simple, elegant Hexo theme focused on writing and reading experience. Demo: fengyukongzhou.github.io
- 🎨 Minimalist design, content-focused
- 📱 Responsive layout with dark mode support for mobile devices
- 💡 Code highlighting support
- 📑 Article table of contents
- ❤️ Article like button
- 💬 Multiple comment systems support
- 📊 Google Analytics and Baidu Statistics support
- 📝 MathJax support
- 📈 Integrated hexo-graph data visualization
- 🖋 Elegant typography with special handling for Chinese/English italics
- 📌 Beautiful blockquote design with different citation styles for Chinese and English
- ⬆️ Convenient back-to-top button for enhanced browsing experience
Install required plugins:
# Install hexo-graph plugin for data visualization
npm install hexo-graph
# Or using yarn
yarn add hexo-graph
# Or using pnpm
pnpm add hexo-graphgit clone https://github.com/fengyukongzhou/Hacker.git themes/hacker- Modify
_config.ymlin your Hexo root directory:
theme: hacker- Create and edit the theme configuration file by referring to
_config.example.yml:
cp themes/hacker/_config.example.yml themes/hacker/_config.yml- Modify the theme configuration file
themes/hacker/_config.ymlas needed
cd themes/hacker
git pullConfigure the website navigation menu items. You can customize and add the links you need.
menu:
Home: /
Archives: /archives
Categories: /categories
Tags: /tagsThe theme supports comprehensive favicon configuration for various devices. You can use favicon.io to generate the required icon files online. After generation, place all files in the source/favicon_io directory.
Supported icon files include:
- android-chrome-192x192.png
- android-chrome-512x512.png
- apple-touch-icon.png
- favicon-16x16.png
- favicon-32x32.png
- favicon.ico
- site.webmanifest
Configuration example:
favicon:
enable: true
icon: /favicon_io/favicon.ico
apple_touch_icon: /favicon_io/apple-touch-icon.png
android_chrome_icon: /favicon_io/android-chrome-192x192.png
manifest: /favicon_io/site.webmanifestControl whether to display the "Read More" button in the article list.
read_more_btn: falseEnable MathJax to support mathematical formula rendering.
mathjax:
enable: true
cdn: https://cdn.jsdelivr.net/npm/mathjax@2.7.8/MathJax.js?config=TeX-AMS-MML_HTMLorMMLConfigure whether to display article table of contents and numbering.
toc:
enable: true
number: trueSupports multiple comment systems:
- Gitalk
- Gitment
- Valine
- Disqus
- Utterances
- Livere
- Giscus
Supports Google Analytics and Baidu Statistics. Just fill in the corresponding tracking ID in the configuration file.
Article like button feature based on LeanCloud, requires configuration:
like_button:
enable: true
appId: your-app-id
appKey: your-app-key
serverURL: your-server-urlThe theme includes a convenient back-to-top button that automatically appears when the page is scrolled beyond a certain distance. Clicking it smoothly scrolls back to the top of the page. The button design is consistent with the dark mode toggle button, providing a cohesive visual experience.
- Auto show/hide: Appears when the page is scrolled beyond 300 pixels
- Smooth scrolling: Smoothly returns to the top of the page when clicked
- Responsive design: Adapts to various device screens
- Dark mode compatible: Automatically adapts to dark/light themes
The theme provides beautifully designed blockquotes with support for different citation styles in Chinese and English environments.
> This is a quoted text.
>
> This is the second paragraph of the quote.Blockquotes support adding citation sources, which will be displayed at the bottom right of the blockquote. The dash style will automatically adapt based on the language:
English Environment (using single em dash):
> This is an English quote.
>
> <footer lang="en">Source</footer>Chinese Environment (using double em dash):
> 这是一段中文引用。
>
> <footer lang="zh">引用来源</footer>You can also use the <cite> tag instead of the <footer> tag:
> This is a quoted text.
>
> <cite lang="en">Source</cite>- Beautiful visual design, including quotation mark decoration and gradient bottom border
- Hover effect, where the blockquote slightly rises and increases shadow
- Dark mode compatible, with excellent display in different themes
- Automatically adjusts dash style based on language environment: English uses single em dash (—), Chinese uses double em dash (——)
Issues and Pull Requests are welcome.
