]> juplo.de Git - website/commitdiff
Addded an example for syntax highlighting with a short-code frontend
authorKai Moritz <kai@juplo.de>
Sun, 8 Feb 2026 09:11:53 +0000 (10:11 +0100)
committerKai Moritz <kai@juplo.de>
Sun, 8 Feb 2026 09:16:21 +0000 (10:16 +0100)
exampleSite/content/projects/typo.html

index 5f126bb84babe9d80afaa7f70cf20125d4400ee6..d3071fd201336ba23b0172eb38457d1660f6221a 100644 (file)
@@ -103,4 +103,19 @@ lastmod: "2026-02-03T17:30:49.452Z"
   &lt;/executions&gt;
 &lt;/plugin&gt;
 </code></pre>
+      <h1>Syntax Highlighting by Hugo</h1>
+      <h2>As a code-block...</h2>
+      {{< highlight go "linenos=inline, hl_lines=3 6-8, style=emacs" >}}
+      package main
+
+      import "fmt"
+
+      func main() {
+          for i := 0; i < 3; i++ {
+              fmt.Println("Value of i:", i)
+          }
+      }
+      {{< /highlight >}}
+      <h2>...and inline</h2>
+      <p>This is some {{< highlight go "hl_inline=true" >}}fmt.Println("inline"){{< /highlight >}} code.</p>
     </article>