Sets or gets the data to pass with the response.
A data object to be used by the page routed to. The page routed to accesses the
data passed to it using the getRouterData()
function of wix-window-frontend
with optional data and HTML header.
export function myRouter_Router(request) {
let data = response.data;
/*
* {
* "title": "A",
* "imageSite": "https://static.wixstatic.com/media/",
* "image": "b8f383e0fe2b478ea91362b707ef267b.jpg"
* }
*/
}
Sets or gets the members to be written to the HTML head of the page.
The information you set using the head
property, such as links or meta tags.
Overwrites any head information set earlier.
The members of the head
property value are written to the HTML head for use by
browsers and SEO bots.
export function myRouter_Router(request) {
let head = response.head;
/*
* {
* "title": "A page title",
* "metaTags": [
* {
* "name": "description",
* "content": "A page description"
* }, {
* "name": "keywords",
* "content": "Velo Example"
* }, {
* "name": "robots",
* "content": "noindex"
* }, {
* "name": "og:title",
* "content": "The Title"
* }, {
* "property": "og:image",
* "content": "wix:image://v1/6...2.jpg/a.jpg#originWidth=970&originHeight=120"
* }
* ],
* "links": [
* {
* "rel": "canonical",
* "href": "http://mysite.com/somePage.html"
* }
* ],
* "structuredData": [
* {
* "@context": "http://schema.org",
* "@type": "Organization",
* "name": "My Organization Name",
* "url": "https://www.myorgdomain.com"
* }, {
* "@context": "http://schema.org",
* "@type": "Person",
* "email": "mailto:john.doe@somedomain.com",
* "jobTitle": "Professor",
* "name": "John Doe",
* "telephone": "(555) 555-555"
* }
* ]
* }
*/