Skip to content

Commit 4ae4dbb

Browse files
authored
Merge pull request #771 from DIVD-NL/770-fix-documents-only-referenced-in-frontmatter-not-being-pushed-to-the-public-folder
770 - Force all documents in /documents into the /public folder
2 parents 44175a7 + 1268698 commit 4ae4dbb

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

layouts/_default/baseof.html

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{ partial "process-frontmatter-assets.html" . }}
12
<!doctype html>
23
<html lang="{{ .Lang | default "en" }}">
34
<head>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{/* This partial processes all documents in the assets/documents directory without fingerprinting */}}
2+
{{ $allDocuments := resources.Match "documents/**" }}
3+
{{ range $allDocuments }}
4+
{{/* Get the file path relative to the assets directory */}}
5+
{{ $relPath := .RelPermalink }}
6+
7+
{{/* Process and publish with the original filename */}}
8+
{{ $processed := . | resources.Copy $relPath }}
9+
10+
{{/* Store for debugging */}}
11+
{{ $.Scratch.Add "processedDocs" (slice $processed.RelPermalink) }}
12+
{{ end }}
13+
{{ $.Scratch.Set "documentsCount" (len $allDocuments) }}

0 commit comments

Comments
 (0)