Trim down example to remove unneeded configs

This commit is contained in:
Jan-Lukas Else 2023-01-13 10:15:32 +01:00
parent 19a4024117
commit c3688a78f3
2 changed files with 6 additions and 23 deletions

View File

@ -1,6 +1,6 @@
# How to configure GoBlog
Most settings for GoBlog (still) have to be configured using a YAML configuration file. See `example-config.yaml` for the available options. It's recommended to just set the settings you really need. There are defaults for most settings. Some settings can be configured using a web UI (with the path of `/settings`).
Most settings for GoBlog (still) have to be configured using a YAML configuration file. See `example-config.yaml` for the available options. **It's recommended to just set the settings you really need, so it's best to start from a blank configuration file.** There are defaults for most settings. Some settings can be configured using a web UI (with the path of `/settings`).
## Sections
@ -16,24 +16,20 @@ Example for the path template:
### Setting Up GoBlog with nginx
The following is a bare-minimum example configuration for GoBlog running behind an NGINX Reverse Proxy and using the certbot plugin to generate SSL certificates.
The following is a minimal example configuration for GoBlog running behind an nginx reverse proxy and using the certbot plugin to generate TLS certificates.
**config.yml**
```text-plain
# Web server
server:
logging: true # Enable access log
logFile: data/access.log # File path for the access log
port: 8080 # GoBlog Port
publicAddress: https://yourdomain.tld # Public address to
publicHttps: false # Use Let's Encrypt and serve site with HTTPS
publicAddress: https://yourdomain.tld # Public address of your blog
# User
user:
nick: user # Username
nick: user # Username for login (can be changed later using the settings web UI)
password: password # Password for login
email: user@email.tld # Your E-mail address
# Blogs
defaultBlog: blogName # Default blog code (needed because you can define multiple blogs)
@ -44,14 +40,6 @@ blogs:
title: My Cool Blog # Blog title
description: "Welcome to this blog." # Blog description
pagination: 10 # Number of posts per page
# Sections
defaultsection: notes # Default section
sections:
notes:
title: Notes
description: "A section for notes." # Section description, can also use Markdown
pathtemplate: "{{printf \"/%v/%02d/%02d/%v\" .Section .Year .Month .Slug}}"
showFull: true # Show full post content instead of just the summary on index pages
# Taxonomies
taxonomies:
- name: tags # Code of taxonomy (used via post parameters)
@ -75,16 +63,12 @@ server {
server_name yourdomain.tld;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_max_temp_file_size 0;
proxy_pass http://localhost:GoBlogPort;
proxy_pass http://localhost:8080;
proxy_redirect http:// https://;
client_max_body_size 30M;
}

View File

@ -7,7 +7,6 @@ Create your config file (`./config/config.yml`) with inspiration from `example-c
Then you can use Docker Compose to run GoBlog. Here's an example `docker-compose.yml` file:
```yaml
version: "3"
services:
goblog:
container_name: goblog
@ -21,7 +20,7 @@ services:
- TZ=Europe/Berlin # You timezone
```
If you don't want to use a reverse proxy (like Caddy) you can also publish the ports directly from the GoBlog container. Remember to enable public https in the config, so GoBlog gets Let's Encrypt certificates.
If you don't want to use a reverse proxy (like Caddy or nginx) you can also publish the ports directly from the GoBlog container. Remember to enable public https in the config, so GoBlog gets Let's Encrypt certificates.
```yaml
goblog: