npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

peertube-plugin-better-menu

v1.0.0

Published

A fully customizable menu plugin for PeerTube. This plugin allows you to add/remove/reorder menu items, and group them into custom sections. You can also conditionally show menu items based on if a user is logged in or not.

Readme

Better Menu for PeerTube

Better menu is an update to the menu-items plugin created by Kontrollanten at: https://framagit.org/kontrollanten/peertube-plugin-menu-item

In the 7.1.0 release, PeerTube added the ability to add external links into menu items. This plugin was created to take advantage of that, plus a few more features

For our use case, we wanted the ability to populate the left menu with relevant links for visitors to the site, as the left menu is all but useless unless a user is logged in. However, we did not want to crowd the left menu with unwanted links when a site user logged in.

Features

  1. Add your own custom left menu section and links (Internal or External Link)
  2. Remove unwanted system generated left menu links
  3. Conditionally show a "Live Now!" button in the left menu, if any user on your instance is live
  4. NEW Conditionally hide or show ANY link based on if a user is logged in or not

Usage

  1. Install plugin

  2. Go to plugin settings

  3. Enable the plugin, choose your settings, and add your own custom sections.

  4. To show a link to all users, regardless of logged in status, do NOT define showIfLoggedIn at all on the link

  5. To show a link to ONLY logged in users: [showIfLoggedIn:true]

  6. To show a link to ONLY NON-logged in users: [showIfLoggedIn:false]

Available parameters for every link

[label:] (REQUIRED): The text shown in the menu • [destination:] (REQUIRED): The link destination (internal or external) • [icon:] (OPTIONAL): The icon shown in the menu • [iconClass:] (OPTIONAL): Optional css class added to the link for further customization • [isPrimaryButton:] (OPTIONAL): Converts the visual layout of a "normal" link to a "primary" link as defined by your theme • [showIfLoggedIn:] (OPTIONAL): Conditionally show/hide the link based on if a user is currently logged in

Example custom section:

Reference the example code below for all customizations available to a menu item:

My First Section
[label:My External Link] [destination:https://example.com/videos/watch/12345] [icon:videos] [iconClass:custom-icon-class] [isPrimaryButton:true] [showIfLoggedIn:false]
[label:My Internal Link] [destination:/videos/browse?categoryOneOf=19&sort=-publishedAt] [icon:home] [iconClass:custom-icon-class] [isPrimaryButton:false] [showIfLoggedIn:true]

My Second Section
[destination:/videos/trending] [label:Trending Videos] [icon:trending]
[destination:/videos/recently-added] [label:Recently Added] [icon:share] [showIfLoggedIn:true]

Icons Choices:

the [icon:] parameter can specify any icon that is currently included in the PeerTube package. That list is available at: https://github.com/Chocobozzz/PeerTube/blob/develop/client/src/app/shared/shared-icons/global-icon.component.ts

To use your own icon istead of a built-in PeerTube icon, specify your own custom iconClass and use CSS to achieve the desired result.