summaryrefslogtreecommitdiff
path: root/README.md
blob: 1ea16085ded46701efa14168a0623e502a97444b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# postmarketos.org

## Dev

### Python Requirements Setup

Install all requirements, preferably within a virtualenv:

```bash
$ python -m venv venv
$ source venv/bin/activate
(venv)$ pip install -r requirements.txt
```

### Update Wiki Content

Wiki content is pulled and updated automagically as a git submodule from the [pmbootstrap wiki](https://github.com/postmarketOS/pmbootstrap/wiki).

```bash
$ git submodule update --init --recursive
$ git pull --recurse-submodules
```

### New Blog Content

Blog content is written in markdown format with metadata in the file header. Filename syntax is `yyyy-mm-dd-slug.md`.

```bash
$ cat >content/blog/2017-12-31-happy-new-year.md << EOF
> ---
> title: Happy New Year!
> ---
>
> This is a *markdown* **formatted** post.
> EOF
```

### Dev Server

Run the dev server during local development, changes are auto reloaded:

```bash
(venv)$ FLASK_DEBUG=1 FLASK_APP=app.py flask run
```

### Build

To run a static site build, run:

```bash
(venv)$ python freeze.py
```

This will generate a static version in `docs/`. Any manual changes to the `docs/` directory will be overridden in the next build.