docs: add copy button to code blocks

This commit is contained in:
dyzulk
2026-01-09 12:25:42 +07:00
parent 821089391f
commit a5eebe25ee
5 changed files with 14 additions and 14 deletions

View File

@@ -14,7 +14,7 @@ description: Documentation for TrustLab API Endpoints including scanning and iss
### Request Certificate
`POST /certificates`
```json
```json copy
{
"csr": "-----BEGIN CERTIFICATE REQUEST-----...",
"validity_days": 365

View File

@@ -11,7 +11,7 @@ You can use our REST API to automate certificate issuance, revocation, and retri
## Base URL
```http
```http copy
https://trustlab.dyzulk.com/api/v1
```
@@ -19,6 +19,6 @@ https://trustlab.dyzulk.com/api/v1
All API requests must include your API Key in the `Authorization` header.
```bash
```bash copy
Authorization: Bearer <YOUR_API_KEY>
```

View File

@@ -21,22 +21,22 @@ Select your distribution to get the optimized installation command:
<Tabs items={['Debian/Ubuntu', 'RHEL/CentOS', 'Arch Linux', 'Universal']}>
<Tabs.Tab>
```bash
```bash copy
sudo apt update && sudo apt install -y curl && curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash
```
</Tabs.Tab>
<Tabs.Tab>
```bash
```bash copy
(sudo yum install -y curl || sudo dnf install -y curl) && curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash
```
</Tabs.Tab>
<Tabs.Tab>
```bash
```bash copy
sudo pacman -Sy --noconfirm curl && curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash
```
</Tabs.Tab>
<Tabs.Tab>
```bash
```bash copy
curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash
```
</Tabs.Tab>

View File

@@ -24,7 +24,7 @@ Select your web server environment below:
### Nginx Setup
Target File: `/etc/nginx/sites-available/default` or `internal.app.conf`
```nginx
```nginx copy
server {
listen 80;
server_name internal.app;
@@ -50,7 +50,7 @@ Select your web server environment below:
### Apache / HTTPD Setup
Target File: `/etc/httpd/conf.d/ssl.conf` or VHost file.
```apache
```apache copy
<VirtualHost *:443>
ServerName internal.app
DocumentRoot /var/www/html/internal

View File

@@ -30,13 +30,13 @@ Standard command-line tools often look for a specific bundle file.
**Solution:**
Pass the Root CA explicitly:
```bash
```bash copy
curl --cacert /path/to/trustlab-root.crt https://your-domain.local
```
### Wget
**Solution:**
```bash
```bash copy
wget --ca-certificate=/path/to/trustlab-root.crt https://your-domain.local
```
@@ -53,7 +53,7 @@ Node.js does not use the System Root CA by default.
**Solution (Environment Variable):**
Set this variable before running your application. It works for most Node.js apps (npm, yarn, custom scripts).
```bash
```bash copy
export NODE_EXTRA_CA_CERTS="/path/to/trustlab-root.crt"
node server.js
```
@@ -71,7 +71,7 @@ Python's `requests` library (and `pip`) uses its own certificate bundle (`certif
**Solution:**
Point to your Root CA using an environment variable.
```bash
```bash copy
export REQUESTS_CA_BUNDLE="/path/to/trustlab-root.crt"
python script.py
```
@@ -94,7 +94,7 @@ You must import the TrustLab Root CA into the Java Keystore (cacerts).
Usually at `$JAVA_HOME/lib/security/cacerts`.
### Import with keytool
```bash
```bash copy
keytool -import -trustcacerts -alias trustlab-root \
-file trustlab-root.crt \
-keystore "$JAVA_HOME/lib/security/cacerts"