/cstate

🔥 Open source static status page. Uses hyperfast Golang & Hugo, minimal JS, super light HTML/CSS, customizable, outstanding browser support (IE8+). LIVE DEMO —

Primary LanguageHTMLMIT LicenseMIT

cState example illustration

GitHub release GitHub last commit GitHub repo size in bytes Discord Chat Twitter Awesome status page

Über fast, backwards compatible (IE8+), tiny, and simple status page built with Hugo. Completely free with Netlify & GitHub Pages.

🎯 Want an example? Click here to see a live demo!

👩‍💻 You can also see what an example cState project’s source code.

Contents ⁉


Features 😎

Designed with care

  • Comes with a simple, focused, and extremely light design
  • Works not just on mobile, but also on the archaic Internet Explorer 8
  • Makes you accountable, showcasing how long it took for an issue to be resolved
  • Great for data manipulation and viewing — has RSS, tag-like system feeds

Fast, reliable, and free

  • Built with Hugo, a hyperfast Golang generator
  • Secure, ready for HTTPS, thanks to JAMstack
  • Easy to edit and deploy on Netlify for absolutely free

Easy to setup, manage, use

  • Edit your status page from a simple config file
  • Comes pre-equipped with Netlify CMS for quick admin updates
  • Extensive documentation on the wiki

Getting started 💻

For this tutorial, it is assumed that you have Hugo and Git installed (check with hugo version & git --version).

A minimum version of 0.48 is required for Hugo, starting with v3.

Production

We encourage you to use Netlify for cState. These are the following options you need to change in deploy settings:

  • Build command: hugo
  • Publish directory: public
  • Add one build environment variable
    • Key: HUGO_VERSION
    • Value: 0.48

The easy way

You can simply click this button to get started:

Deploy to Netlify

This sets up cState with its default settings from the cstate/example repo.


If you want to do this from any branch in this repository, follow the manual instructions:

  1. Download the contents of the exampleSite directory in this repository. This will be your site guts, which will hold the content and configuration for the status page.
  2. Create a themes folder and navigate to it on the command line.
mkdir themes; cd themes;
  1. Now simply add a Git submodule pointing to this repository, like so:
git submodule add https://github.com/cstate/cstate
  1. Set up cState for your liking. It is now ready to be used in production.

Development

  1. Clone this repository in the command line:
git clone https://github.com/cstate/cstate.git
  1. Navigate to the theme directory:
cd cstate/exampleSite
  1. Launch the development setup much like this:
hugo serve --baseUrl=http://localhost/ --theme=cstate --themesDir=../.. --verbose

The main directory is the theme itself (the cState guts, basically) and the exampleSite folder houses all content. Use this local setup to experiment before deploying to production!

If you would like to commit/make a PR, make sure that themesDir is a comment before trying to merge upstream.

Updating 🎉

Assuming the production install instructions were followed, keep cState updated by having an up to date Git submodule in the themes folder. containing this repository. Your content will stay separate, as to avoid any conflicts.

If you already have a Git repository set up with a filled up themes/cstate folder, then all you need to do is this:

git submodule foreach git pull origin master

If you have previously used Netlfiy CMS or have made other changes without using the command line, the easiest thing to do is just clone it in a new place, change it how you want to, push those changes, and then you can safely remove the Git folder. So, do this:

git clone --recursive <your repo link goes here> && git submodule foreach git pull origin master

More info about submodules on updating & cloning.

FAQ 🤔

Where do issues go?

Using an admin panel (Netlify CMS)

This takes a little more effort to set up but pays off in the long run — see the wiki for up to date information.

Doing it from the Git repository

Create a file in content/issues. The name of the file will be the slug (what shows up in the URL bar). For example, this is what 2017-02-30-major-outage-east-us.md should look like:

---
title: Major outage in East US
date: 2017-02-30 14:30:00
resolved: true
resolvedWhen: 2017-02-30 16:00:00
severity: down
affected:
  - API
section: issue
---

*Monitoring* - After hitting the ole reboot button Example Chat App is now recovering. We’re going to continue to monitor as everyone reconnects. {{< track "2018-04-13 16:50:00" >}}

*Investigating* - We’re aware of users experiencing unavailable guilds and issues when attempting to connect. We're currently investigating. {{< track "2018-04-13 15:54:00" >}}

Time to break that down.

title: This is the one of the most important parts of an incident. (required)
date: An ISO-8601 formatted date. Does not include time zone. This is when you first discovered the issue. (required)
resolved: Whether issue should affect overall status. Either true or false. (boolean, required)
resolvedWhen: An ISO-8601 formatted date. Does not include time zone. This is when downtime stopped. You may set the time that downtime ended without completely resolving the issue (thus leaving time for monitoring).
severity: If an issue is not resolved, it will have an applied severity. There are 3 levels of severity: notice, disrupted, and down. If there are multiple issues, the status page will take the appearance of the more drastic issue (such as disrupted instead of notice). (required)
affected. Add the items that were present in the config file which should alter the status of each individual system (component). (array, required)
section. This must be issue, so that Hugo treats it as one. (required)

I have more questions!

Check out the wiki.

Contribute 💥

Want to become a maintainer? Hit me up! @mistermantas

License ✍

MIT © Mantas Vilčinskas

Thanks to all the contributors!