README.md 6.79 KB
Newer Older
Mantas's avatar
v2-rc1    
Mantas committed
1
<p align="center"><img src="https://raw.githubusercontent.com/cstate/cstate/master/images/highlight.png" alt="cState"></p>
Mantas's avatar
v2-dev2    
Mantas committed
2

Mantas's avatar
v2-rc1    
Mantas committed
3
<p align="center"><a href="https://github.com/cstate/cstate/releases"><img src="https://img.shields.io/github/release/cstate/cstate/all.svg?style=flat-square" alt="GitHub release" /></a> <a href="https://github.com/cstate/cstate/commits/master"><img src="https://img.shields.io/github/last-commit/cstate/cstate.svg?style=flat-square" alt="GitHub last commit" /></a> <a href="https://github.com/cstate/cstate/tree/master/"><img src="https://img.shields.io/github/repo-size/cstate/cstate.svg?style=flat-square" alt="GitHub repo size in bytes" /></a> <a href="https://gitter.im/cState/Lobby"><img src="https://img.shields.io/badge/chat-gitter-ed1965.svg?style=flat-square" alt="Gitter" /></a> <a href="https://twitter.com/cstate"><img src="https://img.shields.io/twitter/follow/mistermantas.svg?style=social&amp;label=Follow" alt="Twitter" /></a> <a href="https://github.com/matiassingers/awesome-readme#readme"><img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome README" /></a></p>
Mantas's avatar
v2-dev2    
Mantas committed
4

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

Mantas's avatar
Mantas committed
7
[**Want an example? Click here to see a live demo!**](https://cstate-example.netlify.com)
Mantas's avatar
Mantas committed
8

Mantas's avatar
v2-rc1    
Mantas committed
9
10
[You can also see what an example cState project’s source code.](https://github.com/cstate/example)

Mantas's avatar
Mantas committed
11
*Looking for contributors! See Contribute section:*
12

13
## Contents
14

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

Mantas's avatar
Mantas committed
24
25
***

Mantas's avatar
Mantas committed
26
27
## Features

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

## 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
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
  + Key: **HUGO_VERSION**
Mantas's avatar
Mantas committed
49
50
51
  + Value: **0.41**

***
Mantas's avatar
Mantas committed
52

Mantas's avatar
Mantas committed
53
54
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
55

56
```bash
Mantas's avatar
Mantas committed
57
58
mkdir themes; cd themes;
```
Mantas's avatar
Mantas committed
59

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

Mantas's avatar
Mantas committed
62
```bash
Mantas's avatar
v2-rc1    
Mantas committed
63
git submodule add https://github.com/cstate/cstate
64
```
65

Mantas's avatar
Mantas committed
66
4. Set up cState for your liking. It is now ready to be used in production.
Mantas's avatar
Mantas committed
67
68

#### Development
69

Mantas's avatar
Mantas committed
70
1. Clone this repository in the command line:
71

Mantas's avatar
Mantas committed
72
```bash
Mantas's avatar
v2-rc1    
Mantas committed
73
git clone https://github.com/cstate/cstate.git
Mantas's avatar
Mantas committed
74
```
75

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

```bash
Mantas's avatar
Mantas committed
79
80
cd cstate-master/exampleSite
```
81

Mantas's avatar
Mantas committed
82
3. Uncomment this line in `config.yml`:
83

Mantas's avatar
Mantas committed
84
```yml
Mantas's avatar
Mantas committed
85
86
87
88
89
90
91
themesDir: ../..
```

4. Make sure that the folder name is the same as the `theme` value:d

```yml
theme: cstate-master
Mantas's avatar
Mantas committed
92
93
```

Mantas's avatar
Mantas committed
94
5. Then try out the site! A link to it will be shown on screen.
95

Mantas's avatar
Mantas committed
96
97
```bash
hugo serve
98
99
```

Mantas's avatar
Mantas committed
100
101
102
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.
103

104
105
## Updating

Mantas's avatar
Mantas committed
106
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.
107
108

```bash
Mantas's avatar
Mantas committed
109
git submodule update
110
111
```

112
## FAQ
Mantas's avatar
Mantas committed
113

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

Mantas's avatar
Mantas committed
116
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:
117
118
119

```md
---
Mantas's avatar
Mantas committed
120
121
Title: Major outage in East US
Date: 2017-02-30 14:30:00
122
Resolved: true
Mantas's avatar
Mantas committed
123
ResolvedWhen: 2017-02-30 16:00:00
124
125
Severity: down
Affected:
Mantas's avatar
Mantas committed
126
  - API
127
128
129
Section: post
---

Mantas's avatar
Mantas committed
130
*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" >}}
Mantas's avatar
Mantas committed
131

Mantas's avatar
Mantas committed
132
*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" >}}
133
134
```

135
136
137
Time to break that down.

`Title`: This is the one of the most important parts of an incident. *(required)*  
Mantas's avatar
Mantas committed
138
`Date`: An ISO-8601 formatted date. Does not include time zone. This is when you first discovered the issue. *(required)*  
139
`Resolved`: Whether issue should affect overall status. Either `true` or `false`. *(boolean, required)*  
Mantas's avatar
Mantas committed
140
`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).  
141
142
143
144
`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
v2-rc1    
Mantas committed
145
146
147
148
### I have more questions!

Check out [the wiki](https://github.com/cstate/cstate/wiki).

Mantas's avatar
Mantas committed
149
## Contribute
150

Mantas's avatar
Mantas committed
151
152
cState needs help to grow, not only would it benefit from stuff like unit tests, but also get influenced by fresh ideas to grow even further.

153
+ Glance over the [Code of Conduct](/CODE_OF_CONDUCT.md).
Mantas's avatar
v2-rc1    
Mantas committed
154
+ Before submitting a pull request, create an issue to [discuss the implications of your proposal](https://github.com/cstate/cstate/issues).
Mantas's avatar
Mantas committed
155
156
+ Write consistent, simple, readable code and precise documentation.
+ [Join the Gitter chat](http://discord.io/choraleapp) for help or discussion.
Mantas's avatar
Mantas committed
157
+ You may also the creator’s [mnts Discord](https://discord.gg/EvQZdhT).
158
159
160

## License

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