From 9419e18ba94e9f1e04026dac48128c8a8df39ad0 Mon Sep 17 00:00:00 2001 From: Mark Dumay <61946753+markdumay@users.noreply.github.com> Date: Mon, 23 Jun 2025 12:42:27 +0200 Subject: [PATCH] Update file arguments --- data/structures/file.yml | 12 ++++++++++-- layouts/_shortcodes/file.html | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/data/structures/file.yml b/data/structures/file.yml index 2aab1f8d..913cd51a 100644 --- a/data/structures/file.yml +++ b/data/structures/file.yml @@ -11,8 +11,8 @@ arguments: full: id: class: - options: - release: v0.27.6 + highlight-options: + release: v1.0.0 # deprecated arguments path: type: string @@ -22,3 +22,11 @@ arguments: the path of the repository is used as base path instead. deprecated: v1.0.0 alternative: file + options: + type: string + optional: true + comment: >- + Hugo highlighting options, see https://gohugo.io/shortcodes/highlight/#options-1. + release: v0.27.6 + deprecated: v1.0.0 + alternative: highlight-options diff --git a/layouts/_shortcodes/file.html b/layouts/_shortcodes/file.html index 17dd66a1..616573bb 100644 --- a/layouts/_shortcodes/file.html +++ b/layouts/_shortcodes/file.html @@ -73,7 +73,7 @@
- {{- highlight (trim $content "\r\n") $lang $args.options -}} + {{- highlight (trim $content "\r\n") $lang (or $args.highlightOptions $args.options) -}}