From 5ffc34ed56965aab3a60289d4201e0406b98e5a3 Mon Sep 17 00:00:00 2001 From: raar1 Date: Wed, 29 May 2024 16:30:05 +0200 Subject: [PATCH 1/6] Check for type in front-matter instead of requiring different extension --- pages/modules/[module]/[chapter].vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/modules/[module]/[chapter].vue b/pages/modules/[module]/[chapter].vue index 1701b066..18510320 100644 --- a/pages/modules/[module]/[chapter].vue +++ b/pages/modules/[module]/[chapter].vue @@ -1,7 +1,8 @@ @@ -18,6 +20,11 @@ export default { default: "Missing Document", }, }, + methods: { + stripFrontmatter (mdstr) { + return mdstr.replace(/^---$.*?^---$/ms, ''); + }, + }, }; diff --git a/pages/modules/[module]/[chapter].vue b/pages/modules/[module]/[chapter].vue index 18510320..1fb2817f 100644 --- a/pages/modules/[module]/[chapter].vue +++ b/pages/modules/[module]/[chapter].vue @@ -1,9 +1,8 @@