blob: d42ed53a98ce4b3c520e18f2706f8e793870da0b (
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
|
This repo has a [sub repo containing the article source files](https://git.node5.net/blog/articles/)
, run this to initialize it
```bash
git submodule sync --init
```
There's git hooks to automatically update,
and
restart service if code was changed,
or
reload service if articles were changed
it reloads by sending POSIX `SIGHUP` (`1`) IPC signal (see `man 7 signal`)
Validate article source compiles to HTML as a
[git pre-commit hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks#_committing_workflow_hooks)
```bash
python3 src/blog_node5_net.py validate
```
This can be added to `.git/hooks/pre-commit` to test before commiting articles
```bash
cd blog.node5.net/articles
git rev-parse --git-path hooks
```
Now the folling can be added to `.git/modules/blog.node5.net/articles/hooks`
```bash
#!/bin/sh
cd ../../ && venv/bin/python src/blog_node5_net.py validate
```
### TODO
- [Caching](https://flask-caching.readthedocs.io/en/latest/)
- Breadcrumbs
- Comments redirect scroll to comments section, show comment pending approval
- Live reload content
- Verify relation between articles and database comments
### Done
- Test configuration files similar to `nginx -t`
- Reload service
- GIT hook
|