README.md 5.87 KB
Newer Older
1

Mantas's avatar
v2-dev2    
Mantas committed
2
3
4
<p style="text-align:center">

![cState](https://raw.githubusercontent.com/mistermantas/cstate/master/images/highlight.png)
Mantas's avatar
Mantas committed
5

Mantas's avatar
Mantas committed
6
[![GitHub release](https://img.shields.io/github/release/mistermantas/cstate.svg?style=flat-square)](https://github.com/mistermantas/cstate/releases) [![GitHub last commit](https://img.shields.io/github/last-commit/mistermantas/cstate.svg?style=flat-square)](https://github.com/mistermantas/cstate/commits/master) [![GitHub repo size in bytes](https://img.shields.io/github/repo-size/mistermantas/cstate.svg?style=flat-square)](https://github.com/mistermantas/cstate/tree/master/) [![Gitter](https://img.shields.io/badge/chat-gitter-ed1965.svg?style=flat-square)](https://gitter.im/cState/Lobby) [![Twitter](https://img.shields.io/twitter/follow/mistermantas.svg?style=social&label=Follow)](https://twitter.com/mistermantas)
7

Mantas's avatar
v2-dev2    
Mantas committed
8
9
</p>

Mantas's avatar
Mantas committed
10
> Über fast, backwards compatible (IE8+), tiny, and simple status page built with Hugo. Compatible with Netlify & GitHub Pages.
11

Mantas's avatar
Mantas committed
12
13
*This release is a developer preview.*

Mantas's avatar
v2-dev2    
Mantas committed
14
[**Live demo**](https://themes.gohugo.io/theme/cstate/)
15

16
## Contents
17

Mantas's avatar
Mantas committed
18
+ [Features](#features)
Mantas's avatar
Mantas committed
19
20
21
22
+ Getting started
  + [Production](#production)
  + [Development](#development)
  + [Updating](#updating)
23
+ [FAQ](#faq)
Mantas's avatar
Mantas committed
24
25
+ [Contribute](#contribute)
+ [License](#license)
26

Mantas's avatar
Mantas committed
27
28
## Features

29
+ Built with [Hugo](https://gohugo.io), a hyperfast Golang generator
Mantas's avatar
Mantas committed
30
+ Works not just on mobile, but also on the archaic Internet Explorer 8
31
+ Comes with a simple, focused, and extremely light design
Mantas's avatar
Mantas committed
32
33
+ Edit your status page from a simple config file
+ Comes pre-equipped with Netlify CMS for quick admin updates
34
+ Easy to edit and deploy on Netlify or GitHub Pages
Mantas's avatar
Mantas committed
35
36
37
38
39
+ Secure, ready for HTTPS, thanks to [JAMstack](https://jamstack.org/)

## Getting started

For this tutorial, it is assumed that you have Hugo and Git installed (check with `hugo version` & `git --version`).
Mantas's avatar
Mantas committed
40

Mantas's avatar
Mantas committed
41
#### Production (with Netlify)
Mantas's avatar
Mantas committed
42

43
44
45
46
We encourage you to use [Netlify](https://www.netlify.com) for cState. These are the following options you need to change in deploy settings:

+ Build command: **hugo**
+ Publish directory: **public**
Mantas's avatar
Mantas committed
47
+ Add one build environment variable
48
49
  + Key: **HUGO_VERSION**
  + Value: **0.31**
Mantas's avatar
Mantas committed
50

Mantas's avatar
Mantas committed
51
52
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.
Mantas's avatar
Mantas committed
53

54
```bash
Mantas's avatar
Mantas committed
55
56
mkdir themes; cd themes;
```
Mantas's avatar
Mantas committed
57

Mantas's avatar
Mantas committed
58
3. Now simply add a Git submodule pointing to this repository, like so:
59

Mantas's avatar
Mantas committed
60
61
```bash
git submodule add https://github.com/mistermantas/cstate
62
```
63

Mantas's avatar
Mantas committed
64
65
66
4. Set up cState for your liking. It is now ready to be deployed

#### Development
67

Mantas's avatar
Mantas committed
68
1. Clone this repository in the command line:
69

Mantas's avatar
Mantas committed
70
71
72
```bash
git clone https://github.com/mistermantas/cstate.git
```
73

Mantas's avatar
Mantas committed
74
2. Go to the `exampleSite` folder, like so:
75
76

```bash
Mantas's avatar
Mantas committed
77
78
cd cstate-master/exampleSite
```
79

Mantas's avatar
Mantas committed
80
3. Uncomment this line in `config.yml`:
81

Mantas's avatar
Mantas committed
82
83
84
85
86
```yml
# themesDir: ../..
```

3. Then try out the site! A link to it will be shown on screen.
87

Mantas's avatar
Mantas committed
88
89
```bash
hugo serve
90
91
```

Mantas's avatar
Mantas committed
92
93
94
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.
95

96
97
## Updating

Mantas's avatar
Mantas committed
98
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.
99
100

```bash
Mantas's avatar
Mantas committed
101
git submodule update
102
103
```

104
## FAQ
Mantas's avatar
Mantas committed
105

106
107
### Where do issues go? What is the frontmatter, how do I define metadata for issues?

Mantas's avatar
Mantas committed
108
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 `major-outage-east-us.md` should look like:
109
110
111

```md
---
Mantas's avatar
Mantas committed
112
113
Title: Major outage in East US
Date: 2017-02-30 14:30:00
114
Resolved: true
Mantas's avatar
Mantas committed
115
ResolvedWhen: 2017-02-30 16:00:00
116
117
Severity: down
Affected:
Mantas's avatar
Mantas committed
118
  - API
119
120
121
Section: post
---

Mantas's avatar
Mantas committed
122
123
124
*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" >}}
125
126
```

127
128
129
Time to break that down.

`Title`: This is the one of the most important parts of an incident. *(required)*  
Mantas's avatar
Mantas committed
130
`Date`: An ISO-8601 formatted date. Does not include time zone. This is when you first discovered the issue. *(required)*  
131
`Resolved`: Whether issue should affect overall status. Either `true` or `false`. *(boolean, required)*  
Mantas's avatar
Mantas committed
132
`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).  
133
134
135
136
`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)*  

Mantas's avatar
Mantas committed
137
## Contribute
138

139
140
+ Glance over the [Code of Conduct](/CODE_OF_CONDUCT.md).
+ Before submitting a pull request, create an issue to [discuss the implications of your proposal](https://github.com/mistermantas/cstate/issues).
Mantas's avatar
Mantas committed
141
142
+ Write consistent, simple, readable code and precise documentation.
+ [Join the Gitter chat](http://discord.io/choraleapp) for help or discussion.
143
144
145

## License

Mantas's avatar
Mantas committed
146
[MIT](https://github.com/mistermantas/cstate/blob/master/LICENSE.md) © Mantas Vilčinskas