Some checks failed
CI / go (push) Waiting to run
CI / docker (push) Waiting to run
CI / lint-go (push) Waiting to run
CI / lint-docs (push) Waiting to run
CI / check-paperclip (push) Waiting to run
Deploy static site / Deploy to GitHub Pages (push) Has been cancelled
Deploy static site / Deploy via Docker to hatch.surf (push) Has been cancelled
Resolved conflicts by taking GitHub versions for: - .dockerignore, .gitignore, Dockerfile, README.md, docker-compose.yml Kept deploy.sh updated to: - Pull from GitHub (primary source) - Push to Gitea (push-mirror) - Build from site/ directory (GitHub structure) Co-Authored-By: Paperclip <noreply@paperclip.ing>
54 lines
2.3 KiB
TypeScript
54 lines
2.3 KiB
TypeScript
import type { PageExtensions } from '../../build/page-extensions-type';
|
|
export declare const STATIC_METADATA_IMAGES: {
|
|
readonly icon: {
|
|
readonly filename: "icon";
|
|
readonly extensions: readonly ["ico", "jpg", "jpeg", "png", "svg"];
|
|
};
|
|
readonly apple: {
|
|
readonly filename: "apple-icon";
|
|
readonly extensions: readonly ["jpg", "jpeg", "png"];
|
|
};
|
|
readonly favicon: {
|
|
readonly filename: "favicon";
|
|
readonly extensions: readonly ["ico"];
|
|
};
|
|
readonly openGraph: {
|
|
readonly filename: "opengraph-image";
|
|
readonly extensions: readonly ["jpg", "jpeg", "png", "gif"];
|
|
};
|
|
readonly twitter: {
|
|
readonly filename: "twitter-image";
|
|
readonly extensions: readonly ["jpg", "jpeg", "png", "gif"];
|
|
};
|
|
};
|
|
export declare const DEFAULT_METADATA_ROUTE_EXTENSIONS: string[];
|
|
export declare const getExtensionRegexString: (staticExtensions: readonly string[], dynamicExtensions: readonly string[] | null) => string;
|
|
/**
|
|
* Matches the static metadata files, e.g. /robots.txt, /sitemap.xml, /favicon.ico, etc.
|
|
* @param appDirRelativePath the relative file path to app/
|
|
* @returns if the path is a static metadata file route
|
|
*/
|
|
export declare function isStaticMetadataFile(appDirRelativePath: string): boolean;
|
|
/**
|
|
* Determine if the file is a metadata route file entry
|
|
* @param appDirRelativePath the relative file path to app/
|
|
* @param pageExtensions the js extensions, such as ['js', 'jsx', 'ts', 'tsx']
|
|
* @param strictlyMatchExtensions if it's true, match the file with page extension, otherwise match the file with default corresponding extension
|
|
* @returns if the file is a metadata route file
|
|
*/
|
|
export declare function isMetadataRouteFile(appDirRelativePath: string, pageExtensions: PageExtensions, strictlyMatchExtensions: boolean): boolean;
|
|
export declare function isStaticMetadataRoute(route: string): boolean;
|
|
/**
|
|
* Determine if a page or pathname is a metadata page.
|
|
*
|
|
* The input is a page or pathname, which can be with or without page suffix /foo/page or /foo.
|
|
* But it will not contain the /route suffix.
|
|
*
|
|
* .e.g
|
|
* /robots -> true
|
|
* /sitemap -> true
|
|
* /foo -> false
|
|
*/
|
|
export declare function isMetadataPage(page: string): boolean;
|
|
export declare function isMetadataRoute(route: string): boolean;
|