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.

RouteModule

interfaz

Un módulo programático que aporta rutas explícitas en lugar de un árbol app/pages. Sus rutas declaran sus propios layouts.

ts
import type { RouteModule } from "@meekojs/meeko/build";

Source code src/framework/modules.ts:41

Declaración #

ts
interface RouteModule {
	readonly name: string
	routes(): readonly RouteRecord[] | Promise<readonly RouteRecord[]>
}

Example #

ts
import type { RouteModule } from "@meekojs/meeko/build";

const docs: RouteModule = {
  name: "docs",
  routes: () => [{ id: "/docs/[...slug]", file: "/srv/docs/Page.meeko", layouts: [] }],
};

Miembros #

name #

propiedad sólo lectura

readonly name: string

Identificador estable del módulo: minúsculas, dígitos y guiones.

routes #

método

routes(): readonly RouteRecord[] | Promise<readonly RouteRecord[]>

Devuelve las rutas del módulo.

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/framework/modules.ts