From 41c217030c8f93fb71d2c14e7a6800e0e25a526c Mon Sep 17 00:00:00 2001 From: Alex Selimov Date: Fri, 20 Mar 2026 09:00:56 -0400 Subject: [PATCH] Update README and exampleSite --- README.md | 21 ++++++++++++++++++--- exampleSite/hugo.toml | 11 +++++++++++ theme.toml | 28 ++++++++++++++-------------- 3 files changed, 43 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index a084e50..47ede3d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ -# ᕦʕ •ᴥ•ʔᕤ Bear Cub +# ᕦʕ •ᴥ•ʔᕤ Voting Bear Cub -[![github pages](https://github.com/clente/hugo-bearcub/actions/workflows/gh-pages.yml/badge.svg)](https://github.com/clente/hugo-bearcub/actions/workflows/gh-pages.yml) -[![MIT license](https://img.shields.io/github/license/clente/hugo-bearcub)](https://github.com/clente/hugo-bearcub/blob/main/LICENSE) +[![MIT license](https://img.shields.io/badge/license-MIT-blue)](https://forge.alexselimov.com/aselimov/hugo-bearcub/src/branch/main/LICENSE) ## Overview @@ -9,6 +8,22 @@ Blog](https://bearblog.dev) and [Hugo Bear Blog](https://github.com/janraasch/hugo-bearblog). +This is a fork of [Bear Cub](https://github.com/clente/hugo-bearcub) with the +following additions: + +- **Anonymous post upvoting**: each post can display an upvote button backed by + a configurable API endpoint. Votes are tracked anonymously via cookies so + readers can toggle their vote without creating an account. Enable with + `upvotes = true` and set `upvoteApi` to your API base URL. +- **Redesigned header**: the site header now uses a mesh SVG background for a + more distinctive look. +- **GitHub light/dark color scheme**: the syntax highlighting palette has been + replaced with colors matching the GitHub light and dark themes. +- **Herman CSS upvote styles**: upvote button styles are bundled into the Herman + CSS variant so the button integrates cleanly with the existing theme. +- **Configurable index post count**: use `postsToShowOnIndex` in `[params]` to + control how many posts appear on the home page (defaults to 3). + **Bear Cub** takes care of speed and optimization, so you can focus on writing good content. It is free, multilingual, optimized for search engines, no-nonsense, responsive, light, and fast. Really fast. diff --git a/exampleSite/hugo.toml b/exampleSite/hugo.toml index 04690c0..939c13d 100644 --- a/exampleSite/hugo.toml +++ b/exampleSite/hugo.toml @@ -75,6 +75,17 @@ enableRobotsTXT = true # information see layouts/partials/social_card.html generateSocialCard = true + # The number of posts to show on the index page. Defaults to 3 if not set. + postsToShowOnIndex = 3 + + # Enable upvoting on posts. When set to true, each post will display an upvote + # button that calls the API endpoint specified by `upvoteApi`. + upvotes = false + + # The base URL of the upvote API. Only used when `upvotes = true`. + # The API is expected to handle GET and POST requests at {upvoteApi}/{post-path}. + upvoteApi = "https://example.com/api" + # Social media. Delete any item you aren't using to make sure it won't show up # in your website's metadata. [params.social] diff --git a/theme.toml b/theme.toml index 602a351..7f6b154 100644 --- a/theme.toml +++ b/theme.toml @@ -1,29 +1,29 @@ -name = "Bear Cub" +name = "Voting Bear Cub" license = "MIT" licenselink = "https://github.com/clente/hugo-bearcub/blob/master/LICENSE" -description = "A lightweight Hugo theme based on Bear Blog and Hugo Bear Blog. It is free, multilingual, optimized for search engines, no-nonsense, responsive, light, and fast. Really fast." +description = """A lightweight Hugo theme based on Bear Blog and Hugo Bear Blog. It is free, +multilingual, optimized for search engines, no-nonsense, responsive, light, and fast. Really fast. +This version adds an upvote button that connects to an +https://forge.alexselimov.com/aselimov/upvoters server to handle anonymous upvotes. +""" # The home page of the theme, where the source can be found. -homepage = "https://github.com/clente/hugo-bearcub" - -# If you have a running demo of the theme. -demosite = "https://clente.github.io/hugo-bearcub" +homepage = "https://forge.alexselimov.com/aselimov/hugo-bearcub" tags = ["blog", "responsive", "minimal", "personal", "dark", "multilingual"] features = ["favicon", "seo", "no javascript", "rss", "social cards"] # If the theme has a single author [author] - name = "Caio Lente" - homepage = "https://lente.dev" +name = "Alex Selimov" +homepage = "https://alexselimov.com" -# If porting an existing theme [original] - author = "Jan Raasch" - homepage = "https://www.janraasch.com" - repo = "https://github.com/janraasch/hugo-bearblog" +name = "Caio Lente" +homepage = "https://lente.dev" +repo = "https://github.com/clente/hugo-bearcub" # Hugo versions the theme supports [module] - [module.hugoVersion] - min = "0.90" +[module.hugoVersion] +min = "0.90"