forked from robur/blog.robur.coop
43 lines
1.6 KiB
Markdown
43 lines
1.6 KiB
Markdown
### 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/
|
|
$ opam pin add -yn .
|
|
$ opam install --deps-only blogger
|
|
$ dune exec src/blogger.exe -- watch
|
|
```
|
|
|
|
A little server run on `http://localhost:8888`.
|
|
|
|
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`
|
|
- `article.title`
|
|
- `article.description`
|
|
- `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
|
|
$ dune exec src/blogger.exe -- push \
|
|
-r git@git.robur.coop:robur/blog.robur.coop.git#gh-pages
|
|
--hook https://blog.robur.coop/hook \
|
|
[--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à!
|
|
At the end, an HTTP request will be send to `https://blog.robur.coop` to update
|
|
the unikernel with the last version of the blog.
|
|
|
|
**NOTE**: don't forget `#gh-pages`! Also, you probably should do a `git pull`.
|