2023-11-13 18:13:44 +00:00
|
|
|
### How to add an article?
|
|
|
|
|
|
|
|
The Git repository contains 2 branches:
|
|
|
|
- the main branch which has the blog engine
|
|
|
|
- the `gh-pages` (as GitHub) which contains the generated website
|
|
|
|
|
|
|
|
The user can have an overview of the website via:
|
|
|
|
```shell-session
|
|
|
|
$ git clone git@git.robur.coop:robur/blog.robur.coop
|
|
|
|
$ cd blog.robur.coop/
|
2024-02-21 09:49:33 +00:00
|
|
|
$ opam pin add -yn .
|
2023-11-13 18:13:44 +00:00
|
|
|
$ opam install --deps-only blogger
|
2024-10-21 11:28:28 +00:00
|
|
|
$ dune exec bin/watch.exe --
|
2023-11-13 18:13:44 +00:00
|
|
|
```
|
|
|
|
|
2024-09-30 18:39:49 +00:00
|
|
|
A little server run on `http://localhost:8000`.
|
2023-11-13 18:13:44 +00:00
|
|
|
|
|
|
|
The user can add an article into the `articles/` directory. The format is easy.
|
|
|
|
A simple header which starts with `---` and finish with `---`. Inside, you have
|
|
|
|
a YAML description of the article where some fields are required:
|
|
|
|
- `date`
|
2024-09-30 18:39:49 +00:00
|
|
|
- `title`
|
|
|
|
- `description`
|
2023-11-13 18:13:44 +00:00
|
|
|
- `tags`
|
|
|
|
|
|
|
|
You can specify an `author` (with its `name`, `email` and `link`) or not. By
|
|
|
|
default, we use `team@robur.coop`. If everything looks good, you can generate
|
|
|
|
via the `blogger.exe` tool the generated website via:
|
|
|
|
```shell-session
|
2024-09-30 18:39:49 +00:00
|
|
|
$ dune exec src/push.exe -- push \
|
|
|
|
-r git@git.robur.coop:robur/blog.robur.coop.git#gh-pages \
|
|
|
|
--host https://blog.robur.coop
|
2023-11-13 18:13:44 +00:00
|
|
|
[--name "The Robur team"] \
|
|
|
|
[--email team@robur.coop]
|
|
|
|
```
|
|
|
|
|
|
|
|
An SSH communication will starts. If you already registered your private key
|
|
|
|
with `ssh-agent` and your `.ssh/config` is configured to take this one if you
|
|
|
|
communicate with with `git@git.robur.coop`, everything will be smooth! Et voilà!
|
2024-02-21 09:49:33 +00:00
|
|
|
At the end, an HTTP request will be send to `https://blog.robur.coop` (via
|
|
|
|
Gitea) to update the unikernel with the last version of the blog.
|
2023-11-13 18:13:44 +00:00
|
|
|
|
2023-11-15 10:07:36 +00:00
|
|
|
You can also use the `update.sh` script to update the blog with the builder user
|
|
|
|
on the server machine.
|
|
|
|
|
2023-11-13 18:13:44 +00:00
|
|
|
**NOTE**: don't forget `#gh-pages`! Also, you probably should do a `git pull`.
|