Generate content for pages with no visible children
This commit is contained in:
parent
1b6441e03e
commit
a2ed35a26d
@ -337,6 +337,10 @@ struct Element {
|
|||||||
var needsFirstSection: Bool {
|
var needsFirstSection: Bool {
|
||||||
showMostRecentSection || !featuredPages.isEmpty
|
showMostRecentSection || !featuredPages.isEmpty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var hasVisibleChildren: Bool {
|
||||||
|
!elements.filter { $0.state == .standard }.isEmpty
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: Paths
|
// MARK: Paths
|
||||||
|
@ -38,7 +38,7 @@ struct SiteGenerator {
|
|||||||
elementsToProcess.append(contentsOf: element.linkedElements)
|
elementsToProcess.append(contentsOf: element.linkedElements)
|
||||||
|
|
||||||
processAllFiles(for: element)
|
processAllFiles(for: element)
|
||||||
if !element.elements.isEmpty {
|
if element.hasVisibleChildren {
|
||||||
overviewGenerator.generate(section: element, language: language)
|
overviewGenerator.generate(section: element, language: language)
|
||||||
} else {
|
} else {
|
||||||
pageGenerator.generate(
|
pageGenerator.generate(
|
||||||
|
Loading…
Reference in New Issue
Block a user