]> danix's work - danix.xyz-2.git/commitdiff
removed all occurrencies of the highlight shortcode. File removed.
authorDanilo M. <redacted>
Sat, 18 Apr 2026 17:46:44 +0000 (19:46 +0200)
committerDanilo M. <redacted>
Sat, 18 Apr 2026 17:46:44 +0000 (19:46 +0200)
TODO.md
content/en/articles/gify-back-to-bash-scripting/index.md
themes/danix-xyz-hacker/layouts/shortcodes/highlight.html [deleted file]

diff --git a/TODO.md b/TODO.md
index 9dec10e78178da1e444fc5f0c9a0a4362ab14cc6..2e0837fa8619d86549e47faab4a91e3d3f3b0a5a 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -7,7 +7,7 @@
 - [✅] Sidebar widgets redesign (no box, mono font "# Title")
 - [ ] Footer redesign (3-column, social badges, fortune cookie, tech badges, etc.)
 - [✅] related articles debug
-- [ ] shortcodes cleanup (remove duplicates)
+- [] shortcodes cleanup (remove duplicates)
 - [ ] Search functionality
 - [ ] Open Graph meta tags for social sharing
 - [ ] Sitemap & robots.txt optimization
index 784189561be08c6829bbb526fb9532a09e5d9bdd..647c8eae51ba1373c708dd40809773f2e1bc6f9b 100644 (file)
@@ -41,7 +41,8 @@ I made this script mostly for fun and personal use, so it's absolutely not idiot
 I'll leave you with a copy of the script here in case you want to have a look at it before downloading.  
 Enjoy!
 
-{{< highlight bash "linenos=true" >}}#! /bin/bash
+```bash
+#! /bin/bash
 
 # Author:       Danilo 'danix' Macri
 # Author URI:   https://danix.xyz
@@ -80,7 +81,7 @@ MOGRIFY=$(which mogrify)
 CONVERT=$(which convert)
 
 # we need mogrify and convert from the imagemagik toolset for this script to work #
-if &#91;&#91; ! -x $MOGRIFY || ! -x $CONVERT ]]; then
+if [[ ! -x $MOGRIFY || ! -x $CONVERT ]]; then
     showerror missingdeps
     exit $E_MISSINGDEPS
 fi
@@ -91,20 +92,20 @@ showhelp ()
 {
 case $1 in
     resize )
-        echo "USAGE: $(basename $0) -r | --resize &#91;width] &#91;extension]"
+        echo "USAGE: $(basename $0) -r | --resize [width] [extension]"
         ;;
     gif )
-        echo "USAGE: $(basename $0) -g | --gif &#91;delay] &#91;extension] &#91;output file name]"
+        echo "USAGE: $(basename $0) -g | --gif [delay] [extension] [output file name]"
         ;;
     * )
                 #|----------------------- TEXT MAX WIDTH - 80 CHARS ----------------------------|
         echo -e "$(basename $0) - create animated gifs from images inside current directory"
-        echo -e "USAGE: $(basename $0) &lt;option> &#91;arguments]"
-        echo -e "\twhere &lt;option> is one between:";echo
-        echo -e "\t-r | --resize &#91;width] &#91;extension]"
+        echo -e "USAGE: $(basename $0) <option> [arguments]"
+        echo -e "\twhere <option> is one between:";echo
+        echo -e "\t-r | --resize [width] [extension]"
         echo -e "\t\tresizes all the images matching the extension in the current folder to"
         echo -e "\t\tthe width specified as argument.";echo
-        echo -e "\tg | --gif &#91;delay] &#91;extension] &#91;output file name]"
+        echo -e "\tg | --gif [delay] [extension] [output file name]"
         echo -e "\t\tcreates the gif file using all the images in the current folder."
         echo
         echo -e "EXAMPLES:"
@@ -123,7 +124,7 @@ esac
 # showerror #
 showerror ()
 {
-    if &#91; -z $1 ];then
+    if [ -z $1 ];then
         echo "INTERNAL ERROR - ABORTING"; echo
         exit $E_INTERROR
     fi
@@ -152,13 +153,13 @@ showerror ()
 }
 
 ##### MAIN #####
-if &#91; $# -eq 0 ];then
+if [ $# -eq 0 ];then
     showerror noopts
     showhelp
     exit $E_NOOPTS
 else
 
-    while &#91; $# -gt 0 ];do
+    while [ $# -gt 0 ];do
         case $1 in
             -h|--help)
                 showhelp
@@ -168,21 +169,21 @@ else
                 WIDTH=$2
                 EXT=$3
                 shift
-                if &#91;&#91; -z $WIDTH || -z $EXT ]];then
+                if [[ -z $WIDTH || -z $EXT ]];then
                     showhelp resize
                     showerror noargs
                     exit $E_NOARGS
                 fi
                 IMAGES="$(ls -1 *.$EXT 2>/dev/null | wc -l)"
-                if &#91;&#91; $IMAGES == 0 ]]; then
+                if [[ $IMAGES == 0 ]]; then
                     showerror noimages
                     exit $E_NOIMAGES
                 fi
                 clear
                 COUNT="$(ls -1 *.$EXT 2>/dev/null | wc -l)"
                 echo "you're going to resize all $COUNT .$EXT images inside $PWD at a fixed width of ${WIDTH}px"
-                read -p "do you wish to continue? &#91;y/n] " -n 1 -r; echo
-                if &#91;&#91; ! $REPLY =~ ^&#91;Yy]$ ]]
+                read -p "do you wish to continue? [y/n] " -n 1 -r; echo
+                if [[ ! $REPLY =~ ^[Yy]$ ]]
                 then
                     exit $USERABORTED
                 else
@@ -195,16 +196,16 @@ else
                 EXT=$3
                 OUTPUT=$4
                 shift
-                if &#91;&#91; -z $DELAY || -z $EXT || -z $OUTPUT ]];then
+                if [[ -z $DELAY || -z $EXT || -z $OUTPUT ]];then
                     showhelp gif
                     showerror noargs
                     exit $E_NOARGS
-                elif &#91;&#91; -f ${OUTPUT}.gif ]]; then
+                elif [[ -f ${OUTPUT}.gif ]]; then
                     showerror filexists
                     exit $E_FILEXISTS
                 fi
                 IMAGES="$(ls -1 *.$EXT 2>/dev/null | wc -l)"
-                if &#91;&#91; $IMAGES == 0 ]]; then
+                if [[ $IMAGES == 0 ]]; then
                     showerror noimages
                     exit $E_NOIMAGES
                 fi
@@ -213,8 +214,8 @@ else
                 echo "you're going to create a looping gif named ${OUTPUT}.gif"
                 echo "out of all the $COUNT $EXT files inside $PWD with a tick"
                 echo "delay of $DELAY/100 of a second"; echo
-                read -p "do you wish to continue? &#91;y/n] " -n 1 -r; echo
-                if &#91;&#91; ! $REPLY =~ ^&#91;Yy]$ ]]
+                read -p "do you wish to continue? [y/n] " -n 1 -r; echo
+                if [[ ! $REPLY =~ ^[Yy]$ ]]
                 then
                     exit $USERABORTED
                 else
@@ -230,5 +231,4 @@ else
         shift
     done
 fi
-
-{{< /highlight >}}
\ No newline at end of file
+```
\ No newline at end of file
diff --git a/themes/danix-xyz-hacker/layouts/shortcodes/highlight.html b/themes/danix-xyz-hacker/layouts/shortcodes/highlight.html
deleted file mode 100644 (file)
index 1b6f12a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{{- $lang := .Get 0 -}}
-{{- $opts := .Get 1 | default "" -}}
-{{ highlight .Inner $lang $opts }}