Skip to content

Commit 529b63e

Browse files
committed
fix: /sources.json and /status.json outputs
- sources: Update JSON generation to include full path in 'loc' field instead of just the base name - status: added `media` field
1 parent a33ecb3 commit 529b63e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

themes/ace-documentation/layouts/_default/list.sources.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{{ range .Site.Sections }}
44
{{ if .Params.source }}
5-
{{ $sectionLoc := .File.ContentBaseName }}
5+
{{ $sectionLoc := printf "%s%s" .File.Dir .File.ContentBaseName | strings.TrimPrefix "/" }}
66
{{ $transcripts := slice }}
77
{{ $latestDate := "" }}
88

@@ -20,7 +20,7 @@
2020
{{ else }}
2121
{{ range .Pages }}
2222
{{ if and (eq .BundleType "branch") .Params.source }}
23-
{{ $sourceLoc := .File.ContentBaseName }}
23+
{{ $sourceLoc := printf "%s%s" .File.Dir .File.ContentBaseName | strings.TrimPrefix "/" }}
2424
{{ $transcripts := slice }}
2525
{{ $latestDate := "" }}
2626

themes/ace-documentation/layouts/_default/list.status.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
"title" .Title
6161
"tags" .Params.tags
6262
"speakers" .Params.speakers
63-
"source_file" .Params.media
63+
"source_file" (or .Params.source_file .Params.media)
64+
"media" .Params.media
6465
"categories" .Params.categories
6566
"date" $formattedDate
6667
"loc" (path.Dir .File.Path)

0 commit comments

Comments
 (0)