From 61bb52ac116d713bb0a52a2c382be40a926cdb05 Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Tue, 23 Jan 2024 13:51:02 -0500 Subject: [PATCH] docs: diff highlighting (#6604) --- docs/docs/guides/remove-offline-files.md | 4 ++-- docs/docusaurus.config.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/guides/remove-offline-files.md b/docs/docs/guides/remove-offline-files.md index d3bca187d..57eaeda2d 100644 --- a/docs/docs/guides/remove-offline-files.md +++ b/docs/docs/guides/remove-offline-files.md @@ -15,13 +15,13 @@ This way works by downloading a JSON file that contains a list of all the files ## Script for Linux based systems: -``` +```bash awk -F\" '/entityId/ {print $4}' orphans.json | while read line; do curl --location --request DELETE 'http://YOUR_IP_HERE:2283/api/asset' --header 'Content- Type: application/json' --header 'x-api-key: YOUR_API_KEY_HERE' --data '{ "force": true, "ids": ["'"$line"'"]}';done ``` ## Script for the Windows system (run through PowerShell): -``` +```powershell Get-Content orphans.json | Select-String -Pattern 'entityId' | ForEach-Object { $line = $_ -split '"' | Select-Object -Index 3 $body = [pscustomobject]@{ diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index b9817f790..e4ba774ea 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -166,7 +166,7 @@ const config = { prism: { theme: prism.themes.github, darkTheme: prism.themes.dracula, - additionalLanguages: ['sql'], + additionalLanguages: ['sql', 'diff', 'bash', 'powershell', 'nginx'], }, image: 'overview/img/feature-panel.png', }),