Skip to content
Meeko
Type to search the guides and the API reference. Open it from any page with / or Ctrl K; move with the arrow keys and open a result with Enter.
Get started

Contents

On this page

Not translated yet

This page has not been translated into English yet, so it is shown in Spanish.

SitemapEntriesContext

interfaz Since 1.7.0

Lo que recibe la función sitemapEntries de definePage. Se ejecuta durante meeko build, en el servidor de Node que prerenderiza las páginas, sin petición ni sesión.

ts
import type { SitemapEntriesContext } from "@meekojs/meeko/framework";

Source code src/shared/definitions/sitemap.ts:41

Declaración #

ts
interface SitemapEntriesContext {
	readonly env: Readonly<Record<string, string | undefined>>
	readonly prerendering: true
}

Example #

ts
import type { SitemapEntriesContext, SitemapEntry } from "@meekojs/meeko/framework";

async function entries({ env }: SitemapEntriesContext): Promise<SitemapEntry[]> {
  const slugs = env.DOCS_DRAFTS === "1" ? ["borrador"] : [];
  return slugs.map((slug) => ({ params: { slug } }));
}

Propiedades #

env #

propiedad sólo lectura

readonly env: Readonly<Record<string, string | undefined>>

Variables de entorno del proceso de meeko build (process.env).

prerendering #

propiedad sólo lectura

readonly prerendering: true

Siempre true: el runtime de server/runtime.ts se creó con prerendering, sin tráfico de clientes.

See also #

Was this page helpful?

Add a comment

It is sent when you choose “Yes” or “No”. Only the page, your answer and the comment are stored: no cookies and no personal data.

0 of 2000 characters

Edit on GitHub: packages/meeko/src/shared/definitions/sitemap.ts