Add a documentation
Some checks failed
ci/woodpecker/push/publish Pipeline failed

This commit is contained in:
Mylloon 2023-10-21 23:38:16 +02:00
parent 817db5e682
commit d1d8d1de34
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 185 additions and 84 deletions

183
Documentation.md Normal file
View file

@ -0,0 +1,183 @@
- [Documentation](#documentation)
- [Installation](#installation)
- [Use Docker Compose](#use-docker-compose)
- [Configuration](#configuration)
- [Global configuration](#global-configuration)
- [Link shortener for contacts](#link-shortener-for-contacts)
- [Add content](#add-content)
- [Blog](#blog)
- [Projects](#projects)
- [Contacts](#contacts)
# Documentation
[Here is a running example](https://www.mylloon.fr/) of a fully configured website.
# Installation
## Use Docker Compose
```yaml
version: "3.9"
services:
ewp:
image: git.mylloon.fr/anri/mylloon.fr:latest
container_name: EWP
volumes:
- /here/your/path/config:/app/config
- /here/your/path/data:/app/data
ports:
- 80:8080
restart: unless-stopped
```
<details>
<summary>Do you want to make the site available on Tor as well?</summary>
```yaml
version: "3.9"
services:
tor:
image: goldy/tor-hidden-service:latest
container_name: Website_tor
network_mode: bridge
links:
- ewp
environment:
EWP_TOR_SERVICE_HOSTS: "80:ewp:8080"
EWP_TOR_SERVICE_VERSION: "3"
volumes:
- tor-keys:/var/lib/tor/hidden_service/
secrets:
- source: ewp
target: ewp
mode: 0400
restart: unless-stopped
ewp:
image: git.mylloon.fr/anri/mylloon.fr:latest
container_name: Website
network_mode: bridge
hostname: ewp
volumes:
- /here/your/path/ewp/app/config:/app/config
- /here/your/path/ewp/app/data:/app/data
ports:
- 99:8080
restart: unless-stopped
volumes:
tor-keys:
driver: local
# Use https://github.com/cathugger/mkp224o to generate a key
secrets:
ewp:
file: /here/your/path/ewp/hidden_service/hs_ed25519_secret_key
```
You can tell the Tor Browser that you are offering an `onion` link by specifying
your address in the `config.toml` file.
```toml
onion = "http://youraddress.onion/"
```
</details>
# Configuration
## Global configuration
This file is stored at `/app/config/config.toml`
```toml
mail = "your.mail at host.com"
lang = "lang"
onion = "http://youraddress.onion/"
app_name = "Nickname"
name = "Firstname"
fullname = "Fullname"
```
## Link shortener for contacts
<!-- TODO -->
# Add content
Markdown files have YAML headers with `---` separator:
```
---
option: value
---
Markdown file
```
## Blog
Markdown files are stored in `/app/data/blog/`
```
---
title: Option<String>
date: Option<Date>
description: Option<String>
publish: Option<bool>
tags: Option<Vec<Tag>>
---
Post content
```
- if no `title`, the filename will be used
- `date` format is `day-month-year`
- `publish` is default to false. When false, posts are hidden from index
but accessible, see #30
## Projects
Markdown files are stored in `/app/data/projects/`
```
---
title: Option<String>
link: Option<String>
description: Option<String>
language: Option<String>
---
Project description
```
- If no `link` : the div won't be clickable and will be reported as is to the user
(no corner-arrow)
- Note that only a handful of [`language`s are supported](./static/css/languages.css).
## Contacts
Markdown files are stored in `/app/data/contacts/`
```
---
title: String
custom: Option<bool>
user: Option<String>
link: Option<String>
newtab: Option<bool>
description: Option<String>
---
Custom project description
```
- `custom` is default to `false`, if `true` all other metadata are ignored,
except the `title`, and the markdown will be used instead
- when `custom` is `false` then markdown will be ignored and only metadata will
be used to create the contact field
- `newtab` add property to open in a new tab a link
- `user` is the username used in the platform

View file

@ -5,87 +5,5 @@ Easy WebPage generator
[![dependency status](https://deps.rs/repo/gitea/git.mylloon.fr/Anri/mylloon.fr/status.svg)](https://deps.rs/repo/gitea/git.mylloon.fr/Anri/mylloon.fr) [![dependency status](https://deps.rs/repo/gitea/git.mylloon.fr/Anri/mylloon.fr/status.svg)](https://deps.rs/repo/gitea/git.mylloon.fr/Anri/mylloon.fr)
[![status-badge](https://ci.mylloon.fr/api/badges/Anri/mylloon.fr/status.svg)](https://ci.mylloon.fr/Anri/mylloon.fr) [![status-badge](https://ci.mylloon.fr/api/badges/Anri/mylloon.fr/status.svg)](https://ci.mylloon.fr/Anri/mylloon.fr)
See [issues](https://git.mylloon.fr/Anri/mylloon.fr/issues) - See [issues](https://git.mylloon.fr/Anri/mylloon.fr/issues)
- See [documentation](/Documentation.md)
## Use Docker Compose
```yaml
version: "3.9"
services:
ewp:
image: git.mylloon.fr/anri/mylloon.fr:latest
container_name: EWP
volumes:
- /here/your/path/config:/app/config
- /here/your/path/data:/app/data
ports:
- 80:8080
restart: unless-stopped
```
<details>
<summary>Do you want to make the site available on Tor as well?</summary>
```yaml
version: "3.9"
services:
tor:
image: goldy/tor-hidden-service:latest
container_name: Website_tor
network_mode: bridge
links:
- ewp
environment:
EWP_TOR_SERVICE_HOSTS: "80:ewp:8080"
EWP_TOR_SERVICE_VERSION: "3"
volumes:
- tor-keys:/var/lib/tor/hidden_service/
secrets:
- source: ewp
target: ewp
mode: 0400
restart: unless-stopped
ewp:
image: git.mylloon.fr/anri/mylloon.fr:latest
container_name: Website
network_mode: bridge
hostname: ewp
volumes:
- /here/your/path/ewp/app/config:/app/config
- /here/your/path/ewp/app/data:/app/data
ports:
- 99:8080
restart: unless-stopped
volumes:
tor-keys:
driver: local
# Use https://github.com/cathugger/mkp224o to generate a key
secrets:
ewp:
file: /here/your/path/ewp/hidden_service/hs_ed25519_secret_key
```
You can tell the Tor Browser that you are offering an `onion` link by specifying
your address in the `config.toml` file.
```toml
onion = "http://youraddress.onion/"
```
</details>
## Example of [`config.toml`](./config/config.toml)
```toml
mail = "your.mail at host.com"
lang = "lang"
onion = "http://youraddress.onion/"
app_name = "Nickname"
name = "Firstname"
fullname = "Fullname"
```