lib/routeMap
Variables
'Read the “', Variables, '” section'StudioCMSRoutes
'Read the “', StudioCMSRoutes, '” section'const StudioCMSRoutes: { authLinks: { auth0Callback: string; auth0Index: string; discordCallback: string; discordIndex: string; githubCallback: string; githubIndex: string; googleCallback: string; googleIndex: string; loginAPI: string; loginURL: string; logoutAPI: string; logoutURL: string; registerAPI: string; signupURL: string; }; endpointLinks: { apiTokens: string; config: string; content: { folder: string; page: string; }; createResetLink: string; newUsers: { create: string; invite: string; }; partials: { editor: string; livePreviewBox: string; render: string; userListItems: string; }; plugins: string; profile: string; resetPassword: string; searchList: string; users: string; verifySession: string; }; fts: { step1: string; step2: string; }; mainLinks: { baseSiteURL: string; contentManagement: string; contentManagementCreate: string; contentManagementDiff: string; contentManagementEdit: string; contentManagementFolderCreate: string; contentManagementFolderEdit: string; createPage: string; dashboardIndex: string; plugins: string; siteConfiguration: string; userManagement: string; userManagementEdit: string; userProfile: string; }; sdk: { fallback_pages: string; pages: string; updateLatestVersionCache: string; };};
Defined in: studiocms/packages/studiocms/src/lib/routeMap.ts:91
An object containing various route mappings for the StudioCMS application.
Type declaration
'Read the “', Type declaration, '” section'authLinks
'Read the “', authLinks, '” section'authLinks: { auth0Callback: string; auth0Index: string; discordCallback: string; discordIndex: string; githubCallback: string; githubIndex: string; googleCallback: string; googleIndex: string; loginAPI: string; loginURL: string; logoutAPI: string; logoutURL: string; registerAPI: string; signupURL: string;};
authLinks.auth0Callback
'Read the “', authLinks.auth0Callback, '” section'auth0Callback: string;
API route for Auth0 authentication callback.
authLinks.auth0Index
'Read the “', authLinks.auth0Index, '” section'auth0Index: string;
API route for Auth0 authentication index.
authLinks.discordCallback
'Read the “', authLinks.discordCallback, '” section'discordCallback: string;
API route for Discord authentication callback.
authLinks.discordIndex
'Read the “', authLinks.discordIndex, '” section'discordIndex: string;
API route for Discord authentication index.
authLinks.githubCallback
'Read the “', authLinks.githubCallback, '” section'githubCallback: string;
API route for GitHub authentication callback.
authLinks.githubIndex
'Read the “', authLinks.githubIndex, '” section'githubIndex: string;
API route for GitHub authentication index.
authLinks.googleCallback
'Read the “', authLinks.googleCallback, '” section'googleCallback: string;
API route for Google authentication callback.
authLinks.googleIndex
'Read the “', authLinks.googleIndex, '” section'googleIndex: string;
API route for Google authentication index.
authLinks.loginAPI
'Read the “', authLinks.loginAPI, '” section'loginAPI: string;
API route for logging in.
authLinks.loginURL
'Read the “', authLinks.loginURL, '” section'loginURL: string;
URL for the login page.
authLinks.logoutAPI
'Read the “', authLinks.logoutAPI, '” section'logoutAPI: string;
API route for logging out.
authLinks.logoutURL
'Read the “', authLinks.logoutURL, '” section'logoutURL: string;
URL for the logout page.
authLinks.registerAPI
'Read the “', authLinks.registerAPI, '” section'registerAPI: string;
API route for registering a new user.
authLinks.signupURL
'Read the “', authLinks.signupURL, '” section'signupURL: string;
URL for the signup page.
endpointLinks
'Read the “', endpointLinks, '” section'endpointLinks: { apiTokens: string; config: string; content: { folder: string; page: string; }; createResetLink: string; newUsers: { create: string; invite: string; }; partials: { editor: string; livePreviewBox: string; render: string; userListItems: string; }; plugins: string; profile: string; resetPassword: string; searchList: string; users: string; verifySession: string;};
endpointLinks.apiTokens
'Read the “', endpointLinks.apiTokens, '” section'apiTokens: string;
API route for fetching API tokens.
endpointLinks.config
'Read the “', endpointLinks.config, '” section'config: string;
API route for fetching configuration.
endpointLinks.content
'Read the “', endpointLinks.content, '” section'content: { folder: string; page: string;};
endpointLinks.content.folder
'Read the “', endpointLinks.content.folder, '” section'folder: string;
API route for fetching folder content.
endpointLinks.content.page
'Read the “', endpointLinks.content.page, '” section'page: string;
API route for fetching page content.
endpointLinks.createResetLink
'Read the “', endpointLinks.createResetLink, '” section'createResetLink: string;
API route for creating a password reset link.
endpointLinks.newUsers
'Read the “', endpointLinks.newUsers, '” section'newUsers: { create: string; invite: string;};
endpointLinks.newUsers.create
'Read the “', endpointLinks.newUsers.create, '” section'create: string;
API route for creating a new user.
endpointLinks.newUsers.invite
'Read the “', endpointLinks.newUsers.invite, '” section'invite: string;
API route for inviting a new user.
endpointLinks.partials
'Read the “', endpointLinks.partials, '” section'partials: { editor: string; livePreviewBox: string; render: string; userListItems: string;};
endpointLinks.partials.editor
'Read the “', endpointLinks.partials.editor, '” section'editor: string;
API route for the editor.
endpointLinks.partials.livePreviewBox
'Read the “', endpointLinks.partials.livePreviewBox, '” section'livePreviewBox: string;
API route for live preview box rendering.
endpointLinks.partials.render
'Read the “', endpointLinks.partials.render, '” section'render: string;
API route for rendering content.
endpointLinks.partials.userListItems
'Read the “', endpointLinks.partials.userListItems, '” section'userListItems: string;
API route for fetching user list items.
endpointLinks.plugins
'Read the “', endpointLinks.plugins, '” section'plugins: string;
API route for fetching plugins.
endpointLinks.profile
'Read the “', endpointLinks.profile, '” section'profile: string;
API route for fetching user profile.
endpointLinks.resetPassword
'Read the “', endpointLinks.resetPassword, '” section'resetPassword: string;
API route for resetting password.
endpointLinks.searchList
'Read the “', endpointLinks.searchList, '” section'searchList: string;
API route for searching lists.
endpointLinks.users
'Read the “', endpointLinks.users, '” section'users: string;
API route for fetching users.
endpointLinks.verifySession
'Read the “', endpointLinks.verifySession, '” section'verifySession: string;
API route for verifying a user session.
fts: { step1: string; step2: string;};
fts.step1
'Read the “', fts.step1, '” section'step1: string;
API route for step 1 of the FTS process.
fts.step2
'Read the “', fts.step2, '” section'step2: string;
API route for step 2 of the FTS process.
mainLinks
'Read the “', mainLinks, '” section'mainLinks: { baseSiteURL: string; contentManagement: string; contentManagementCreate: string; contentManagementDiff: string; contentManagementEdit: string; contentManagementFolderCreate: string; contentManagementFolderEdit: string; createPage: string; dashboardIndex: string; plugins: string; siteConfiguration: string; userManagement: string; userManagementEdit: string; userProfile: string;};
mainLinks.baseSiteURL
'Read the “', mainLinks.baseSiteURL, '” section'baseSiteURL: string;
Base URL for the non-dashboard site.
mainLinks.contentManagement
'Read the “', mainLinks.contentManagement, '” section'contentManagement: string;
URL for the content management page.
mainLinks.contentManagementCreate
'Read the “', mainLinks.contentManagementCreate, '” section'contentManagementCreate: string;
URL for creating content in the content management page.
mainLinks.contentManagementDiff
'Read the “', mainLinks.contentManagementDiff, '” section'contentManagementDiff: string;
URL for viewing content differences in the content management page.
mainLinks.contentManagementEdit
'Read the “', mainLinks.contentManagementEdit, '” section'contentManagementEdit: string;
URL for editing content in the content management page.
mainLinks.contentManagementFolderCreate
'Read the “', mainLinks.contentManagementFolderCreate, '” section'contentManagementFolderCreate: string;
URL for creating a folder in the content management page.
mainLinks.contentManagementFolderEdit
'Read the “', mainLinks.contentManagementFolderEdit, '” section'contentManagementFolderEdit: string;
URL for editing a folder in the content management page.
mainLinks.createPage
'Read the “', mainLinks.createPage, '” section'createPage: string;
URL for creating a new page.
mainLinks.dashboardIndex
'Read the “', mainLinks.dashboardIndex, '” section'dashboardIndex: string;
URL for the dashboard index.
mainLinks.plugins
'Read the “', mainLinks.plugins, '” section'plugins: string;
URL for the plugins page.
mainLinks.siteConfiguration
'Read the “', mainLinks.siteConfiguration, '” section'siteConfiguration: string;
URL for the site configuration page.
mainLinks.userManagement
'Read the “', mainLinks.userManagement, '” section'userManagement: string;
URL for the user management page.
mainLinks.userManagementEdit
'Read the “', mainLinks.userManagementEdit, '” section'userManagementEdit: string;
URL for editing user management details.
mainLinks.userProfile
'Read the “', mainLinks.userProfile, '” section'userProfile: string;
URL for the user profile page.
sdk: { fallback_pages: string; pages: string; updateLatestVersionCache: string;};
sdk.fallback_pages
'Read the “', sdk.fallback_pages, '” section'fallback_pages: string;
SDK route for fetching fallback list of pages.
sdk.pages
'Read the “', sdk.pages, '” section'pages: string;
SDK route for listing pages.
sdk.updateLatestVersionCache
'Read the “', sdk.updateLatestVersionCache, '” section'updateLatestVersionCache: string;
SDK route for updating the latest version cache.
Functions
'Read the “', Functions, '” section'getDeleteRoute()
'Read the “', getDeleteRoute(), '” section'function getDeleteRoute(slug: string): string
Defined in: studiocms/packages/studiocms/src/lib/routeMap.ts:34
Generates a delete route for a given page slug.
Parameters
'Read the “', Parameters, '” section'string
The slug of the page to be deleted.
string
The complete delete route for the specified page.
getEditRoute()
'Read the “', getEditRoute(), '” section'function getEditRoute(slug: string): string
Defined in: studiocms/packages/studiocms/src/lib/routeMap.ts:24
Generates the edit route for a given page slug.
Parameters
'Read the “', Parameters, '” section'string
The slug of the page to generate the edit route for.
string
The edit route as a string.
getSluggedRoute()
'Read the “', getSluggedRoute(), '” section'function getSluggedRoute(url: string, slug: string): string
Defined in: studiocms/packages/studiocms/src/lib/routeMap.ts:14
Generates a slugged route by appending the provided slug to the given URL.
Parameters
'Read the “', Parameters, '” section'string
The base URL to which the slug will be appended.
string
The slug to append to the base URL.
string
The complete slugged route as a string.
makeDashboardRoute()
'Read the “', makeDashboardRoute(), '” section'function makeDashboardRoute(route?: string): string
Defined in: studiocms/packages/studiocms/src/lib/routeMap.ts:54
Generates a URL for the dashboard route.
Parameters
'Read the “', Parameters, '” section'string
An optional string representing the specific route to append to the dashboard URL.
string
The generated dashboard URL as a string.
makeNonDashboardRoute()
'Read the “', makeNonDashboardRoute(), '” section'function makeNonDashboardRoute(route?: string): string
Defined in: studiocms/packages/studiocms/src/lib/routeMap.ts:44
Generates a non-dashboard route URL.
Parameters
'Read the “', Parameters, '” section'string
The optional route string to be appended. If not provided, a default route will be used.
string
The generated non-dashboard route URL as a string.