Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Apr 11, 2024
1 parent 5698ec4 commit 13e3edc
Showing 1 changed file with 101 additions and 0 deletions.
101 changes: 101 additions & 0 deletions packages/vike-react/src/types/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,104 @@ declare global {
}
}
}

// TODO:
// - viewport default
// - locale default
// - <meta property="og:type" content="website">
// - <meta name="generator" content="VitePress v1.0.0-rc.45">
// - icon large, small, ...
// - preview images with different sizes?
type Document = {
title: string
description: string
/**
*
* <html lang="en">
* <meta property="og:locale" content="en_GB">
*
*/
locale: string
viewport: string | null

html: Record<string, string | string[]>
// Or?
html: Record<string, string>
class: string[]

/** Website icon (aka favicon).
*
* <link rel="icon" href="/favicon.ico">
* <link rel="apple-touch-icon" href="/apple-touch-icon.png">
*/
icon:
| string
| {
default?: string
small?: string
large?: string
apple?: string
// TODO: does this exist?
alt?: string
}
/**
* Preview image for social sharing.
*
* <meta property="og:image" content="https://vitejs.dev/og-image.png">
* <meta name="twitter:card" content="summary_large_image">
*/
imagePreview: string | {
url?: string
// <meta name="twitter:card" content="summary_large_image">
size?: string
alt?: string
}
// Or?
preview: string

// <meta name="twitter:site" content="@vite_js">
twitter: string

/**
* Canonical URL.
*
* <meta property="og:url" content="https://www.mywebsite.com/page">
* <link rel="canonical" href="https://www.mywebsite.com/page">
*/
canonical: string
/**
* The web manifest URL.
*
* `<link rel="manifest" href="${document.manifest}">`
*
* https://developer.mozilla.org/en-US/docs/Web/Manifest
* https://vike.dev/document
*/
manifest: string
/**
* The UI frame color for mobile.
*
* `<meta name="theme-color" content="${document.themeColor}">`
*
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color
* https://vike.dev/document
*/
themeColor:
| string
| {
/**
* `<meta name="theme-color" content="${document.themeColor.dark}" media="(prefers-color-scheme: dark)">`
*
* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
* https://vike.dev/document
*/
dark: string
/**
* `<meta name="theme-color" content="${document.themeColor.light}" media="(prefers-color-scheme: light)">`
*
* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
* https://vike.dev/document
*/
light: string
}
}

0 comments on commit 13e3edc

Please sign in to comment.