if no collections, we need to create a collections dir
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
oDinZu 2022-12-03 18:45:49 -05:00
parent f83f96da6c
commit d83900e280
2 changed files with 17 additions and 3 deletions

View File

@ -169,11 +169,18 @@ author_ids = parsed_authors_file["data"]
Jekyll.logger.debug "::DOCUMENT POST DEBUG:: Raw Content: " "#{content}".to_s.yellow
end
# manually create custom collection folders [bug: shouldn't Jekyll do this? https://github.com/jekyll/jekyll/issues/9193]
if not Dir.exist?("./collections")
Jekyll.logger.info "the Jekyll collections directory does not exist, let's create one".to_s.red
Dir.mkdir("./collections/")
Jekyll.logger.info "DIR DEBUG: The local ./collections directory is created at: ./collections".to_s.yellow
end
# manually create custom collection folders [bug: shouldn't Jekyll do this? https://github.com/jekyll/jekyll/issues/9193]
if not Dir.exist?("./collections/_posts")
Jekyll.logger.info "the Jekyll posts directory does not exist, let's create one".to_s.red
Dir.mkdir("./collections/_posts/")
Jekyll.logger.info "DIR DEBUG: The local ./collections/_posts directory is created at: ./collections/_posts/".to_s.yellow
Jekyll.logger.info "the Jekyll posts directory does not exist, let's create one".to_s.red
Dir.mkdir("./collections/_posts/")
Jekyll.logger.info "DIR DEBUG: The local ./collections/_posts directory is created at: ./collections/_posts/".to_s.yellow
end
# create the filename

View File

@ -342,6 +342,13 @@ if "#{shop_enabled}" === "true"
Jekyll.logger.debug "::DOCUMENT PRODUCT DEBUG:: is_taxable: " "#{is_taxable}".to_s.yellow.bold
end
# manually create custom collection folders [bug: shouldn't Jekyll do this? https://github.com/jekyll/jekyll/issues/9193]
if not Dir.exist?("./collections")
Jekyll.logger.info "the Jekyll collections directory does not exist, let's create one".to_s.red
Dir.mkdir("./collections/")
Jekyll.logger.info "DIR DEBUG: The local ./collections directory is created at: ./collections".to_s.yellow
end
# manually create custom collection folders [bug: shouldn't Jekyll do this? https://github.com/jekyll/jekyll/issues/9193]
if not Dir.exist?("./collections/_products")
Jekyll.logger.info "the Jekyll products directory does not exist, let's create one".to_s.red