lib/pathGenerators
Esta página aún no está disponible en tu idioma.
Functions
'Read the “', Functions, '” section'ensureHtmlExtension()
'Read the “', ensureHtmlExtension(), '” section'function ensureHtmlExtension(path: string): string
Defined in: studiocms/packages/studiocms/src/lib/pathGenerators.ts:65
Add ‘.html’ extension to a path.
Parameters
'Read the “', Parameters, '” section'string
string
ensureLeadingAndTrailingSlashes()
'Read the “', ensureLeadingAndTrailingSlashes(), '” section'function ensureLeadingAndTrailingSlashes(href: string): string
Defined in: studiocms/packages/studiocms/src/lib/pathGenerators.ts:29
Ensure the passed path starts and ends with slashes.
Parameters
'Read the “', Parameters, '” section'string
string
ensureLeadingSlash()
'Read the “', ensureLeadingSlash(), '” section'function ensureLeadingSlash(href: string): string
Defined in: studiocms/packages/studiocms/src/lib/pathGenerators.ts:15
Ensure the passed path starts with a leading slash.
Parameters
'Read the “', Parameters, '” section'string
string
ensureTrailingSlash()
'Read the “', ensureTrailingSlash(), '” section'function ensureTrailingSlash(href: string): string
Defined in: studiocms/packages/studiocms/src/lib/pathGenerators.ts:22
Ensure the passed path ends with a trailing slash.
Parameters
'Read the “', Parameters, '” section'string
string
fileWithBase()
'Read the “', fileWithBase(), '” section'function fileWithBase(path: string): string
Defined in: studiocms/packages/studiocms/src/lib/pathGenerators.ts:9
Get the a root-relative file URL path with the site’s base
prefixed.
Parameters
'Read the “', Parameters, '” section'string
string
pathWithBase()
'Read the “', pathWithBase(), '” section'function pathWithBase(path: string): string
Defined in: studiocms/packages/studiocms/src/lib/pathGenerators.ts:2
Get the a root-relative URL path with the site’s base
prefixed.
Parameters
'Read the “', Parameters, '” section'string
string
stripHtmlExtension()
'Read the “', stripHtmlExtension(), '” section'function stripHtmlExtension(path: string): string
Defined in: studiocms/packages/studiocms/src/lib/pathGenerators.ts:59
Remove the extension from a path.
Parameters
'Read the “', Parameters, '” section'string
string
stripLeadingAndTrailingSlashes()
'Read the “', stripLeadingAndTrailingSlashes(), '” section'function stripLeadingAndTrailingSlashes(href: string): string
Defined in: studiocms/packages/studiocms/src/lib/pathGenerators.ts:51
Ensure the passed path does not start and end with slashes.
Parameters
'Read the “', Parameters, '” section'string
string
stripLeadingSlash()
'Read the “', stripLeadingSlash(), '” section'function stripLeadingSlash(href: string): string
Defined in: studiocms/packages/studiocms/src/lib/pathGenerators.ts:37
Ensure the passed path does not start with a leading slash.
Parameters
'Read the “', Parameters, '” section'string
string
stripTrailingSlash()
'Read the “', stripTrailingSlash(), '” section'function stripTrailingSlash(href: string): string
Defined in: studiocms/packages/studiocms/src/lib/pathGenerators.ts:44
Ensure the passed path does not end with a trailing slash.
Parameters
'Read the “', Parameters, '” section'string
string