Class: Jekyll::Vite::ClientTag

Inherits:
Tag
  • Object
show all
Defined in:
lib/jekyll/vite/tags.rb

Overview

Public: Renders the @vite/client script tag.

Instance Method Summary collapse

Methods inherited from Tag

#render_variable

Instance Method Details

#render(context) ⇒ Object



89
90
91
92
93
94
95
# File 'lib/jekyll/vite/tags.rb', line 89

def render(context)
  return unless src = vite_manifest.vite_client_src

  super {
    tag :script, src: src, type: 'module'
  }
end

#syntax_exampleObject



97
98
99
# File 'lib/jekyll/vite/tags.rb', line 97

def syntax_example
  "{% #{ @tag_name } %}"
end