カスタマイズ可能なナビバーコンポーネント

Background

Need quick access to custom links (like Home, Rules, or Badges) directly in a navigation bar? This theme component makes it easy to add and configure a custom navbar that shows up at the top of the page.

How to install

:information_source: Summary Adds a customizable navbar that displays links defined in theme settings.
:hammer_and_wrench: Repository GitHub - ScottMastro/discourse-customizable-navbar
:question: Install Guide How to install a theme or theme component
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

What it does

This component lets you define a custom navigation bar using two theme settings:

  • navbar_name
    A list of labels that will be displayed in the navbar.

  • navbar_location
    A list of URLs corresponding to each label above.
    Example:

The two lists are matched by position, so the first navbar_name entry links to the first navbar_location, and so on. URLs can link to anywhere.


Special cases

  • If a user is not logged in, the component automatically uses a default navbar: About, Rules, and Login (or optionally hide it for anonymous users)
  • Any link containing /admin will only display for admin users.
  • The /messages, /new, and /unread locations automatically display notification bubbles showing live counts for new/unread private messages or topics.

Example

With the settings above the navbar will render as:

「いいね!」 2