From 4cb72677db72c174fbbc532cbea2468f89ea7760 Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Wed, 31 May 2023 23:08:55 +0200 Subject: [PATCH] Fix video paths for external files --- Sources/Generator/Content/Element.swift | 2 +- Sources/Generator/Generators/PageContentGenerator.swift | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/Generator/Content/Element.swift b/Sources/Generator/Content/Element.swift index bd041d9..2d7407d 100644 --- a/Sources/Generator/Content/Element.swift +++ b/Sources/Generator/Content/Element.swift @@ -65,7 +65,7 @@ struct Element { let sortIndex: Int? /** - All files which may occur in content but is stored externally. + All files which may occur in content but are stored externally. Missing files which would otherwise produce a warning are ignored when included here. - Note: This property defaults to an empty set. diff --git a/Sources/Generator/Generators/PageContentGenerator.swift b/Sources/Generator/Generators/PageContentGenerator.swift index 6e228c7..d536a3d 100644 --- a/Sources/Generator/Generators/PageContentGenerator.swift +++ b/Sources/Generator/Generators/PageContentGenerator.swift @@ -215,6 +215,7 @@ struct PageContentGenerator { } // Also look in external files sources += selectVideoFiles(with: prefix, from: page.externalFiles) + .map { (page.relativePathToFileWithPath($0.url), $0.type) } // Require all video files sources.forEach {