From a5eebe25ee1087f200d6d61f010df7d2e1f63f1c Mon Sep 17 00:00:00 2001 From: dyzulk <66510723+dyzulk@users.noreply.github.com> Date: Fri, 9 Jan 2026 12:25:42 +0700 Subject: [PATCH] docs: add copy button to code blocks --- pages/developer/endpoints.mdx | 2 +- pages/developer/index.mdx | 4 ++-- pages/guide/getting-started/install-root-ca.mdx | 8 ++++---- pages/guide/integrations/web-servers.mdx | 4 ++-- pages/guide/troubleshooting/developer-tools.mdx | 10 +++++----- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pages/developer/endpoints.mdx b/pages/developer/endpoints.mdx index 3a429c1..b5f8819 100644 --- a/pages/developer/endpoints.mdx +++ b/pages/developer/endpoints.mdx @@ -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 diff --git a/pages/developer/index.mdx b/pages/developer/index.mdx index 3d36da7..945b7c7 100644 --- a/pages/developer/index.mdx +++ b/pages/developer/index.mdx @@ -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 ``` diff --git a/pages/guide/getting-started/install-root-ca.mdx b/pages/guide/getting-started/install-root-ca.mdx index 0f91063..1f3aa11 100644 --- a/pages/guide/getting-started/install-root-ca.mdx +++ b/pages/guide/getting-started/install-root-ca.mdx @@ -21,22 +21,22 @@ Select your distribution to get the optimized installation command: - ```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 ``` - ```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 ``` - ```bash + ```bash copy sudo pacman -Sy --noconfirm curl && curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash ``` - ```bash + ```bash copy curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash ``` diff --git a/pages/guide/integrations/web-servers.mdx b/pages/guide/integrations/web-servers.mdx index 9470900..c5241a5 100644 --- a/pages/guide/integrations/web-servers.mdx +++ b/pages/guide/integrations/web-servers.mdx @@ -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 ServerName internal.app DocumentRoot /var/www/html/internal diff --git a/pages/guide/troubleshooting/developer-tools.mdx b/pages/guide/troubleshooting/developer-tools.mdx index e166c59..2593122 100644 --- a/pages/guide/troubleshooting/developer-tools.mdx +++ b/pages/guide/troubleshooting/developer-tools.mdx @@ -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"