Skip to content

[Feature]: Detect and surface official .md versions of pages #77

Description

@miguelcorderocollar

Feature Category

User Interface (popup, options page, button)

Problem or Use Case

Some documentation sites expose a Markdown version of the current page at the same URL plus .md, but users have to know that convention and manually try it.

Example:

ExtractMD already helps users get web content into Markdown. When a site already provides an official Markdown source, the extension could make that cheaper and more accurate by detecting it and surfacing it to the user.

The main concern is avoiding noisy UI and avoiding unnecessary network work on every page/domain.

Proposed Solution

Add an optional "Markdown version available" detection feature:

  • On page load/navigation, derive a candidate Markdown URL from the current page URL, initially currentUrl + ".md".
  • Check availability with a lightweight same-origin request, preferably HEAD, with fallback to a small GET only when needed.
  • Treat the candidate as available only for successful 2xx responses with plausible Markdown/text content types, and avoid downloading large bodies during detection.
  • Cache negative and positive results per normalized URL for a short TTL so back/forward navigation and reloads do not repeat the request constantly.
  • Run detection only on http/https pages and skip ignored domains.
  • Use an abort timeout so slow domains do not keep background work alive.

When a Markdown version exists, show a small ExtractMD-styled notification/button. Suggested actions:

  • Open the .md URL.
  • Copy the .md URL.
  • Extract/copy directly from the .md source, if that fits the existing extraction flow.
  • Dismiss for this page or domain.

Add options-page controls:

  • Enable/disable Markdown availability detection.
  • Show floating button only when a .md version exists.
  • Notification/button position.
  • Remember dragged position.
  • Per-domain enable/disable, following the existing domain ignore pattern.
  • Optional "quiet mode" where only the extension popup indicates availability.

Implementation notes:

  • This should not require an external API. A direct HEAD/bounded GET request to the candidate URL should be lightweight enough when cached, throttled, and disabled by default or controlled by settings.
  • Prefer running the network check in the background/service worker rather than from the page context, so extension permissions and privacy boundaries stay explicit.
  • Consider a small list of URL patterns later if more sites use alternatives such as /index.md, ?format=md, or .mdx.

Alternatives Considered

  • Do nothing and rely on users manually trying .md URLs.
  • Add a manual popup action such as "Check for Markdown version" instead of automatic detection. This is the lowest-network option, but less discoverable.
  • Use a remote API to check availability. This seems unnecessary and would introduce privacy, reliability, and infrastructure concerns.
  • Always show a button that tries .md on click. This avoids background checks but creates UI noise on sites that do not support Markdown versions.

Impact

Medium (useful for many users)

Additional Context

This fits ExtractMD's current positioning as a Chrome extension for extracting content as Markdown, especially because official Markdown sources can preserve formatting better than HTML-to-Markdown conversion.

The UI should keep the existing ExtractMD vibe, but it may be worth using a slightly distinct color/state so users can tell "official Markdown source available" apart from the normal extraction button.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: extractionContent detection and Markdown extractionarea: outputExport formats and generated MarkdownenhancementNew feature or request

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions