Skip to content

[metadata validation] Empty 'title' metadata lead to improper article generationΒ #3566

@irrrlicht

Description

@irrrlicht
  • OS version and name: Arch Linux
  • Python version: 3.14.2
  • Pelican version: 4.11.0

Issue

if an article exists with an empty title metadata, then the development server doesn't server the '/' root properly and send the wrong content type. The generation creates a ".html" for the article.

Steps to reproduce

  1. Start a fresh project. Create a unique article (ReStructuredText or Markdown) with only two metadata: :title: (leave empty) and :date: 2026-02-09

  2. Launch the development server make serve and visit the local website

  3. Browser downloads or propose downloading the web page. The served page is the ".html".

Template of a non working article:

:title:
:date: 2026-02-09

Lorem ipsum is a dummy or placeholder text commonly used in graphic design, publishing, and web                 development. Its purpose is to permit a page layout to be designed, independently of the copy that will         subsequently populate it, or to demonstrate various fonts of a typeface without meaningful text that could      be distracting. More at "Wikipedia"

Expected behavior

My guess is that Pelican should raise an error if a file has an empty title metadata.

Fun fact: I've had the issue for a year and a half and only took time to do a git bisect today to find that I had a one year and a half old article with an empty title πŸ˜….

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions