Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the following setup, where one main item includes all parts:
FileUtils.mkdir_p('content') FileUtils.mkdir_p('content/parts') File.write('content/main.erb', 'Stuff') File.write('content/parts/a.txt', "---\ndraft: false\n---\nPart A") File.write('content/parts/b.txt', "---\ndraft: false\n---\nPart B") File.write('Rules', <<~CONTENT) preprocess do @items.delete_if { |i| i[:draft] } end compile '/*.erb' do filter :erb write ext: 'txt' end compile '/**/*.txt' do write ext: 'txt' end CONTENT File.write('content/main.erb', '<%= @items.find_all("/parts/*").map(&:compiled_content).sort.join("\n") %>')
Compile. output/main.txt will contain both parts A and B.
output/main.txt
Mark a part as draft:
File.write('content/parts/b.txt', "---\ndraft: true\n---\nPart B")
Compile.
output/main.txt will contain only part A.
output/main.txt will contain both parts A and B.
…
n/a
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Use the following setup, where one main item includes all parts:
Compile.
output/main.txt
will contain both parts A and B.Mark a part as draft:
Compile.
Expected behavior
output/main.txt
will contain only part A.Actual behavior
output/main.txt
will contain both parts A and B.Details
…
Crash log
n/a
The text was updated successfully, but these errors were encountered: