middleman / middleman-blog

Blog Engine Extension for Middleman
https://middlemanapp.com
MIT License
326 stars 179 forks source link

Blog articles not appearing in production #225

Closed mockdeep closed 10 years ago

mockdeep commented 10 years ago

I'm having some trouble getting my blog to build for production. Everything renders fine in dev mode, but when I run middleman build it generates index.html as if there were no articles. What am I doing wrong? Here's the file structure I have:

source/
|-- articles
|   `-- 2014-09-19-first-post.html.markdown
|-- calendar.html.erb
|-- feed.xml.builder
|-- images
|-- index.html.erb
|-- javascripts
|-- layout.html.erb
|-- layouts
|   `-- article_layout.html.erb
|-- partials
|   |-- _footer.html.erb
|   `-- _nav.html.erb
|-- stylesheets
|   |-- all.css.scss
|   |-- base
|   |   |-- _base.scss
|   |   |-- _buttons.scss
|   |   |-- extends
|   |   |   |-- _button.scss
|   |   |   |-- _clearfix.scss
|   |   |   `-- _hide-text.scss
|   |   |-- _flashes.scss
|   |   |-- _forms.scss
|   |   |-- _grid-settings.scss
|   |   |-- _lists.scss
|   |   |-- mixins
|   |   |   `-- _flash.scss
|   |   |-- _tables.scss
|   |   |-- _typography.scss
|   |   `-- _variables.scss
|   |-- partials
|   |   |-- _article.css.scss
|   |   |-- _footer.css.scss
|   |   |-- _layout.css.scss
|   |   `-- _nav.css.scss
|   `-- syntax_highlighting.css.erb
`-- tag.html.erb

and my configuration:

activate :blog do |blog|
  blog.sources = 'articles/{year}-{month}-{day}-{title}.html'
  blog.tag_template = 'tag.html'
  blog.calendar_template = 'calendar.html'
end

activate :syntax, line_numbers: true
set :markdown_engine, :redcarpet
set :markdown, fenced_code_blocks: true,
               smartypants: true,
               space_after_headers: true,
               no_intra_emphasis: true,
               tables: true,
               autolink: true,
               disable_indented_code_blocks: true,
               strikethrough: true,
               lax_spacing: true,
               superscript: true,
               underline: true,
               highlight: true,
               quote: true

page '/feed.xml', layout: false

page '/articles/*', layout: :article_layout

set :css_dir, 'stylesheets'
set :js_dir, 'javascripts'
set :images_dir, 'images'
set :build_dir, 'tmp'

configure :build do
end

configure :development do
  activate :livereload
end

and the output from a clean middleman build --verbose:

== Activating: sprockets
== Reading:  Local config
== Activating: blog
== Activating: syntax
Loaded extensions:
== Extension: sprockets
== Extension: blog
== Extension: syntax
== Extension: frontmatter
== File Change: config.rb
== File Change: Procfile
== File Change: source/tag.html.erb
== File Change: source/calendar.html.erb
== File Change: source/layout.html.erb
== File Change: source/stylesheets/all.css.scss
== File Change: source/stylesheets/partials/_layout.css.scss
== File Change: source/stylesheets/partials/_footer.css.scss
== File Change: source/stylesheets/partials/_article.css.scss
== File Change: source/stylesheets/partials/_nav.css.scss
== File Change: source/stylesheets/syntax_highlighting.css.erb
== File Change: source/stylesheets/base/_tables.scss
== File Change: source/stylesheets/base/_lists.scss
== File Change: source/stylesheets/base/extends/_hide-text.scss
== File Change: source/stylesheets/base/extends/_button.scss
== File Change: source/stylesheets/base/extends/_clearfix.scss
== File Change: source/stylesheets/base/_grid-settings.scss
== File Change: source/stylesheets/base/_flashes.scss
== File Change: source/stylesheets/base/_buttons.scss
== File Change: source/stylesheets/base/_base.scss
== File Change: source/stylesheets/base/_variables.scss
== File Change: source/stylesheets/base/mixins/_flash.scss
== File Change: source/stylesheets/base/_forms.scss
== File Change: source/stylesheets/base/_typography.scss
== File Change: source/index.html.erb
== File Change: source/articles/2014-09-19-first-post.html.markdown
== File Change: source/feed.xml.builder
== File Change: source/partials/_nav.html.erb
== File Change: source/partials/_footer.html.erb
== File Change: source/layouts/article_layout.html.erb
== File Change: Rakefile
== File Change: config.ru
== Rebuilding resource list
== Prerendering CSS
      create  tmp/stylesheets/all.css
      create  tmp/stylesheets/syntax_highlighting.css
== Checking for Compass sprites
== Building files
== Request: /index.html
== Finishing Request: index.html (0.01s)
      create  tmp/index.html
== Request: /feed.xml
== Finishing Request: feed.xml (0.0s)
      create  tmp/feed.xml
mockdeep commented 10 years ago

Here is the full repo: https://github.com/mockdeep/boon-blog

tdreyno commented 10 years ago

Your article has the following front matter:

published: false

Causing it not to be built.

mockdeep commented 10 years ago

Ugh, facepalm. Thanks.