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 🙏

© 2024 – Pkg Stats / Ryan Hefner

apostrophe-maintenance-mode

v2.0.1

Published

Put an ApostropheCMS site in maintenance mode, displaying a maintenance message to everyone except full site admins until it is turned off again.

Downloads

77

Readme

Installation

npm install apostrophe-maintenance-mode

In app.js:

modules: {
  'apostrophe-maintenance-mode': {}
}

Now log in as a full admin and click the "Global" button. Then click on the "Maintenance" tab.

You will see an option to put the site in maintenance mode, as well as fields for the title and message to be displayed on the maintenance page users see while the site is "under maintenance."

You can set the text for those fields first before turning on maintenance mode. If you don't a reasonable default message is displayed.

What ordinary site visitors and editors see

Logged-out site visitors and editors who do not have the full admin permission will see the maintenance message. You can customize that message by creating a lib/modules/apostrophe-maintenance-mode/views folder in your project and copying the message.html file from this module there. You may extend your layout in the normal way if you wish.

I logged out! How do I shut off maintenance mode?

The /login URL still works normally. Log in as an account with the admin permission and disable maintenance mode via the same dropdown you used to turn it on.

Workflow

When this module is used together with apostrophe-workflow, a special rule applies: the "Maintenance Mode" setting automatically commits itself across all locales. That is, the whole site goes into maintenance mode at once, across all languages.

However, the "title" and "message" fields are subject to the normal rules of localization and workflow. When they are modified the "commit" button becomes available in the usual way and they can be committed and exported. To make those messages live in other locales you will need to switch to those locales, translate them, and commit them, just as you would any other content in Apostrophe. We recommend doing that before you turn on maintenance mode. You can then reuse your existing messages in the future to avoid extra effort.