Free, no-nonsense, super-fast blogging.
🧸 A Hugo theme based on Bear Blog.
Transplanted from Hugo Bear Blog, because the original author chose to maintain consistency with the root original Bear Blog, so I chose to create a more extensible and feature-rich Hugo Bear Blog.
Guidelines
- Continue to uphold the philosophy of Bear Blog
- Ensure the ability to revert to configurations identical to Hugo Bear Blog or even to Bear Blog itself
TOC
Based on Hugo Bear Blog, the following features have been added:
- Upvote posts (Highlight feature 👍, inspired by Bear Blog and powered by Kudos)
- Search post
- Post list page grouped by year
- Table of contents
- Image zoom
- Mermaid diagrams
- External link handling
- Follow App Claim
There are still some optimization items:
- Add canonical metadata, better SEO
- Support RSS
- More abundant Footer content
- ...
For a current & working demo of this theme, please check out https://rokcso.com/ 🎯.
This theme requires Hugo v0.110.0 or later. From the root of your Hugo site, clone the theme into the themes directory:
git clone https://github.com/rokcso/hugo-bearneo.git themes/hugo-bearneoAdd the theme name to your site's hugo.toml:
theme = "hugo-bearneo"Start the local server:
hugo serverSee the options below to enable features such as post search, table of contents, image zoom, and upvotes.
This theme provides Bear Blog-style upvotes, powered by Kudos, a Cloudflare Workers + D1 service. Deploy Kudos first, then configure its URL as the Upvote endpoint.
Kudos associates each upvote count with its page, so changing the site's domain does not reset an article's upvote count.
Then add the following configuration to the Hugo blog configuration file hugo.toml:
[params]
upvote = true
upvoteURL = "https://kudos.example.com"upvoteURL may include or omit a trailing /.
Display a search box on the post list page and enter post title keywords to search for specific posts.
Add the following configuration to the Hugo blog configuration file hugo.toml:
[params]
postSearch = trueAdd the following configuration to the Hugo blog configuration file hugo.toml:
[params]
groupByYear = trueAdd the following configuration to the Hugo blog configuration file hugo.toml:
[params]
toc = trueAdd the following configuration to the Hugo blog configuration file hugo.toml:
[params]
imageZoom = trueSet mermaid: true in a page's front matter, then use a Mermaid fenced code block in its Markdown content. Mermaid JavaScript loads only on pages that opt in.
---
mermaid: true
---
```mermaid
flowchart LR
Reader --> Article
Article --> Kudos
```Set this option to open external HTTP(S) links in a new tab. Internal links continue to open in the current tab. External links receive rel="noopener noreferrer" in either mode.
[params]
externalLinksNewTab = trueFollow is an RSS subscription tool. As a blog creator, claiming your blog on Follow allows you to receive $POWER tips from blog readers through Follow. I once wrote an article explaining how to claim your blog on Follow.
The hugo-bearneo natively supports the "Scheme III: RSS Tag" mentioned in my article. You only need to add the following configuration to the Hugo blog configuration file hugo.toml:
[params.RSS]
followFeedId = "00000000000000000"
followUserId = "00000000000000000"Note: Please remember to replace the Follow id in the configuration with your own!
A special thank you goes out to Herman, for creating the original ʕ•ᴥ•ʔ Bear Blog.
Another special thanks to janraasch, without his hugo-bearblog, there would not be hugo-bearneo.