Change Docs theme to relearn #2

Merged
adoralaura merged 8 commits from feature-new-docs into main 2024-07-30 08:28:16 +02:00
11 changed files with 202 additions and 41 deletions

View file

@ -1,18 +1,53 @@
baseURL = 'https://certwarden-deploy.adora.codes/' baseURL = 'https://certwarden-deploy.adora.codes/'
languageCode = 'en-us' languageCode = 'en-us'
title = 'certwarden-deploy' title = 'certwarden-deploy'
author = ""
theme = "code.lila.network/adoralaura/hugo-book-theme" theme = "github.com/McShelby/hugo-theme-relearn"
repo = "https://code.lila.network/adoralaura/certwarden-deploy"
enableGitInfo = true
enableRobotsTXT = true
uniqueHomePage = false # change to false to add sidebar to homepage
[params] [params]
# (Optional, default light) Sets color theme: light, dark or auto. disableLandingPageButton = false
# Theme 'auto' switches between dark and light modes based on browser/os preferences disableLanguageSwitchingButton = false
BookTheme = 'auto' editURL = "https://code.lila.network/adoralaura/certwarden-deploy/_edit/main/docs/content/${FilePath}"
BookRepo = 'https://code.lila.network/adoralaura/certwarden-deploy' externalLinkTarget = "_blank"
[module] [params.author]
[[module.imports]] name = 'Adora Laura Kalb'
path = "code.lila.network/adoralaura/hugo-book-theme"
[outputs]
home = ['html', 'rss', 'search']
[menu]
[[menu.shortcuts]]
identifier = 'ds'
name = "<i class='fa-fw fas fa-code-branch'></i> certwarden-deploy Git Repository"
url = 'https://code.lila.network/adoralaura/certwarden-deploy'
weight = 10
[[menu.shortcuts]]
name = "<i class='fa-fw fas fa-arrow-up-right-from-square'></i> CertWarden GitHub"
url = 'showcase/'
weight = 11
[[menu.shortcuts]]
identifier = 'hugodoc'
name = "<i class='fa-fw fas fa-arrow-up-right-from-square'></i> CertWarden Website"
url = 'https://gohugo.io/'
weight = 20
# [[menu.shortcuts]]
# name = "<i class='fa-fw fas fa-bullhorn'></i> Credits"
# url = 'more/credits/'
# weight = 30
#
# [[menu.shortcuts]]
# name = "<i class='fa-fw fas fa-tags'></i> Tags"
# url = 'tags/'
# weight = 40

View file

@ -1,10 +1,8 @@
--- ---
title: Introduction title: CertWarden-Deploy
type: docs type: docs
--- ---
## CertWarden
[CertWarden](https://www.certwarden.com/) is a self-hosted Centralized ACME Certificate Management platform. With it you can manage and aquire Let's Encrypt certificates. [CertWarden](https://www.certwarden.com/) is a self-hosted Centralized ACME Certificate Management platform. With it you can manage and aquire Let's Encrypt certificates.
However, to deploy them to your hosts, for now there only was a docker client, and that was too bloated for me. However, to deploy them to your hosts, for now there only was a docker client, and that was too bloated for me.
@ -27,9 +25,9 @@ sudo chmod +x /usr/local/bin/certwarden-deploy
``` ```
... fill out the config file... ... fill out the config file...
```shell
vi /etc/certwarden-deploy/config.yaml
``` `vi /etc/certwarden-deploy/config.yaml`
```yaml ```yaml
# Base URL of the CertWarden instance # Base URL of the CertWarden instance
# required # required
@ -79,7 +77,7 @@ I use my own [Forgejo](https://forgejo.org/) Instance [code.lila.network](https:
* If you have a trivial fix or improvement, go ahead and send a diff to the maintainer(s) of this repository (see * If you have a trivial fix or improvement, go ahead and send a diff to the maintainer(s) of this repository (see
[MAINTAINERS.md](https://code.lila.network/adoralaura/certwarden-deploy/src/branch/main/MAINTAINERS.md)). [MAINTAINERS.md](https://code.lila.network/adoralaura/certwarden-deploy/src/branch/main/MAINTAINERS.md)).
* If you plan to do something more involved, first please [send me a mail]( mailto:dev@lauka.net?subject=%5Bcertwarden-deploy%5D)mso I can create an account for you. * If you plan to do something more involved, first please [send me a mail](mailto:dev@lauka.net?subject=%5Bcertwarden-deploy%5D) so I can create an account for you.
### Non-development Contibutions ### Non-development Contibutions
@ -92,4 +90,4 @@ share what works.
You can find the Changelog here: [Changelog](https://code.lila.network/adoralaura/certwarden-deploy/src/branch/main/CHANGELOG.md) You can find the Changelog here: [Changelog](https://code.lila.network/adoralaura/certwarden-deploy/src/branch/main/CHANGELOG.md)
## License ## License
`certwarden-deploy` is available under the MIT license. See the [LICENSE](https://code.lila.network/adoralaura/certwarden-deploy/src/branch/main/LICENSE) file for more info. `certwarden-deploy` is available under the MIT license. See the [License page](/license/) for more info.

View file

@ -0,0 +1,85 @@
---
title: Configuration
weight: 20
---
This document describes how to configure `certwarden-deploy` and which certificates should be managed by it. The configuration file uses the [YAML format](https://yaml.org/) for a human-readable and easy-to-maintain structure.
## certwarden-deploy CLI Options
```plaintext
$ ./certwarden-deploy --help
certwarden-deploy is a CLI utility to deploy certificates managed by CertWarden.
Configuration is handled by a single YAML file, so you can get started quickly.
For more information on how to configure this tool, visit the docs at https://certwarden-deploy.adora.codes
Usage:
certwarden-deploy [flags]
Flags:
-c, --config string Path to config file (default is /etc/certwarden-deploy/config.yaml) (default "/etc/certwarden-deploy/config.yaml")
-d, --dry-run Just show the would-be changes without changing the file system (turns on verbose logging)
-f, --force Force overwriting and execution action to occur, regardless if certificate already exists
-h, --help help for certwarden-deploy
-q, --quiet Disable any logging (if both -q and -v are set, quiet wins)
-v, --verbose Enable verbose logging
--version version for certwarden-deploy
```
## Configuration File Options
`base_url` (required):
This string specifies the base URL of your CertWarden instance.
`disable_certificate_validation` (optional, default: false):
This boolean flag indicates whether to disable certificate validation for the CertWarden instance. Set this to true only if your CertWarden instance uses a self-signed certificate and you trust it explicitly. **Disabling validation weakens security, so use it with caution.**
`certificates:` (required):
This is a list that defines each certificate to be managed.
Each certificate definition is a nested YAML block with the following properties:
Each certificate configuration consists of:
`name` (required):
This string is a unique identifier for the certificate and must be the same as in you CertWarden instance.
It must start and end with an alphanumeric character and can contain letters (a-zA-Z), numbers (0-9), underscore (_), hyphen (-), and period (.).
`cert_secret` (required):
This string holds the API key used to fetch the certificate data from the CertWarden server.
`cert_path` (required):
This string defines the file path where the downloaded certificate will be saved.
`key_secret` (required):
This string holds the API key used to fetch the private key data from the CertWarden server.
`key_path` (required):
This string defines the file path where the downloaded private key will be saved.
`action` (optional):
This string specifies a command to run after a certificate is updated or when the --force flag is used during execution.
The example uses a systemd reload command for the popular reverse named "caddy".
Example Configuration:
```yaml
# Base URL of the CertWarden instance
base_url: "https://certwarden.example.com"
# Disable certificate validation (not recommended for production)
disable_certificate_validation: false
# Define all managed certificates here
certificates:
- name: test-certificate.example.com
cert_secret: examplekey_notvalid_hrzjGDDw8z # Replace with your actual key
cert_path: "/path/to/test-certificate.example.com-cert.pem"
key_secret: examplekey_notvalid_hrzbbDDw8z # Replace with your actual key
key_path: "/path/to/test-certificate.example.com-key.pem"
action: "/usr/bin/systemctl reload caddy"
```
Use code with caution.
## Notes
- This documentation assumes you have a basic understanding of YAML syntax. Resources for learning YAML are readily available online.
- Replace placeholder values like examplekey_notvalid_hrzjGDDw8z with your actual API keys.

View file

@ -0,0 +1,30 @@
---
title: Installation
weight: 10
---
## Prerequisites
Before building the project, ensure you have the following installed:
- make: A build automation tool
- Go: Version 1.22 or later
## Building the Project from Source
To build the project, first clone the projects git repository, then navigate to the project's root directory and run the following command:
```shell
make build
```
This command will generate the `certwarden-deploy` binary in the `bin/` folder.
## Getting pre-built Binaries
You can also get pre-built binaries from the [releases page](https://code.lila.network/adoralaura/certwarden-deploy/releases). Make sure you get the binaries fitting your architecture!
## Setting up automatic Certificate Renewals
Although not required for `certwarden-deploy` to work, it's highly rrecommended to set up automatic renewals for `certwarden-deploy`, so that you don't need to worry about rolling out your certificates every time they get renewed by CertWarden.
To do that, there are example `systemd` Service and Timer files included in the `examples/` directory of the `certwarden-deploy` repository.
Please make sure to customize them to your requirements (path to `certwarden-deploy` binary, user and group, execution interval...) and then drop them into the `/etc/systemd/system/` directory, then enable the timer with `systemctl enable --now certwarden-deploy.timer`
If you kept the example schedule, `certwarden-deploy` will run every saturday at ~4am.

33
docs/content/license.md Normal file
View file

@ -0,0 +1,33 @@
---
title: License
weight: 99
---
## Documentation
This documentation is available under the [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)
## Source Code
The source code of `certwarden-deploy` is available under the MIT license:
```plaintext
MIT License
Copyright © 2024 Adora Laura Kalb <dev@lauka.net>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```

View file

@ -1,22 +0,0 @@
---
headless: true
---
- [**Example Site**]({{< relref "/docs/example" >}})
- [Table of Contents]({{< relref "/docs/example/table-of-contents" >}})
- [With ToC]({{< relref "/docs/example/table-of-contents/with-toc" >}})
- [Without ToC]({{< relref "/docs/example/table-of-contents/without-toc" >}})
- [Collapsed]({{< relref "/docs/example/collapsed" >}})
- [3rd]({{< relref "/docs/example/collapsed/3rd-level" >}})
- [4th]({{< relref "/docs/example/collapsed/3rd-level/4th-level" >}})
<br />
- **Shortcodes**
- [Buttons]({{< relref "/docs/shortcodes/buttons" >}})
- [Columns]({{< relref "/docs/shortcodes/columns" >}})
- [Expand]({{< relref "/docs/shortcodes/expand" >}})
- [Hints]({{< relref "/docs/shortcodes/hints" >}})
- [KaTeX]({{< relref "/docs/shortcodes/katex" >}})
- [Mermaid]({{< relref "/docs/shortcodes/mermaid" >}})
- [Tabs]({{< relref "/docs/shortcodes/tabs" >}})
<br />

View file

@ -2,4 +2,4 @@ module code.lila.network/adoralaura/certwarden-deploy-docs
go 1.22.2 go 1.22.2
require code.lila.network/adoralaura/hugo-book-theme v0.0.0-20240712103017-55b1193ecd34 // indirect require github.com/McShelby/hugo-theme-relearn v0.0.0-20240721222908-7aec99b38dc2 // indirect

View file

@ -1,2 +1,2 @@
code.lila.network/adoralaura/hugo-book-theme v0.0.0-20240712103017-55b1193ecd34 h1:jgwSyEijB5R4TxGxsO6Lugm1+bcaw7Tz5rCxptmc92A= github.com/McShelby/hugo-theme-relearn v0.0.0-20240721222908-7aec99b38dc2 h1:022HGVq2CBuTftLgNRiU3rxqh+w3M3ZcschnXbjgomc=
code.lila.network/adoralaura/hugo-book-theme v0.0.0-20240712103017-55b1193ecd34/go.mod h1:MBe0adh4WF9iMJ51BCRAeKkPUda/JB9RlGUQwmk5qc0= github.com/McShelby/hugo-theme-relearn v0.0.0-20240721222908-7aec99b38dc2/go.mod h1:mKQQdxZNIlLvAj8X3tMq+RzntIJSr9z7XdzuMomt0IM=

View file

@ -0,0 +1 @@
<img src="/images/logo.svg"/>

BIN
docs/static/images/favicon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

1
docs/static/images/logo.svg vendored Normal file
View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 3246 924" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g id="BG"></g><rect id="Artboard1" x="0" y="0" width="3245.03" height="923.786" style="fill:none;"/><rect x="142.173" y="142.589" width="513.711" height="659.756" style="fill:#96c8d1;fill-rule:nonzero;"/><rect x="207.956" y="204.786" width="380.629" height="533.018" style="fill:#cde9e3;fill-rule:nonzero;"/><path d="M518.389,552.593l-55.026,-0l0,109.913l27.444,-24.548l27.582,24.548l-0,-109.913Z" style="fill:#96c96c;fill-rule:nonzero;"/><path d="M536.731,543.491c-0,25.237 -20.549,45.785 -45.924,45.785c-25.375,0 -45.924,-20.548 -45.924,-45.785c0,-25.376 20.549,-45.786 45.924,-45.786c25.375,-0 45.924,20.548 45.924,45.786Z" style="fill:#fbba22;fill-rule:nonzero;"/><path d="M655.884,124.385l-513.711,0c-10.067,0 -18.342,8.275 -18.342,18.342l0,659.756c0,10.068 8.275,18.342 18.342,18.342l513.711,0c10.067,0 18.342,-8.274 18.342,-18.342l-0,-659.894c-0,-10.067 -8.275,-18.204 -18.342,-18.204Zm-18.342,659.757l-477.027,-0l0,-623.211l477.027,0l0,623.211Z" style="fill:#211f1e;fill-rule:nonzero;"/><path d="M206.439,747.458l385.179,-0c5.103,-0 9.24,-4.137 9.24,-9.102l0,-531.501c0,-5.103 -4.137,-9.102 -9.24,-9.102l-385.179,-0c-5.103,-0 -9.24,4.137 -9.24,9.102l-0,531.501c-0,4.965 4.137,9.102 9.24,9.102Zm9.102,-531.501l366.838,-0l-0,513.159l-366.838,-0l-0,-513.159Z" style="fill:#211f1e;fill-rule:nonzero;"/><path d="M341.728,600.723l-55.026,-0c-5.103,-0 -9.24,4.137 -9.24,9.102c-0,5.102 4.137,9.102 9.24,9.102l55.026,-0c5.102,-0 9.239,-4.138 9.239,-9.102c-0.138,-4.965 -4.275,-9.102 -9.239,-9.102Zm-61.922,-201.899l238.445,0c5.103,0 9.24,-4.137 9.24,-9.102c-0,-5.102 -4.137,-9.102 -9.24,-9.102l-238.445,0c-5.102,0 -9.239,4.137 -9.239,9.102c-0,4.965 4.137,9.102 9.239,9.102Zm119.154,36.684l-119.292,-0c-5.102,-0 -9.239,4.137 -9.239,9.102c-0,5.103 4.137,9.102 9.239,9.102l119.292,-0c5.102,-0 9.24,-4.137 9.24,-9.102c-0,-5.103 -4.138,-9.102 -9.24,-9.102Zm-119.154,-91.71l238.445,0c5.103,0 9.24,-4.137 9.24,-9.102c-0,-5.102 -4.137,-9.102 -9.24,-9.102l-238.445,0c-5.102,0 -9.239,4.138 -9.239,9.102c-0,4.965 4.137,9.102 9.239,9.102Zm0,-54.887l238.445,-0c5.103,-0 9.24,-4.138 9.24,-9.102c-0,-5.103 -4.137,-9.102 -9.24,-9.102l-238.445,-0c-5.102,-0 -9.239,4.137 -9.239,9.102c-0,4.964 4.137,9.102 9.239,9.102Zm201.899,201.485c-30.34,-0 -55.026,24.685 -55.026,55.025c0,16.274 7.172,30.754 18.342,40.821l0,78.195c0,3.585 2.069,6.895 5.379,8.412c3.31,1.517 7.171,0.828 9.929,-1.517l21.376,-19.169l21.376,19.169c1.655,1.517 3.861,2.345 6.068,2.345c1.241,-0 2.482,-0.276 3.723,-0.828c3.31,-1.517 5.379,-4.689 5.379,-8.412l-0,-78.195c11.171,-10.067 18.342,-24.685 18.342,-40.821c0.138,-30.34 -24.548,-55.025 -54.888,-55.025Zm18.342,153.492l-12.274,-10.895c-3.448,-3.171 -8.826,-3.171 -12.274,0l-12.274,10.895l0,-46.751c5.792,2.069 11.86,3.172 18.342,3.172c6.482,0 12.55,-1.103 18.342,-3.172l0,46.751l0.138,0Zm-18.342,-61.783c-20.273,0 -36.684,-16.411 -36.684,-36.684c0,-20.272 16.411,-36.683 36.684,-36.683c20.273,-0 36.684,16.411 36.684,36.683c-0,20.273 -16.411,36.684 -36.684,36.684Z" style="fill:#211f1e;fill-rule:nonzero;"/><g transform="matrix(283.53,0,0,283.53,3117.47,579.164)"></g><text x="784.992px" y="579.164px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:283.53px;fill:#fff;">certwarden-deploy</text></svg>

After

Width:  |  Height:  |  Size: 3.6 KiB