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.rc.11 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.rc.10 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.rc.9 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.rc.8 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.rc.7 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.rc.6 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.rc.5 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.rc.3 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.rc.2 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.rc.1 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.alpha.45 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.alpha.44 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.alpha.43 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.alpha.42 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.alpha.41 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.alpha.40 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.alpha.39 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.alpha.38 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.alpha.37 lib/octopress-ink/tags/abort.rb
octopress-ink-1.0.0.alpha.36 lib/octopress-ink/tags/abort.rb