Sha256: e37a54f76cec36f887c4a16f09559cab6e26346d04936cbd9d491e9ccd4b4de5

Contents?: true

Size: 554 Bytes

Versions: 24

Compression:

Stored size: 554 Bytes

Contents

module Octopress
  module Ink
    module Tags
      class AbortTag < Liquid::Tag
        def initialize(tag_name, markup, tokens)
          super
          @markup = " #{markup}"
        end

        def render(context)
          if Helpers::Conditional.parse(@markup, context)
            env = context.environments.first
            dest = File.join(Helpers::Path.site_dir, env['page']['url'])
            context.environments.first['site']['pages'] = Helpers::Path.remove_page(dest)
          end
          ''
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
octopress-ink-1.0.0.alpha.35 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.alpha.34 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.alpha.33 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.alpha.32 lib/octopress-ink/tags/abort.rb