apply-permalinks.ts#
5 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.
5
symbols
3
functions
1
interfaces
1
modules
15
parameters
3
members
3
returns
Reference#
moduleapply-permalinksApplies resolved permalinks / cascade to SSG pages and collection entries.
Applies resolved permalinks / cascade to SSG pages and collection entries.
fnapplyCollectionRoutes(manifest: CollectionManifest, permalinks?: ResolvedPermalinksOptions | null, cascade?: ResolvedCascadeOptions | null): { manifest: CollectionManifest; errors: string[] }Rewrites collection path / stem / inherited frontmatter.
Rewrites collection path / stem / inherited frontmatter.
Signature
export function applyCollectionRoutes(manifest: CollectionManifest, permalinks?: ResolvedPermalinksOptions | null, cascade?: ResolvedCascadeOptions | null): { manifest: CollectionManifest; errors: string[] }Parameters
-
manifestCollectionManifest -
permalinksResolvedPermalinksOptions | nulloptional
-
cascadeResolvedCascadeOptions | nulloptional
Returns
object
errors
errors: string[];
manifest
manifest: CollectionManifest;
fnapplySsgPageRoutes(input: { pages: readonly SsgRoutablePage[]; permalinks?: ResolvedPermalinksOptions | null; cascade?: ResolvedCascadeOptions | null; srcDir: string; outDir: string; base: string; extension: string; siteUrl?: string; }): { pages: SsgRoutablePage[]; errors: string[] }Rewrites SSG routePaths from resolved permalinks / slugs.
Rewrites SSG routePaths from resolved permalinks / slugs.
Signature
export function applySsgPageRoutes(input: {
pages: readonly SsgRoutablePage[];
permalinks?: ResolvedPermalinksOptions | null;
cascade?: ResolvedCascadeOptions | null;
srcDir: string;
outDir: string;
base: string;
extension: string;
siteUrl?: string;
}): { pages: SsgRoutablePage[]; errors: string[] }Parameters
-
input{ pages: readonly SsgRoutablePage[]; permalinks?: ResolvedPermalinksOptions | null; cascade?: ResolvedCascadeOptions | null; srcDir: string; outDir: string; base: string; extension: string; siteUrl?: string } -
input.pagesreadonly SsgRoutablePage[] -
input.permalinks?ResolvedPermalinksOptions | nulloptional
-
input.cascade?ResolvedCascadeOptions | nulloptional
-
input.srcDirstring -
input.outDirstring -
input.basestring -
input.extensionstring -
input.siteUrl?stringoptional
Returns
object
errors
errors: string[];
pages
pages: SsgRoutablePage[];
interfaceSsgRoutablePageSSG page shape that can have its routePaths rewritten.
SSG page shape that can have its routePaths rewritten.
Signature
export interface SsgRoutablePageMembers
Properties
| Name | Type | Description |
|---|---|---|
frontmatter |
Record<string, unknown> |
|
inputPath |
string |
|
routePaths |
{ outputPath: string; urlPath: string; href: string; ogImagePath: string; ogImageUrl: string } |