summaryrefslogtreecommitdiff
path: root/README.md
blob: 4135a4e0c742772aedb5bece67ab6ffa6aae8b0c (plain) (blame)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# blog

> Welcome to Paul Anthony Webb's corner of the 'Net where he'll regale you with
> whatever he finds interesting.



## Prerequisites

- [Deno](https://deno.land/#installation)
- [Just](https://just.systems/man/en)

## Setup

```sh
git clone https://github.com/NetOpWibby/blog.git && cd $_
```

## Commands

```sh
# run blog for local development
just dev

# run blog for production
just start

# generate feeds
just feed

# generate version.txt
just version
```

## Production

- ensure Deno is installed on your server
  - Deno also expects unzip or 7zip to be installed: `apt install unzip -y`
- make note of `which deno` to find the path of your install
- `nano /etc/systemd/system/blog.service`
  ```service
  [Unit]
  After=network.target
  Description=My cool blog
  Documentation=https://blog.webb.page

  [Service]
  # your deno path
  ExecStart=/root/.deno/bin/deno run --allow-env --allow-net --allow-read main.ts
  Restart=on-failure
  Type=simple
  User=root
  # the path of your blog
  WorkingDirectory=/var/www/blog

  [Install]
  WantedBy=multi-user.target
  ```
- `systemctl start blog`
- `systemctl enable blog`
- when making changes to your `blog.service` file, you'll need to run `systemctl daemon-reload`

## Notes

- The text files have Markdown syntax for reasons:
  - I'm used to writing in Markdown
  - These files were converted from Markdown
  - I may create a Markdown renderer in the future
- Relative paths will be encased in arrow brackets:
  - example: </2019-12-02-a-personal-api.txt>
- Images are hosted on my CDN and you'll have to manually copy/paste to view:
  - example: https://🔥.pixels.wtf/blog/image/2019/year-in-review-c.jpg