Daniel Murillo
Index

Programming · October 12, 2026 · Daniel Murillo

Read articles from another service

The list and detail live at /api/posts. The body arrives as Markdown, not HTML.

The list omits the body so an index does not download every text:

GET /api/posts?lang=en
{
  "posts": [
    {
      "slug": "este-blog-vive-en-next",
      "title": "This blog runs on Next.js",
      "description": "Pages and the articles API come from the same project.",
      "author": "Daniel Murillo",
      "publishedAt": "2026-10-14",
      "lang": "en",
      "keywords": ["nextjs", "api", "blog"]
    }
  ]
}

The detail response includes content as Markdown:

GET /api/posts/leer-articulos-desde-otro-servicio?lang=en

If the slug is missing for that language, the response is 404 with { "error": "…" }. Reads allow CORS, so another site on another domain can fetch them directly.

Spanish original: /en/blog/read-articles-from-another-service. Same filename under content/posts/es/ and content/posts/en/.