ZH
测试版翻译

@core / contracts

1.0.0 ▾
已验证MIT
GitHub

GenPM 模块共享类型:内容、站点地图、搜索、后台资源、支付和追踪事件

代码10 个文件上下文约 532 个 token扫描通过

应用 .genpmignore 后将被注入的确切目录树。固定于

src/lib/contracts/sitemap.ts只读 · 7266529
// Fuente de URLs para sitemap.xml: la implementan content, blog, catalog…; la consume @core/seo.

export type SitemapUrl = {
  /** Ruta absoluta del sitio (`/blog/hola`) o URL completa. */
  loc: string;
  lastmod?: Date;
  /** Versiones en otros idiomas: locale BCP 47 → ruta o URL (genera `hreflang`). */
  alternates?: Record<string, string>;
  changefreq?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
  /** 0.0–1.0 */
  priority?: number;
};

export type SitemapSource = {
  /** Nombre único de la fuente (`pages`, `blog`, `products`); da nombre a su trozo del índice. */
  name: string;
  urls(): AsyncIterable<SitemapUrl>;
};

export const defineSitemapSource = (source: SitemapSource): SitemapSource => source;

举报 @core/contracts

使用 GitHub 登录后才能举报包。