Skip to content

Latest commit

 

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hugo ✨ Bear Neo

Free, no-nonsense, super-fast blogging.

English | 简体中文

🧸 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

  1. Continue to uphold the philosophy of Bear Blog
  2. Ensure the ability to revert to configurations identical to Hugo Bear Blog or even to Bear Blog itself

TOC

✨ Features

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
  • ...

🐻 Demo

For a current & working demo of this theme, please check out https://rokcso.com/ 🎯.

🚀 Quick start

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-bearneo

Add the theme name to your site's hugo.toml:

theme = "hugo-bearneo"

Start the local server:

hugo server

See the options below to enable features such as post search, table of contents, image zoom, and upvotes.

📑 User Manual

Upvote posts

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 /.

Search post

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 = true

Post list page grouped by year

Add the following configuration to the Hugo blog configuration file hugo.toml:

[params]
    groupByYear = true

Table of contents

Add the following configuration to the Hugo blog configuration file hugo.toml:

[params]
    toc = true

Image zoom

Add the following configuration to the Hugo blog configuration file hugo.toml:

[params]
    imageZoom = true

Mermaid diagrams

Set 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
```

External links

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 = true

Follow App Claim

Follow 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!

🎁 Acknowledgments

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.

©️ License

MIT License © Rokcso

About

A feature-rich Hugo theme ported from Hugo Bear Blog, originally based on ʕ•ᴥ•ʔ Bear Blog, offering upvote buttons, elegant TOC, and UX refinements.

Topics

Resources

Stars

94 stars

Watchers

2 watching

Forks

Used by

Contributors

Languages