jabb-astro-components
Version:
UI Components for web development
84 lines (78 loc) • 1.94 kB
TypeScript
export {};
declare global {
namespace Head {
type Metadata1 = {
readonly name: string;
readonly keywords: string;
readonly icon: string;
};
type ogType = 'website' | 'article' | 'book' | 'profile' | 'video.other';
export interface Metadata {
title: string;
description: string;
keywords?: string;
nofollow?: boolean;
noindex?: boolean;
canonical: string;
openGraph: {
title?: string;
description?: string;
type?: ogType;
locale?: ogLocale;
altLocale?: ogLocale;
author?: string;
publishedTime?: string;
};
ogImage?: {
src: string;
mime: mimeType;
alt: string;
width?: string;
height?: string;
};
}
export interface AllMetadata extends Metadata {
siteName: string;
icon?: { src: string; mime?: mimeType };
sitemap?: string;
siteKeywords: string;
transition?: boolean;
aHref?: string;
}
type rel = 'prefetch' | 'preload' | 'preconnect' | 'dns-prefetch';
type as = 'style' | 'script' | 'font' | 'image' | 'document';
/**
* @param rel
* @param href
* @param as
* @param type
* @param crossorigin
*/
export interface Preload {
rel: rel;
href: string;
as?: as;
type?: string;
crossorigin?: 'anonymous' | 'use-credentials';
}
}
namespace RichSnippets {
export interface BlogPosting {
'@context': string;
'@type': string;
headline: string;
image: string[];
datePublished: Date | string;
dateModified: Date | string;
author?: {
'@type': string;
name: string;
url: string;
}[];
publisher?: {
name: string;
url: string;
};
}
}
}