Sha256: 874c00f04129fc2a0935061022032d57a5418bc13f644a4bb25277a92192e8cd
Contents?: true
Size: 841 Bytes
Versions: 1
Compression:
Stored size: 841 Bytes
Contents
require "octopress-abort-tag/version" require "octopress-tag-helpers" require "jekyll" module Octopress module Tags module AbortTag class Tag < Liquid::Tag def initialize(tag_name, markup, tokens) super @markup = " #{markup}" end def render(context) if TagHelpers::Conditional.parse(@markup, context) site = context.environments.first['site'] dest = site['destination'] env = context.environments.first page_dest = File.join(dest, env['page']['url']) context.environments.first['site']['pages'].reject! do |p| p.destination(dest) == page_dest end end '' end end end end end Liquid::Template.register_tag('abort', Octopress::Tags::AbortTag::Tag)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
octopress-abort-tag-1.0.0 | lib/octopress-abort-tag.rb |