From afea5cf1c9f5ba77d6d1783d455dc62bd9f9b054 Mon Sep 17 00:00:00 2001 From: Philip Chu Date: Wed, 9 Aug 2023 22:59:54 -0600 Subject: [PATCH] fried chicken rice --- assets/json/dish/ricedishes.json | 2 +- hugo.scm | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/assets/json/dish/ricedishes.json b/assets/json/dish/ricedishes.json index f5b9dced..89840eb0 100644 --- a/assets/json/dish/ricedishes.json +++ b/assets/json/dish/ricedishes.json @@ -80,7 +80,7 @@ ] }, "Pinyin": "zhà jī fàn", - "description": "{炸} is *deep-fried*, {雞} is *chicken*, and {飯} is *rice* (cooked), so 蒸 is *fried chicken rice*." + "description": "{炸} is *deep-fried*, {雞} is *chicken*, and {飯} is *rice* (cooked), so 炸雞飯 is *fried chicken rice*." }, "images": [ { diff --git a/hugo.scm b/hugo.scm index 82dfe7c3..82f9c582 100755 --- a/hugo.scm +++ b/hugo.scm @@ -110,7 +110,7 @@ (define (write-dish-tags dish out) (let ((tags (tags dish))) (if tags - (let ((qtags (map (lambda (tag) #"\"~tag\"") tags))) + (let ((qtags (map (lambda (tag) (tag-display tag)) tags))) (write-string #"tags: [~(comma-list qtags)]" out))) (newline out))) @@ -124,6 +124,12 @@ (write-string #"categories: [~(comma-list qcats)]" out) (newline out))))) +(define (tag-display tag) + (let ((word (hash-table-get words tag))) + (if word + #"\"~tag ~(english word)\"" + #"\"tag\""))) + (define (write-dish-date dish out) (write-string #"showDate: false" out) (newline out))