From db77d49afb4aa6569466519f2d86e2fa96e2249c Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Fri, 1 Nov 2024 15:45:01 +0800 Subject: [PATCH] :construction: WIP: add params.taskList to support custom task lists --- hugo.toml | 6 ++++++ layouts/partials/function/task-lists.html | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hugo.toml b/hugo.toml index 1d268ea0..72380d2c 100644 --- a/hugo.toml +++ b/hugo.toml @@ -688,6 +688,12 @@ enableEmoji = true # syntax: = [params.admonition] # ban = "fa-solid fa-ban" + + # FixIt 0.2.14 | NEW Task lists custom config + # See https://fixit.lruihao.cn/documentation/content-management/advanced/#custom-task-lists + # syntax: = + [params.taskList] + # tip = "fa-regular fa-lightbulb" # FixIt 0.2.12 | NEW PanguJS config [params.pangu] diff --git a/layouts/partials/function/task-lists.html b/layouts/partials/function/task-lists.html index e5a3820a..b382da87 100644 --- a/layouts/partials/function/task-lists.html +++ b/layouts/partials/function/task-lists.html @@ -11,13 +11,15 @@ "!" "fa-solid fa-circle-exclamation" "\\?" "fa-regular fa-circle-question" -}} +{{- /* Custom Task lists */ -}} +{{- $iconMap = site.Params.taskList | merge $iconMap -}} + +{{- /* Get the extended signs */ -}} {{- $extendedSigns := slice -}} {{- range $sign, $icon := $iconMap -}} {{- $extendedSigns = $extendedSigns | append $sign -}} {{- end -}} -{{- /* TODO merge from config */ -}} - {{- /* The basic syntax is compatible with GitHub, Obsidian, and Typora. The basic format is as follows: