addRouteBase() — astro Function Reference
Architecture documentation for the addRouteBase() function in paginate.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 73cddf52_8aeb_3fa6_3361_83a4fd875695["addRouteBase()"] f9b241f0_1a09_8ec8_0d08_713d9b433a71["paginate.ts"] 73cddf52_8aeb_3fa6_3361_83a4fd875695 -->|defined in| f9b241f0_1a09_8ec8_0d08_713d9b433a71 0d54d570_dd0a_6e46_45ab_7452db08790f["generatePaginateFunction()"] 0d54d570_dd0a_6e46_45ab_7452db08790f -->|calls| 73cddf52_8aeb_3fa6_3361_83a4fd875695 style 73cddf52_8aeb_3fa6_3361_83a4fd875695 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/core/render/paginate.ts lines 101–108
function addRouteBase(route: string, base: AstroConfig['base']) {
// `routeMatch.generate` avoids appending `/`
// unless `trailingSlash: 'always'` is configured.
// This means an empty string is possible for the index route.
let routeWithBase = joinPaths(base, route);
if (routeWithBase === '') routeWithBase = '/';
return routeWithBase;
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does addRouteBase() do?
addRouteBase() is a function in the astro codebase, defined in packages/astro/src/core/render/paginate.ts.
Where is addRouteBase() defined?
addRouteBase() is defined in packages/astro/src/core/render/paginate.ts at line 101.
What calls addRouteBase()?
addRouteBase() is called by 1 function(s): generatePaginateFunction.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free