trailingSlashForPath() — astro Function Reference
Architecture documentation for the trailingSlashForPath() function in create.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 1b408d2e_6c62_4027_ae00_57b93199c0e0["trailingSlashForPath()"] a7eed989_9f2b_5163_ecdf_85920a8b973f["create.ts"] 1b408d2e_6c62_4027_ae00_57b93199c0e0 -->|defined in| a7eed989_9f2b_5163_ecdf_85920a8b973f 769abfe3_0dff_1eda_a9cd_919cc8ae8621["createFileBasedRoutes()"] 769abfe3_0dff_1eda_a9cd_919cc8ae8621 -->|calls| 1b408d2e_6c62_4027_ae00_57b93199c0e0 45eeb620_478e_aa03_8346_e477fdcca943["createInjectedRoutes()"] 45eeb620_478e_aa03_8346_e477fdcca943 -->|calls| 1b408d2e_6c62_4027_ae00_57b93199c0e0 style 1b408d2e_6c62_4027_ae00_57b93199c0e0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/core/routing/manifest/create.ts lines 261–265
const trailingSlashForPath = (
pathname: string | null,
config: AstroConfig,
): AstroConfig['trailingSlash'] =>
pathname && hasFileExtension(pathname) ? 'never' : config.trailingSlash;
Domain
Subdomains
Source
Frequently Asked Questions
What does trailingSlashForPath() do?
trailingSlashForPath() is a function in the astro codebase, defined in packages/astro/src/core/routing/manifest/create.ts.
Where is trailingSlashForPath() defined?
trailingSlashForPath() is defined in packages/astro/src/core/routing/manifest/create.ts at line 261.
What calls trailingSlashForPath()?
trailingSlashForPath() is called by 2 function(s): createFileBasedRoutes, createInjectedRoutes.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free