Skip to content

media relative path is force overwritten when include.subpath is nil #2487

@musicaudience

Description

@musicaudience

Checklist

How did you create the site?

Generated from chirpy-starter

Describe the bug

file: _includes/media-url.html
line number: 18
code snippet:

{% assign url = include.subpath | default: '' | append: '/' | append: url %}

issue: if include.subpath is nil or empty string, and url is a relative path, e.g. path/to/file , the code will force overwrite url to absolute path /path/to/file , which will leads image url error to plugins like jekyll-postfiles.

Steps To Reproduce

see Describe the bug

Expected Behavior

don't try to force overwrite user's path type(absolute or relative).

Environment

  • Ruby: ruby 3.3.7 (2025-01-15 revision be31f993d7) [x86_64-linux-gnu]
  • Jekyll: jekyll 4.4.1
  • Chirpy: jekyll-theme-chirpy (7.3.1)

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions