consts
Esta página aún no está disponible en tu idioma.
Type Aliases
Section titled “Type Aliases”CurrentRESTAPIVersions
Section titled “CurrentRESTAPIVersions”type CurrentRESTAPIVersions = typeof currentRESTAPIVersions[number];
Defined in: studiocms/packages/studiocms/src/consts.ts:49^
Current REST API Versions Type
StudioCMSSocials
Section titled “StudioCMSSocials”type StudioCMSSocials = { discord: string; github: string; githubContributors: string; githubLicense: string;};
Defined in: studiocms/packages/studiocms/src/consts.ts:104^
StudioCMS Social Links Type
Properties
Section titled “Properties”discord
Section titled “discord”discord: string;
Defined in: studiocms/packages/studiocms/src/consts.ts:108^
github
Section titled “github”github: string;
Defined in: studiocms/packages/studiocms/src/consts.ts:105^
githubContributors
Section titled “githubContributors”githubContributors: string;
Defined in: studiocms/packages/studiocms/src/consts.ts:107^
githubLicense
Section titled “githubLicense”githubLicense: string;
Defined in: studiocms/packages/studiocms/src/consts.ts:106^
Variables
Section titled “Variables”AstroConfigImageSettings
Section titled “AstroConfigImageSettings”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.
Remarks
Section titled “Remarks”This is a partial type of AstroConfig['image']
, so it can be merged with other image settings.
Example
Section titled “Example”// Usage in Astro configimport { AstroConfigImageSettings } from './consts';export default { image: { ...AstroConfigImageSettings, // other image settings }}
AstroConfigViteSettings
Section titled “AstroConfigViteSettings”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.
Remarks
Section titled “Remarks”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^
authAPIRoute()
Section titled “authAPIRoute()”const authAPIRoute: (route: string) => string;
Defined in: studiocms/packages/studiocms/src/consts.ts:156^
Creates a standardized API route path for authentication-related endpoints.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
A function that constructs the full API route path for authentication.
CMSMailerConfigId
Section titled “CMSMailerConfigId”const CMSMailerConfigId: string = '1';
Defined in: studiocms/packages/studiocms/src/consts.ts:14^
StudioCMS Mailer Config Table Entry ID
CMSNotificationSettingsId
Section titled “CMSNotificationSettingsId”const CMSNotificationSettingsId: string = '1';
Defined in: studiocms/packages/studiocms/src/consts.ts:19^
StudioCMS Notification Settings Table Entry ID
CMSSiteConfigId
Section titled “CMSSiteConfigId”const CMSSiteConfigId: number = 1;
Defined in: studiocms/packages/studiocms/src/consts.ts:9^
StudioCMS Site Config Table Entry ID
currentRESTAPIVersions
Section titled “currentRESTAPIVersions”const currentRESTAPIVersions: readonly ["v1"];
Defined in: studiocms/packages/studiocms/src/consts.ts:44^
Current REST API Versions
dashboardAPIRoute()
Section titled “dashboardAPIRoute()”const dashboardAPIRoute: (route: string) => string;
Defined in: studiocms/packages/studiocms/src/consts.ts:149^
Creates a standardized API route path for the dashboard.
Parameters
Section titled “Parameters”string
Optional additional path to append to the base dashboard API route.
Returns
Section titled “Returns”string
A function that constructs the full API route path.
defaultCacheLifeTime
Section titled “defaultCacheLifeTime”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.
GhostUserDefaults
Section titled “GhostUserDefaults”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.
Type declaration
Section titled “Type declaration”avatar
Section titled “avatar”avatar: string = 'https://seccdn.libravatar.org/static/img/mm/80.png';
id: string = '_StudioCMS_Ghost_User_';
name: string = 'Ghost (deleted user)';
username
Section titled “username”username: string = 'studiocms_ghost_user';
NotificationSettingsDefaults
Section titled “NotificationSettingsDefaults”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.
Type declaration
Section titled “Type declaration”emailVerification
Section titled “emailVerification”emailVerification: boolean = false;
id: string = CMSNotificationSettingsId;
oAuthBypassVerification
Section titled “oAuthBypassVerification”oAuthBypassVerification: boolean = false;
requireAdminVerification
Section titled “requireAdminVerification”requireAdminVerification: boolean = false;
requireEditorVerification
Section titled “requireEditorVerification”requireEditorVerification: boolean = false;
routesDir
Section titled “routesDir”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
Type declaration
Section titled “Type declaration”api: (file: string) => string;
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
authAPI()
Section titled “authAPI()”authAPI: (file: string) => string;
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
authPage()
Section titled “authPage()”authPage: (file: string) => string;
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
dashApi()
Section titled “dashApi()”dashApi: (file: string) => string;
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
dashRoute()
Section titled “dashRoute()”dashRoute: (file: string) => string;
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
errors()
Section titled “errors()”errors: (file: string) => string;
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
fts: (file: string) => string;
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
mailer()
Section titled “mailer()”mailer: (file: string) => string;
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
middleware()
Section titled “middleware()”middleware: (file: string) => string;
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
sdk: (file: string) => string;
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
v1Rest()
Section titled “v1Rest()”v1Rest: (file: string) => string;
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
STUDIOCMS_EDITOR_CSRF_COOKIE_NAME
Section titled “STUDIOCMS_EDITOR_CSRF_COOKIE_NAME”const STUDIOCMS_EDITOR_CSRF_COOKIE_NAME: "studiocms-editor-csrf-token" = 'studiocms-editor-csrf-token';
Defined in: studiocms/packages/studiocms/src/consts.ts:277^
StudioCMSMarkdownDefaults
Section titled “StudioCMSMarkdownDefaults”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.
Type declaration
Section titled “Type declaration”autoLinkHeadings
Section titled “autoLinkHeadings”autoLinkHeadings: boolean = false;
callouts
Section titled “callouts”callouts: false;
discordSubtext
Section titled “discordSubtext”discordSubtext: boolean = false;
flavor
Section titled “flavor”flavor: "studiocms";
studioCMSSocials
Section titled “studioCMSSocials”const studioCMSSocials: StudioCMSSocials;
Defined in: studiocms/packages/studiocms/src/consts.ts:114^
StudioCMS Social Links
versionCacheLifetime
Section titled “versionCacheLifetime”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.
Functions
Section titled “Functions”makeDashboardRoute()
Section titled “makeDashboardRoute()”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.
Parameters
Section titled “Parameters”route?
Section titled “route?”string
Returns
Section titled “Returns”Function
A function that constructs the full API route path for the SDK.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
StudioCMSDefaultRobotsConfig()
Section titled “StudioCMSDefaultRobotsConfig()”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.
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”config
Section titled “config”AstroConfig
dashboardRoute
Section titled “dashboardRoute”(path
: string
) => string
sitemapEnabled
Section titled “sitemapEnabled”boolean
Returns
Section titled “Returns”{ 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;
Default
Section titled “Default”false
Description
Section titled “Description”[ Optional ] Some crawlers(Yandex) support and only accept domain names.
Example
Section titled “Example”integrations:[ robots({ host: siteUrl.replace(/^https?://|:\d+/g, "") })]
policy?
Section titled “policy?”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")[]; }[];
Description
Section titled “Description”[ Optional ] List of policy
rules.
Default
Section titled “Default”policy:[ { userAgent: "*", allow: "/" }]
For more help, refer to SYNTAX^ by Yandex.
sitemap?
Section titled “sitemap?”optional sitemap: string | boolean | string[];
Description
Section titled “Description”[ Optional, zero or more per file ] The location of a sitemap for this website.
Example
Section titled “Example”sitemap: [ "https://example.com/sitemap.xml", "https://www.example.com/sitemap.xml"]
The value of the SITEMAP^ field is case-sensitive.