Skip to content

Static front page produces invalid .md URL (e.g. example.com.md) #5

@TBarregren

Description

@TBarregren

When a static page is configured as the front page (Settings → Reading), the plugin generates an invalid markdown alternate URL.

get_permalink() returns the site root (e.g. https://example.com/). After rtrim('/') and appending .md, the result is https://example.com.md — which is not a valid URL but looks like a .md TLD.

This affects:

  • The <link rel="alternate"> tag in AlternateLinkHandler::output_alternate_link()
  • The Accept header redirect in RewriteHandler::handle_accept_negotiation()
  • URL routing in RewriteHandler::parse_markdown_url() (no way to route back to the front page)

Expected: A working URL like https://example.com/index.md

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