feat: add meta tag

This commit is contained in:
kp2pml30 2026-02-08 03:33:18 +09:00
parent 07dd66ed07
commit 35013b0676
Signed by: kp2pml30
GPG key ID: CD6528BAC23E3E34
2 changed files with 80 additions and 0 deletions

View file

@ -91,6 +91,23 @@ class HTMLRenderer < YAMD::Renderer
}
end
def single_tag(name, **attrs)
@buf << "<#{name}"
attrs.each { |k, v|
@buf << " "
if k.kind_of? Symbol
k = k.to_s
end
@buf << k
@buf << "=" << v.dump
}
@buf << "/>"
end
def meta(name, value)
single_tag('meta', name: name, content: value)
end
def tag(name, **attrs)
@buf << "<#{name}"
attrs.each { |k, v|