From 03b0239539af05e2e0b408de6d14f698a7a66157 Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Tue, 19 Dec 2023 08:41:45 +0100 Subject: [PATCH] snippets: add frontmatter snippet for running post Co-Authored-by: iGor milhit --- my_snippets/markdown.lua | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/my_snippets/markdown.lua b/my_snippets/markdown.lua index 7883817..dd1e6cd 100644 --- a/my_snippets/markdown.lua +++ b/my_snippets/markdown.lua @@ -133,6 +133,44 @@ return { } ) ), + s( + { + trig = "run", + name = "YAML frontmatter for a running note", + dscr = "Insert a YAML frontmatter for running notes.\n\nIt has a date for the title, a datetime with the locale daylight saving time for the date and id field, some prefilled tags. Other specific metadata for running are to be filled. This snippet should be adapted when following another plan." + }, + fmt( + [[ + --- + title: {5} + date: {6} + id: {7} + tags: [préparation marathon, campus, plan 2, {1}] + plan: + - coaching: "campus" + - type: "marathon" + - durée: "24 semaines" + séance: + - type: "{2}" + - semaine: {3} + - séance: {4} + données: + - privées: "" + - publiques: "" + --- + + ]], + { + i(1, "tags"), + i(2, "workout type"), + i(3, "week number of the plan"), + i(4, "workout number of the week"), + f(get_date, {}), + f(get_datetime, {}), + f(get_id, {}) + } + ) + ), s( { trig="reflink",