From a618a794d928b532ab20c64dcd42da7f04f78791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Rodr=C3=ADguez?= Date: Sun, 8 Mar 2026 13:34:29 +0100 Subject: [PATCH] feat: added instructions to post --- .astro/astro/content.d.ts | 172 -------------------------------------- CONTRIBUTING.md | 26 +++++- 2 files changed, 25 insertions(+), 173 deletions(-) diff --git a/.astro/astro/content.d.ts b/.astro/astro/content.d.ts index 0abe462..e69de29 100644 --- a/.astro/astro/content.d.ts +++ b/.astro/astro/content.d.ts @@ -1,172 +0,0 @@ -declare module 'astro:content' { - interface Render { - '.mdx': Promise<{ - Content: import('astro').MarkdownInstance<{}>['Content']; - headings: import('astro').MarkdownHeading[]; - remarkPluginFrontmatter: Record; - }>; - } -} - -declare module 'astro:content' { - interface RenderResult { - Content: import('astro/runtime/server/index.js').AstroComponentFactory; - headings: import('astro').MarkdownHeading[]; - remarkPluginFrontmatter: Record; - } - interface Render { - '.md': Promise; - } - - export interface RenderedContent { - html: string; - metadata?: { - imagePaths: Array; - [key: string]: unknown; - }; - } -} - -declare module 'astro:content' { - type Flatten = T extends { [K: string]: infer U } ? U : never; - - export type CollectionKey = keyof AnyEntryMap; - export type CollectionEntry = Flatten; - - export type ContentCollectionKey = keyof ContentEntryMap; - export type DataCollectionKey = keyof DataEntryMap; - - type AllValuesOf = T extends any ? T[keyof T] : never; - type ValidContentEntrySlug = AllValuesOf< - ContentEntryMap[C] - >['slug']; - - /** @deprecated Use `getEntry` instead. */ - export function getEntryBySlug< - C extends keyof ContentEntryMap, - E extends ValidContentEntrySlug | (string & {}), - >( - collection: C, - // Note that this has to accept a regular string too, for SSR - entrySlug: E, - ): E extends ValidContentEntrySlug - ? Promise> - : Promise | undefined>; - - /** @deprecated Use `getEntry` instead. */ - export function getDataEntryById( - collection: C, - entryId: E, - ): Promise>; - - export function getCollection>( - collection: C, - filter?: (entry: CollectionEntry) => entry is E, - ): Promise; - export function getCollection( - collection: C, - filter?: (entry: CollectionEntry) => unknown, - ): Promise[]>; - - export function getEntry< - C extends keyof ContentEntryMap, - E extends ValidContentEntrySlug | (string & {}), - >(entry: { - collection: C; - slug: E; - }): E extends ValidContentEntrySlug - ? Promise> - : Promise | undefined>; - export function getEntry< - C extends keyof DataEntryMap, - E extends keyof DataEntryMap[C] | (string & {}), - >(entry: { - collection: C; - id: E; - }): E extends keyof DataEntryMap[C] - ? Promise - : Promise | undefined>; - export function getEntry< - C extends keyof ContentEntryMap, - E extends ValidContentEntrySlug | (string & {}), - >( - collection: C, - slug: E, - ): E extends ValidContentEntrySlug - ? Promise> - : Promise | undefined>; - export function getEntry< - C extends keyof DataEntryMap, - E extends keyof DataEntryMap[C] | (string & {}), - >( - collection: C, - id: E, - ): E extends keyof DataEntryMap[C] - ? Promise - : Promise | undefined>; - - /** Resolve an array of entry references from the same collection */ - export function getEntries( - entries: { - collection: C; - slug: ValidContentEntrySlug; - }[], - ): Promise[]>; - export function getEntries( - entries: { - collection: C; - id: keyof DataEntryMap[C]; - }[], - ): Promise[]>; - - export function render( - entry: AnyEntryMap[C][string], - ): Promise; - - export function reference( - collection: C, - ): import('astro/zod').ZodEffects< - import('astro/zod').ZodString, - C extends keyof ContentEntryMap - ? { - collection: C; - slug: ValidContentEntrySlug; - } - : { - collection: C; - id: keyof DataEntryMap[C]; - } - >; - // Allow generic `string` to avoid excessive type errors in the config - // if `dev` is not running to update as you edit. - // Invalid collection names will be caught at build time. - export function reference( - collection: C, - ): import('astro/zod').ZodEffects; - - type ReturnTypeOrOriginal = T extends (...args: any[]) => infer R ? R : T; - type InferEntrySchema = import('astro/zod').infer< - ReturnTypeOrOriginal['schema']> - >; - - type ContentEntryMap = { - "post": { -"get-started-website-with-astro-tailwind-css.md": { - id: "get-started-website-with-astro-tailwind-css.md"; - slug: "get-started-website-with-astro-tailwind-css"; - body: string; - collection: "post"; - data: InferEntrySchema<"post"> -} & { render(): Render[".md"] }; -}; - - }; - - type DataEntryMap = { - - }; - - type AnyEntryMap = ContentEntryMap & DataEntryMap; - - export type ContentConfig = typeof import("../../src/content/config.js"); -} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 15fe7c4..35e5625 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,4 +50,28 @@ Si no te es suficiente con nuestro ejemplo te recomendamos los siguientes tutori 1. Crea un Issue explicando cual es el fallo. 2. Espera que alguien te responda. 3. Nadie te responde, procede a arreglarlo tu mismo :) - 1. Para indicar que una PR esta resolviendo una issue se puede indicar en los commits o el mensaje de la PR añadiendo el texto `fix #`, así cuando la PR se incorpore a la rama principal la issue se cerrará de manera automática. \ No newline at end of file + 1. Para indicar que una PR esta resolviendo una issue se puede indicar en los commits o el mensaje de la PR añadiendo el texto `fix #`, así cuando la PR se incorpore a la rama principal la issue se cerrará de manera automática. + +## ¿Quieres aportar con una entrada en nuestro blog? +Los posts se agregan en un fichero markdown. +El nombre del fichero no debe contener espacios, se utilizan guiones ("-") para sustituirlos y la extensión debe ser "md". La ruta para la subida debe ser: `src/content/post`. + +En la parte superior del fichero debes introducir la siguiente cabecera: + +```markdown +--- +publishDate: 2024-05-10T12:00:00Z +title: 'Escribe aquí el título de tu artículo' +excerpt: 'Escribe un breve resumen de 1 o 2 líneas sobre lo que trata el post. Esto aparecerá en la página principal.' +image: '~/assets/images/nombre-de-tu-imagen.png' +category: 'Tutoriales' +tags: + - web + - ctf + - inyeccion-sql +author: 'Tu Nombre o Nickname' +--- + +# Aquí empieza el contenido de tu artículo usando Markdown normal... +``` +Es importante que agregues en `src/assets/images/` una imagen para tu post. \ No newline at end of file