Saltearse al contenido

consts

Esta página aún no está disponible en tu idioma.

type CurrentRESTAPIVersions = typeof currentRESTAPIVersions[number];

Defined in: studiocms/packages/studiocms/src/consts.ts:49^

Current REST API Versions Type


type StudioCMSSocials = {
discord: string;
github: string;
githubContributors: string;
githubLicense: string;
};

Defined in: studiocms/packages/studiocms/src/consts.ts:104^

StudioCMS Social Links Type

discord: string;

Defined in: studiocms/packages/studiocms/src/consts.ts:108^

github: string;

Defined in: studiocms/packages/studiocms/src/consts.ts:105^

githubContributors: string;

Defined in: studiocms/packages/studiocms/src/consts.ts:107^

githubLicense: string;

Defined in: studiocms/packages/studiocms/src/consts.ts:106^

const AstroConfigImageSettings: Partial<AstroConfig["image"]>;

Defined in: studiocms/packages/studiocms/src/consts.ts:203^

Partial configuration object for Astro’s image settings.

This constant defines allowed remote image patterns for Astro, specifying that images can be loaded from both ‘https’ and ‘http’ protocols.

This is a partial type of AstroConfig['image'], so it can be merged with other image settings.

// Usage in Astro config
import { AstroConfigImageSettings } from './consts';
export default {
image: {
...AstroConfigImageSettings,
// other image settings
}
}

const AstroConfigViteSettings: Partial<AstroConfig["vite"]>;

Defined in: studiocms/packages/studiocms/src/consts.ts:227^

Partial Vite configuration settings for Astro projects.

This constant customizes the Vite settings used by Astro, specifically excluding the ‘three’ package from dependency optimization. This can be useful if ‘three’ causes issues during Vite’s dependency pre-bundling.

The type is a partial of the ‘vite’ property from the Astro configuration, allowing you to override or extend only the necessary Vite options.

https://docs.astro.build/en/reference/configuration-reference/#vite^


const authAPIRoute: (route: string) => string;

Defined in: studiocms/packages/studiocms/src/consts.ts:156^

Creates a standardized API route path for authentication-related endpoints.

string

string

A function that constructs the full API route path for authentication.


const CMSMailerConfigId: string = '1';

Defined in: studiocms/packages/studiocms/src/consts.ts:14^

StudioCMS Mailer Config Table Entry ID


const CMSNotificationSettingsId: string = '1';

Defined in: studiocms/packages/studiocms/src/consts.ts:19^

StudioCMS Notification Settings Table Entry ID


const CMSSiteConfigId: number = 1;

Defined in: studiocms/packages/studiocms/src/consts.ts:9^

StudioCMS Site Config Table Entry ID


const currentRESTAPIVersions: readonly ["v1"];

Defined in: studiocms/packages/studiocms/src/consts.ts:44^

Current REST API Versions


const dashboardAPIRoute: (route: string) => string;

Defined in: studiocms/packages/studiocms/src/consts.ts:149^

Creates a standardized API route path for the dashboard.

string

Optional additional path to append to the base dashboard API route.

string

A function that constructs the full API route path.


const defaultCacheLifeTime: TimeString = '5m';

Defined in: studiocms/packages/studiocms/src/consts.ts:26^

The default lifetime for cached items. This value is used to determine how long an item should remain in the cache before it is considered expired. This value is used in ./schemas/config/sdk.ts to set the default cache lifetime.


const GhostUserDefaults: {
avatar: string;
id: string;
name: string;
username: string;
};

Defined in: studiocms/packages/studiocms/src/consts.ts:125^

Default values for a “ghost” user in StudioCMS. This user represents a deleted user in the system.

avatar: string = 'https://seccdn.libravatar.org/static/img/mm/80.png';

id: string = '_StudioCMS_Ghost_User_';

name: string = 'Ghost (deleted user)';

username: string = 'studiocms_ghost_user';

const NotificationSettingsDefaults: {
emailVerification: boolean;
id: string;
oAuthBypassVerification: boolean;
requireAdminVerification: boolean;
requireEditorVerification: boolean;
};

Defined in: studiocms/packages/studiocms/src/consts.ts:135^

Default values for the site Notifications configuration.

emailVerification: boolean = false;

id: string = CMSNotificationSettingsId;

oAuthBypassVerification: boolean = false;

requireAdminVerification: boolean = false;

requireEditorVerification: boolean = false;

const routesDir: {
api: (file: string) => string;
authAPI: (file: string) => string;
authPage: (file: string) => string;
dashApi: (file: string) => string;
dashRoute: (file: string) => string;
errors: (file: string) => string;
fts: (file: string) => string;
mailer: (file: string) => string;
middleware: (file: string) => string;
sdk: (file: string) => string;
v1Rest: (file: string) => string;
};

Defined in: studiocms/packages/studiocms/src/consts.ts:80^

REST API Directory

api: (file: string) => string;

string

string

authAPI: (file: string) => string;

string

string

authPage: (file: string) => string;

string

string

dashApi: (file: string) => string;

string

string

dashRoute: (file: string) => string;

string

string

errors: (file: string) => string;

string

string

fts: (file: string) => string;

string

string

mailer: (file: string) => string;

string

string

middleware: (file: string) => string;

string

string

sdk: (file: string) => string;

string

string

v1Rest: (file: string) => string;

string

string


const STUDIOCMS_EDITOR_CSRF_COOKIE_NAME: "studiocms-editor-csrf-token" = 'studiocms-editor-csrf-token';

Defined in: studiocms/packages/studiocms/src/consts.ts:277^


const StudioCMSMarkdownDefaults: {
autoLinkHeadings: boolean;
callouts: false;
discordSubtext: boolean;
flavor: "studiocms";
};

Defined in: studiocms/packages/studiocms/src/consts.ts:177^

Default values for the StudioCMS Markdown configuration. This configuration is used to set up the default behavior of Markdown rendering in StudioCMS.

autoLinkHeadings: boolean = false;

callouts: false;

discordSubtext: boolean = false;

flavor: "studiocms";

const studioCMSSocials: StudioCMSSocials;

Defined in: studiocms/packages/studiocms/src/consts.ts:114^

StudioCMS Social Links


const versionCacheLifetime: number;

Defined in: studiocms/packages/studiocms/src/consts.ts:39^

The default lifetime for cached items in milliseconds. This value is used to determine how long an item should remain in the cache before it is considered expired.

function makeDashboardRoute(route?: string): (path: string) => string

Defined in: studiocms/packages/studiocms/src/consts.ts:163^

Creates a standardized API route path for the SDK.

string

Function

A function that constructs the full API route path for the SDK.

string

string


function StudioCMSDefaultRobotsConfig(__namedParameters: {
config: AstroConfig;
dashboardRoute: (path: string) => string;
sitemapEnabled: boolean;
}): {
host: string | boolean;
policy: {
allow: string | string[];
cleanParam: string | string[];
crawlDelay: number;
disallow: string | string[];
userAgent: | "*"
| "360Spider"
| "360Spider-Image"
| "360Spider-Video"
| "HaoSouSpider"
| "AdsBot-Google"
| "AdsBot-Google-Mobile"
| "AdsBot-Google-Mobile-Apps"
| "Googlebot"
| "Googlebot-Image"
| "Googlebot-Mobile"
| "Googlebot-News"
| "Googlebot-Video"
| "Mediapartners-Google"
| "adidxbot"
| "bingbot"
| "BingPreview"
| "MicrosoftPreview"
| "msnbot"
| "msnbot-media"
| "Applebot"
| "AppleNewsBot"
| "Baiduspider"
| "Baiduspider-image"
| "Baiduspider-mobile"
| "Baiduspider-news"
| "Baiduspider-video"
| "coccoc"
| "coccocbot-image"
| "coccocbot-web"
| "DuckDuckBot"
| "DuckDuckGo-Favicons-Bot"
| "facebookcatalog"
| "facebookexternalhit"
| "Facebot"
| "gooblog"
| "ichiro"
| "Sogou blog"
| "Sogou inst spider"
| "Sogou News Spider"
| "Sogou Orion spider"
| "Sogou spider2"
| "Sogou web spider"
| "Yandex"
| "YandexMobileBot"
| "Algolia Crawler"
| "BublupBot"
| "CCBot"
| "Cliqzbot"
| "Daumoa"
| "DeuSu"
| "EuripBot"
| "Exploratodo"
| "Feedly"
| "Findxbot"
| "istellabot"
| "JikeSpider"
| "Lycos"
| "Mail.Ru"
| "MojeekBot"
| "OrangeBot"
| "Pinterest"
| "Plukkie"
| "Qwantify"
| "Rambler"
| "SemanticScholarBot"
| "SeznamBot"
| "Sosospider"
| "Slurp"
| "Twitterbot"
| "WhatsApp"
| "yacybot"
| "YepBot"
| "Yeti"
| "YioopBot"
| "yoozBot"
| "YoudaoBot"
| (
| "*"
| "360Spider"
| "360Spider-Image"
| "360Spider-Video"
| "HaoSouSpider"
| "AdsBot-Google"
| "AdsBot-Google-Mobile"
| "AdsBot-Google-Mobile-Apps"
| "Googlebot"
| "Googlebot-Image"
| "Googlebot-Mobile"
| "Googlebot-News"
| "Googlebot-Video"
| "Mediapartners-Google"
| "adidxbot"
| "bingbot"
| "BingPreview"
| "MicrosoftPreview"
| "msnbot"
| "msnbot-media"
| "Applebot"
| "AppleNewsBot"
| "Baiduspider"
| "Baiduspider-image"
| "Baiduspider-mobile"
| "Baiduspider-news"
| "Baiduspider-video"
| "coccoc"
| "coccocbot-image"
| "coccocbot-web"
| "DuckDuckBot"
| "DuckDuckGo-Favicons-Bot"
| "facebookcatalog"
| "facebookexternalhit"
| "Facebot"
| "gooblog"
| "ichiro"
| "Sogou blog"
| "Sogou inst spider"
| "Sogou News Spider"
| "Sogou Orion spider"
| "Sogou spider2"
| "Sogou web spider"
| "Yandex"
| "YandexMobileBot"
| "Algolia Crawler"
| "BublupBot"
| "CCBot"
| "Cliqzbot"
| "Daumoa"
| "DeuSu"
| "EuripBot"
| "Exploratodo"
| "Feedly"
| "Findxbot"
| "istellabot"
| "JikeSpider"
| "Lycos"
| "Mail.Ru"
| "MojeekBot"
| "OrangeBot"
| "Pinterest"
| "Plukkie"
| "Qwantify"
| "Rambler"
| "SemanticScholarBot"
| "SeznamBot"
| "Sosospider"
| "Slurp"
| "Twitterbot"
| "WhatsApp"
| "yacybot"
| "YepBot"
| "Yeti"
| "YioopBot"
| "yoozBot"
| "YoudaoBot")[];
}[];
sitemap: string | boolean | string[];
}

Defined in: studiocms/packages/studiocms/src/consts.ts:241^

Generates the default robots.txt configuration for StudioCMS.

AstroConfig

(path: string) => string

boolean

{
host: string | boolean;
policy: {
allow: string | string[];
cleanParam: string | string[];
crawlDelay: number;
disallow: string | string[];
userAgent: | "*"
| "360Spider"
| "360Spider-Image"
| "360Spider-Video"
| "HaoSouSpider"
| "AdsBot-Google"
| "AdsBot-Google-Mobile"
| "AdsBot-Google-Mobile-Apps"
| "Googlebot"
| "Googlebot-Image"
| "Googlebot-Mobile"
| "Googlebot-News"
| "Googlebot-Video"
| "Mediapartners-Google"
| "adidxbot"
| "bingbot"
| "BingPreview"
| "MicrosoftPreview"
| "msnbot"
| "msnbot-media"
| "Applebot"
| "AppleNewsBot"
| "Baiduspider"
| "Baiduspider-image"
| "Baiduspider-mobile"
| "Baiduspider-news"
| "Baiduspider-video"
| "coccoc"
| "coccocbot-image"
| "coccocbot-web"
| "DuckDuckBot"
| "DuckDuckGo-Favicons-Bot"
| "facebookcatalog"
| "facebookexternalhit"
| "Facebot"
| "gooblog"
| "ichiro"
| "Sogou blog"
| "Sogou inst spider"
| "Sogou News Spider"
| "Sogou Orion spider"
| "Sogou spider2"
| "Sogou web spider"
| "Yandex"
| "YandexMobileBot"
| "Algolia Crawler"
| "BublupBot"
| "CCBot"
| "Cliqzbot"
| "Daumoa"
| "DeuSu"
| "EuripBot"
| "Exploratodo"
| "Feedly"
| "Findxbot"
| "istellabot"
| "JikeSpider"
| "Lycos"
| "Mail.Ru"
| "MojeekBot"
| "OrangeBot"
| "Pinterest"
| "Plukkie"
| "Qwantify"
| "Rambler"
| "SemanticScholarBot"
| "SeznamBot"
| "Sosospider"
| "Slurp"
| "Twitterbot"
| "WhatsApp"
| "yacybot"
| "YepBot"
| "Yeti"
| "YioopBot"
| "yoozBot"
| "YoudaoBot"
| (
| "*"
| "360Spider"
| "360Spider-Image"
| "360Spider-Video"
| "HaoSouSpider"
| "AdsBot-Google"
| "AdsBot-Google-Mobile"
| "AdsBot-Google-Mobile-Apps"
| "Googlebot"
| "Googlebot-Image"
| "Googlebot-Mobile"
| "Googlebot-News"
| "Googlebot-Video"
| "Mediapartners-Google"
| "adidxbot"
| "bingbot"
| "BingPreview"
| "MicrosoftPreview"
| "msnbot"
| "msnbot-media"
| "Applebot"
| "AppleNewsBot"
| "Baiduspider"
| "Baiduspider-image"
| "Baiduspider-mobile"
| "Baiduspider-news"
| "Baiduspider-video"
| "coccoc"
| "coccocbot-image"
| "coccocbot-web"
| "DuckDuckBot"
| "DuckDuckGo-Favicons-Bot"
| "facebookcatalog"
| "facebookexternalhit"
| "Facebot"
| "gooblog"
| "ichiro"
| "Sogou blog"
| "Sogou inst spider"
| "Sogou News Spider"
| "Sogou Orion spider"
| "Sogou spider2"
| "Sogou web spider"
| "Yandex"
| "YandexMobileBot"
| "Algolia Crawler"
| "BublupBot"
| "CCBot"
| "Cliqzbot"
| "Daumoa"
| "DeuSu"
| "EuripBot"
| "Exploratodo"
| "Feedly"
| "Findxbot"
| "istellabot"
| "JikeSpider"
| "Lycos"
| "Mail.Ru"
| "MojeekBot"
| "OrangeBot"
| "Pinterest"
| "Plukkie"
| "Qwantify"
| "Rambler"
| "SemanticScholarBot"
| "SeznamBot"
| "Sosospider"
| "Slurp"
| "Twitterbot"
| "WhatsApp"
| "yacybot"
| "YepBot"
| "Yeti"
| "YioopBot"
| "yoozBot"
| "YoudaoBot")[];
}[];
sitemap: string | boolean | string[];
}

The robots.txt configuration object.

optional host: string | boolean;
false

[ Optional ] Some crawlers(Yandex) support and only accept domain names.

integrations:[
robots({
host: siteUrl.replace(/^https?://|:\d+/g, "")
})
]
optional policy: {
allow: string | string[];
cleanParam: string | string[];
crawlDelay: number;
disallow: string | string[];
userAgent: | "*"
| "360Spider"
| "360Spider-Image"
| "360Spider-Video"
| "HaoSouSpider"
| "AdsBot-Google"
| "AdsBot-Google-Mobile"
| "AdsBot-Google-Mobile-Apps"
| "Googlebot"
| "Googlebot-Image"
| "Googlebot-Mobile"
| "Googlebot-News"
| "Googlebot-Video"
| "Mediapartners-Google"
| "adidxbot"
| "bingbot"
| "BingPreview"
| "MicrosoftPreview"
| "msnbot"
| "msnbot-media"
| "Applebot"
| "AppleNewsBot"
| "Baiduspider"
| "Baiduspider-image"
| "Baiduspider-mobile"
| "Baiduspider-news"
| "Baiduspider-video"
| "coccoc"
| "coccocbot-image"
| "coccocbot-web"
| "DuckDuckBot"
| "DuckDuckGo-Favicons-Bot"
| "facebookcatalog"
| "facebookexternalhit"
| "Facebot"
| "gooblog"
| "ichiro"
| "Sogou blog"
| "Sogou inst spider"
| "Sogou News Spider"
| "Sogou Orion spider"
| "Sogou spider2"
| "Sogou web spider"
| "Yandex"
| "YandexMobileBot"
| "Algolia Crawler"
| "BublupBot"
| "CCBot"
| "Cliqzbot"
| "Daumoa"
| "DeuSu"
| "EuripBot"
| "Exploratodo"
| "Feedly"
| "Findxbot"
| "istellabot"
| "JikeSpider"
| "Lycos"
| "Mail.Ru"
| "MojeekBot"
| "OrangeBot"
| "Pinterest"
| "Plukkie"
| "Qwantify"
| "Rambler"
| "SemanticScholarBot"
| "SeznamBot"
| "Sosospider"
| "Slurp"
| "Twitterbot"
| "WhatsApp"
| "yacybot"
| "YepBot"
| "Yeti"
| "YioopBot"
| "yoozBot"
| "YoudaoBot"
| (
| "*"
| "360Spider"
| "360Spider-Image"
| "360Spider-Video"
| "HaoSouSpider"
| "AdsBot-Google"
| "AdsBot-Google-Mobile"
| "AdsBot-Google-Mobile-Apps"
| "Googlebot"
| "Googlebot-Image"
| "Googlebot-Mobile"
| "Googlebot-News"
| "Googlebot-Video"
| "Mediapartners-Google"
| "adidxbot"
| "bingbot"
| "BingPreview"
| "MicrosoftPreview"
| "msnbot"
| "msnbot-media"
| "Applebot"
| "AppleNewsBot"
| "Baiduspider"
| "Baiduspider-image"
| "Baiduspider-mobile"
| "Baiduspider-news"
| "Baiduspider-video"
| "coccoc"
| "coccocbot-image"
| "coccocbot-web"
| "DuckDuckBot"
| "DuckDuckGo-Favicons-Bot"
| "facebookcatalog"
| "facebookexternalhit"
| "Facebot"
| "gooblog"
| "ichiro"
| "Sogou blog"
| "Sogou inst spider"
| "Sogou News Spider"
| "Sogou Orion spider"
| "Sogou spider2"
| "Sogou web spider"
| "Yandex"
| "YandexMobileBot"
| "Algolia Crawler"
| "BublupBot"
| "CCBot"
| "Cliqzbot"
| "Daumoa"
| "DeuSu"
| "EuripBot"
| "Exploratodo"
| "Feedly"
| "Findxbot"
| "istellabot"
| "JikeSpider"
| "Lycos"
| "Mail.Ru"
| "MojeekBot"
| "OrangeBot"
| "Pinterest"
| "Plukkie"
| "Qwantify"
| "Rambler"
| "SemanticScholarBot"
| "SeznamBot"
| "Sosospider"
| "Slurp"
| "Twitterbot"
| "WhatsApp"
| "yacybot"
| "YepBot"
| "Yeti"
| "YioopBot"
| "yoozBot"
| "YoudaoBot")[];
}[];

[ Optional ] List of policy rules.

policy:[
{
userAgent: "*",
allow: "/"
}
]

For more help, refer to SYNTAX^ by Yandex.

optional sitemap: string | boolean | string[];

[ Optional, zero or more per file ] The location of a sitemap for this website.

sitemap: [
"https://example.com/sitemap.xml",
"https://www.example.com/sitemap.xml"
]

The value of the SITEMAP^ field is case-sensitive.