Display categories on your Discourse homepage with configurable styles (pills, cards, badges) and horizontal scroll layout.
- Features
- Quick Start
- Screenshots
- Installation
- Configuration
- Display Styles
- Frontend Components
- File Structure
- Roadmap
- Development
- Localization
- Troubleshooting
- Contributing
- License
- Three Display Styles: Pills, Cards, or Badges
- Responsive Settings: Different styles for desktop and mobile
- Configurable Sorting: By position, name, or topic count
- Category Filtering: Exclude specific categories by ID
- Subcategory Control: Include or exclude subcategories
- Topic Count Display: Optional topic count per category
- Category Icons: Show category logos/icons
- Mobile Optimized: Horizontal scroll layout
- Home-Only Option: Show only on homepage, hide on category pages
- Localization: Supports multiple languages (English, Spanish included)
# 1. Clone into your Discourse plugins directory
cd /var/discourse/plugins
git clone https://github.com/JoaquinSantarcangelo/discourse-home-categories.git
# 2. Rebuild the container
cd /var/discourse && ./launcher rebuild app
# 3. Configure in Admin > Settings > search "home_categories"For detailed installation options, see Installation.
Compact pill/chip style with category color accent.
Card layout with description and topic count.
Minimal badge style with color indicator.
Responsive horizontal scroll on mobile devices.
Plugin configuration in the admin panel.
-
Add the plugin to your container configuration
Edit your
app.ymlfile (usually at/var/discourse/containers/app.yml):hooks: after_code: - exec: cd: $home/plugins cmd: - git clone https://github.com/JoaquinSantarcangelo/discourse-home-categories.git
-
Rebuild the container
cd /var/discourse ./launcher rebuild app -
Configure the plugin
Go to Admin > Settings and search for
home_categoriesto configure.
-
Clone the plugin into your plugins directory
cd /path/to/discourse/plugins git clone https://github.com/JoaquinSantarcangelo/discourse-home-categories.git -
Restart your Discourse server
bin/rails server
Navigate to Admin > Settings and search for home_categories:
| Setting | Default | Type | Description |
|---|---|---|---|
home_categories_enabled |
true | boolean | Enable/disable the categories display |
home_categories_style_desktop |
pills | enum | Display style for desktop (pills, cards, badges) |
home_categories_style_mobile |
badges | enum | Display style for mobile (pills, cards, badges) |
home_categories_sort_by |
position | enum | Sort by: position, name, or topics_count |
home_categories_max_items |
10 | integer (1-50) | Maximum categories to display |
home_categories_show_count |
true | boolean | Show topic count per category |
home_categories_show_icon |
true | boolean | Show category icon/logo |
home_categories_exclude_ids |
"" | category_list | Categories to exclude (select from list) |
home_categories_include_subcategories |
false | boolean | Include subcategories in display |
home_categories_only_on_home |
true | boolean | Only show on home, not category pages |
Compact horizontal pills with:
- Category color as left border
- Category name
- Optional icon
- Optional topic count badge
Best for: Minimal space usage, quick navigation
Larger cards with:
- Category color as top border
- Category icon and name
- Truncated description
- Topic count in footer
Best for: More visual appeal, showing category descriptions
Minimal badges with:
- Small color square indicator
- Category name
- Topic count in parentheses
Best for: Maximum compactness, text-focused design
| Component | Description |
|---|---|
home-categories.gjs |
Main connector component injected into discovery page |
category-pill.gjs |
Pill/chip style category display |
category-card.gjs |
Card style with description |
category-badge.gjs |
Minimal badge style |
The plugin injects into the discovery-list-controls-above outlet, placing categories above the navigation filters.
discourse-home-categories/
├── plugin.rb # Main plugin file
├── README.md # Documentation
├── LICENSE # MIT License
├── assets/
│ ├── javascripts/discourse/
│ │ ├── components/
│ │ │ ├── category-pill.gjs
│ │ │ ├── category-card.gjs
│ │ │ └── category-badge.gjs
│ │ └── connectors/
│ │ └── discovery-list-controls-above/
│ │ └── home-categories.gjs
│ └── stylesheets/
│ └── home-categories.scss
└── config/
├── settings.yml # Plugin settings
└── locales/
├── client.en.yml
├── client.es.yml
├── server.en.yml
└── server.es.yml
Planned features for future releases:
- Grid Layout - Display categories in a responsive grid
- Wrap Layout - Flexbox layout with wrapping to multiple rows
- Custom CSS Classes - Add custom classes for advanced styling
- Category Whitelist - Option to show only specific categories
- Drag & Drop Reordering - Manual category order in admin
Have a feature request? Open an issue!
- Clone the plugin to your local Discourse plugins directory
- Restart the Rails server
- Access Admin > Settings to configure
bin/lint plugins/discourse-home-categoriesThe plugin uses Discourse CSS variables for theming:
--primary,--primary-rgb--primary-low,--primary-medium,--primary-very-low--secondary--font-down-1,--font-down-2,--font-0
Category colors are passed via --category-color CSS custom property.
Translation files in config/locales/:
client.{locale}.yml- Frontend stringsserver.{locale}.yml- Admin settings descriptions
Included languages: English (en), Spanish (es)
To add a new language, create the corresponding locale files following the existing structure.
- Verify the plugin is enabled: Admin > Settings > search
home_categories_enabled - Check if you're on a supported page (home by default)
- Ensure categories exist and aren't all excluded
- Check
home_categories_exclude_idssetting - Verify
home_categories_include_subcategoriessetting - Adjust
home_categories_max_itemsif needed
The plugin uses horizontal scroll on all screen sizes. You can configure different styles (pills, cards, badges) for desktop and mobile independently.
- Clear browser cache
- Rebuild Discourse container (production)
- Restart Rails server (development)
Contributions are welcome! Here's how you can help:
- Search existing issues before creating a new one
- Include Discourse version, plugin version, and steps to reproduce
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Follow existing code style and conventions
- Test your changes locally
- Submit a pull request with a clear description
- Copy
config/locales/client.en.ymltoclient.{locale}.yml - Copy
config/locales/server.en.ymltoserver.{locale}.yml - Translate all strings
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.




