1
0
mirror of https://github.com/meineerde/holgerjust.de.git synced 2026-02-21 11:02:03 +00:00

Ignore draft articles and their associated images

This commit is contained in:
Holger Just 2015-12-14 15:34:59 +01:00
parent a1b3febcc4
commit 869f2c25d8

View File

@ -124,6 +124,16 @@ page '/sitemap.xml', layout: false
ignore '/partials/*'
# Ignore draft articles and their associated images
drafts_dir = File.expand_path('../source/drafts', __FILE__)
ignore '/drafts/*'
Dir["#{drafts_dir}/*/*"].each do |draft|
draft_article = draft
.sub(/\A#{Regexp.escape drafts_dir}\//, '')
.sub(/\.[^\/]+\z/, '')
ignore "/images/#{draft_article}/*"
end
ready do
blog.tags.each do |tag, articles|
proxy "/tag/#{tag.downcase.parameterize}/feed.xml", '/feed.xml', layout: false do