Skip to content

Infra: Make Discussion-To optional in source, display from latest Post-History during build #5158

Open

Description

@hugovk

PEPs process streamlining thought:

  • Discussion-To is a URL
  • Post-History is a list of URLs and dates

Currently both are required, but authors often forget to add one.

Do we need really them both in the PEP source?

We could make Discussion-To optional, and if it's missing, take the last Post-History link and set that as Discussion-To in the rendered HTML.

No changes needed for the existing PEPs that already have Discussion-To.

Activity

  1. added
    infra
    on Oct 1, 2026
  2. vaibhavlord commented on Nov 24, 2026

    @vaibhavlord

    Hi, I’d like to work on this. When Discussions-To is absent from the PEP source, I’d have the HTML build generate it from the last linked entry in Post-History. An explicit Discussions-To would take precedence, and if Post-History has no links, the page would omit the field. I’d add tests for those three cases.

    Two details I’d like to confirm. If the last entry links to a specific Discourse reply, should the generated field use that exact URL or the topic URL? And should this PR also update the authoring guidance in PEPs 1 and 12?

  3. hugovk commented on Nov 24, 2026

    @hugovk
    MemberAuthor

    If the last entry links to a specific Discourse reply, should the generated field use that exact URL or the topic URL?

    Good question. Right now, Post-History can be a topic, or a post in a topic. But Discussions-To cannot be a post and must be the topic itself.

    Discussions-To is "where should I go with feedback?" So I'd say if the last Post-History is a post in a topic, then Discussions-To should use the topic itself.

    And should this PR also update the authoring guidance in PEPs 1 and 12?

    Yes, we can update them, but let's do an infra PR first and consider the PEPs afterwards.

  4. vaibhavlord commented on Nov 24, 2026

    @vaibhavlord

    Thanks, I’ll update the renderer to use the last Post-History link when Discussions-To is missing. If that link points to a Discourse reply, the generated link will go to the topic. I’ll include tests in the infra PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    infra

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions