sync
This commit is contained in:
@@ -47,6 +47,29 @@ location /images/ {
|
||||
}
|
||||
```
|
||||
|
||||
Blog support:
|
||||
- Add plain text files to the `blog/` directory. Supported extensions are `.txt` and `.text`. Each file should start with a date/time line, then a title line, then the body.
|
||||
- To attach a file, place it in `blog/files/` and reference it in the post with `[[file: filename.ext]]` or `[[attachment: filename.ext]]`.
|
||||
- Run `python3 scripts/generate_blog_manifest.py` from the project root to refresh `blog/manifest.json` after adding or removing posts.
|
||||
|
||||
Git sync:
|
||||
- Use `./scripts/sync_site.sh` from the website root to pull changes from Git via HTTP.
|
||||
- The default remote is `https://git.organic-server.org/organic-CPU/website-but-better.git` and the branch is `main`.
|
||||
- By default it deploys to `/var/www/html`, which is the default nginx document root on most Linux distributions.
|
||||
- Override with `GIT_REPO_URL`, `GIT_BRANCH`, or `DEPLOY_DIR` if needed.
|
||||
|
||||
Automatic sync every 12 hours:
|
||||
- Copy `scripts/sync_site.service` and `scripts/sync_site.timer` to `/etc/systemd/system/`.
|
||||
- Update `sync_site.service` to point at the actual repository path on your server.
|
||||
- Then enable and start the timer:
|
||||
|
||||
```bash
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now sync_site.timer
|
||||
```
|
||||
|
||||
This makes the website sync twice per day and deploy the latest files to nginx root.
|
||||
|
||||
Editing the Git link:
|
||||
- Update the header Git link in `index.html` at the element with id `git-link` to your repository URL.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user