Skip to content

blog-pages.ts#

View Markdown

Source

4 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.

4 symbols 2 functions 1 interfaces 1 modules 12 parameters 5 members 2 returns

Reference#

fnappendBlogPages(input: { generatedPages: Array<{ inputPath: string; outputPath: string; html: string }>; listedPages: readonly BlogSourcePage[]; options?: ResolvedBlogOptions; collections?: ResolvedCollectionsOptions; srcDir: string; outDir: string; base: string; render: (page: BlogGeneratedPage) => Promise<string>; errors: string[]; feedNetwork?: BlogFeedNetwork; }): Promise<void>Renders index, tag, and archive pages and appends them to the build.

Renders index, tag, and archive pages and appends them to the build.

Signature

export async function appendBlogPages(input: {
  generatedPages: Array<{ inputPath: string; outputPath: string; html: string }>;
  listedPages: readonly BlogSourcePage[];
  options?: ResolvedBlogOptions;
  collections?: ResolvedCollectionsOptions;
  srcDir: string;
  outDir: string;
  base: string;
  render: (page: BlogGeneratedPage) => Promise<string>;
  errors: string[];
  feedNetwork?: BlogFeedNetwork;
}): Promise<void>

View source

Parameters

  • input { generatedPages: Array<{ inputPath: string; outputPath: string; html: string }>; listedPages: readonly BlogSourcePage[]; options?: ResolvedBlogOptions; collections?: ResolvedCollectionsOptions; srcDir: string; outDir: string; base: string; render: (page: BlogGeneratedPage) => Promise<string>; errors: string[]; feedNetwork?: BlogFeedNetwork }
  • input.generatedPages Array<{ inputPath: string; outputPath: string; html: string }>
  • input.listedPages readonly BlogSourcePage[]
  • input.options? ResolvedBlogOptions

    optional

  • input.collections? ResolvedCollectionsOptions

    optional

  • input.srcDir string
  • input.outDir string
  • input.base string
  • input.render (page: BlogGeneratedPage) => Promise<string>
  • input.errors string[]
  • input.feedNetwork? BlogFeedNetwork

    optional

Returns

Promise<void>
moduleblog-pagesGenerated blog index, tag, and archive pages.

Generated blog index, tag, and archive pages.

View source

interfaceBlogGeneratedPageSynthetic page passed back to generateHtmlPage.

Synthetic page passed back to generateHtmlPage.

Signature

export interface BlogGeneratedPage

View source

Members

Properties
NameTypeDescription
content string
href string
outputPath string
title string
urlPath string
fntoBlogProcessResult(page: BlogGeneratedPage): { inputPath: string; routePaths: { outputPath: string; urlPath: string; href: string; ogImagePath: string; ogImageUrl: string; }; transformedHtml: string; title: string; frontmatter: Record<string, unknown>; toc: []; }Maps a generated blog page onto the SSG render shape.

Maps a generated blog page onto the SSG render shape.

Signature

export function toBlogProcessResult(page: BlogGeneratedPage): {
  inputPath: string;
  routePaths: {
    outputPath: string;
    urlPath: string;
    href: string;
    ogImagePath: string;
    ogImageUrl: string;
  };
  transformedHtml: string;
  title: string;
  frontmatter: Record<string, unknown>;
  toc: [];
}

View source

Parameters

Returns

object
frontmatter
frontmatter: Record<string, unknown>;
inputPath
inputPath: string;
routePaths
routePaths: { outputPath: string; urlPath: string; href: string; ogImagePath: string; ogImageUrl: string };
title
title: string;
toc
toc: [];
transformedHtml
transformedHtml: string;