Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,16 @@ static void CollectExcluded(IReadOnlyCollection<ITableOfContentsItem> items, Has
foreach (var file in contentFiles)
{
var group = fileGroups[file];

// If listing: frontmatter is absent, infer the group from the parent directory
// when that directory is a known group folder (has a group index file).
if (string.IsNullOrEmpty(group) && file.Directory is not null)
{
var parentRel = Path.GetRelativePath(listingDirAbsolute, file.Directory.FullName).Replace('\\', '/');
if (groupIndexFiles.ContainsKey(parentRel))
group = parentRel;
}

if (!string.IsNullOrEmpty(group))
{
if (!groupedFiles.ContainsKey(group))
Expand Down
Loading