mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-20 11:24:05 -06:00
fix(contentIndex): restore empty file choice
This commit is contained in:
parent
fe245d920b
commit
3ea901334d
@ -164,6 +164,11 @@ export const ContentIndex: QuartzEmitterPlugin<Partial<Options>> = (opts) => {
|
|||||||
var pointer = indexTree
|
var pointer = indexTree
|
||||||
const dirs = file.data.relativePath?.split("/").slice(0, -1) ?? []
|
const dirs = file.data.relativePath?.split("/").slice(0, -1) ?? []
|
||||||
|
|
||||||
|
// If file is blank, don't include it unless specified
|
||||||
|
if (!opts?.includeEmptyFiles || (file.data.text && file.data.text === "")) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
// Skips descent if file is top-level (ex. content/index.md)
|
// Skips descent if file is top-level (ex. content/index.md)
|
||||||
for (var i = 1; i <= dirs.length; i++) {
|
for (var i = 1; i <= dirs.length; i++) {
|
||||||
// Initialize directories
|
// Initialize directories
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user