Closed charlieIT closed 2 years ago
Proposed features
<meta>
<head>
Struct changes
Added properties title and meta to Page.
title
meta
Page
When no title is provided, behaviour will be the same as currently, the browser will assume an IP or Domain based name for the page
mutable struct Page dependencies::Vector{WebDependency} components::Dict{String,Any} scripts::Vector{String} cookiejar::Dict{String, Any} globals::Dict{String, Any} meta::Vector{HtmlElement} title::Union{String, Nothing} end
Meta tag helpers
Helper methods added to Core\Base.jl to simplify creation of <meta> HTMLElements.
Core\Base.jl
meta(entry::Pair) meta(entry::Dict) meta(entries::Vector)
function vue_handler(req) return VueJS.response( VueJS.page(["Welcome"], title="Teste", meta=[VueJS.meta(Dict("charset"=>"utf-16")), VueJS.meta(Dict("name"=>"robots", "content"=>"noindex,follow"))] ) ) end
<head> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Teste</title> <meta charset="utf-16"> <meta name="robots" content="noindex,follow"> (...)
Proposed features
<meta>
tags on individual pages<head>
tags on individual pagesStruct changes
Added properties
title
andmeta
toPage
.When no
title
is provided, behaviour will be the same as currently, the browser will assume an IP or Domain based name for the pageMeta tag helpers
Helper methods added to
Core\Base.jl
to simplify creation of<meta>
HTMLElements.