From ee5c85c76ac9e08a71ae09b42d11f60bd04aefca Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 4 Jul 2021 17:27:55 +0200 Subject: compiler: register distinct markdown item type --- compiler/src/ItemProcessors.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'compiler/src/ItemProcessors.hs') diff --git a/compiler/src/ItemProcessors.hs b/compiler/src/ItemProcessors.hs index 476b7d7..fa99316 100644 --- a/compiler/src/ItemProcessors.hs +++ b/compiler/src/ItemProcessors.hs @@ -1,7 +1,7 @@ -- ldgallery - A static generator which turns a collection of tagged -- pictures into a searchable web gallery. -- --- Copyright (C) 2019-2020 Pacien TRAN-GIRARD +-- Copyright (C) 2019-2021 Pacien TRAN-GIRARD -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as @@ -36,6 +36,7 @@ import Files data Format = PictureFormat | PlainTextFormat + | MarkdownFormat | PortableDocumentFormat | VideoFormat | AudioFormat @@ -56,7 +57,7 @@ formatFromPath = ".gif" -> PictureFormat ".webp" -> PictureFormat ".txt" -> PlainTextFormat - ".md" -> PlainTextFormat -- TODO: handle markdown separately + ".md" -> MarkdownFormat ".pdf" -> PortableDocumentFormat ".wav" -> AudioFormat ".oga" -> AudioFormat @@ -100,6 +101,7 @@ itemFileProcessor maxResolution = processorFor PictureFormat Nothing = transformThenDescribe copyFileProcessor getPictureProps processorFor PlainTextFormat _ = copyResource PlainText + processorFor MarkdownFormat _ = copyResource Markdown processorFor PortableDocumentFormat _ = copyResource PDF processorFor VideoFormat _ = copyResource Video processorFor AudioFormat _ = copyResource Audio -- cgit v1.2.3