Skip to content

Jekyll throws up on empty documents #179

@strogonoff

Description

@strogonoff

When parsing an .adoc file that has nothing but frontmatter, Jekyll AsciiDoc throws “Failed to load AsciiDoc document - unsupported input type: NilClass”.

Adding just a header to ADoc contents works around the problem.

This seems like an acceptable limitation in general, although inconsistent since Jekyll supports empty frontmatter-only files of other types.

It seems also inconsistent with the docs.

tonys:~% bundle exec jekyll serve --host localhost --port 4003 --trace
Configuration file: /Users/tony/Developer/Ribose/riffol.com/_config.yml
<…>
ArgumentError: asciidoctor: FAILED: /Users/tony/Developer/Ribose/riffol.com/_software/riffol/docs/navigation.adoc: Failed to load AsciiDoc document - unsupported input type: NilClass                     
  /Users/tony/.rvm/gems/ruby-2.4.4/gems/asciidoctor-1.5.7.1/lib/asciidoctor.rb:1352:in `load'
  /Users/tony/.rvm/gems/ruby-2.4.4/gems/jekyll-asciidoc-2.1.0/lib/jekyll-asciidoc/converter.rb:197:in `load_header'                                                                                        
  /Users/tony/.rvm/gems/ruby-2.4.4/gems/jekyll-asciidoc-2.1.0/lib/jekyll-asciidoc/integrator.rb:60:in `integrate'                                                                                          
  /Users/tony/.rvm/gems/ruby-2.4.4/gems/jekyll-asciidoc-2.1.0/lib/jekyll-asciidoc/integrator.rb:38:in `block (2 levels) in generate'                                                                       
  /Users/tony/.rvm/gems/ruby-2.4.4/gems/jekyll-asciidoc-2.1.0/lib/jekyll-asciidoc/integrator.rb:37:in `select!'                                                                                            
  /Users/tony/.rvm/gems/ruby-2.4.4/gems/jekyll-asciidoc-2.1.0/lib/jekyll-asciidoc/integrator.rb:37:in `block in generate'                                                                                  
  /Users/tony/.rvm/gems/ruby-2.4.4/gems/jekyll-asciidoc-2.1.0/lib/jekyll-asciidoc/integrator.rb:35:in `each'                                                                                               
  /Users/tony/.rvm/gems/ruby-2.4.4/gems/jekyll-asciidoc-2.1.0/lib/jekyll-asciidoc/integrator.rb:35:in `generate'                                                                                           
  /Users/tony/.rvm/gems/ruby-2.4.4/gems/jekyll-3.8.3/lib/jekyll/site.rb:175:in `block in generate'

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions