ExtraStatic: powerful and easy publishing

Skip to content
  • Meitar M's avatar
    Fix relative paths to images when a permalink is used. · b8721c35
    Meitar M authored
    This commit uses the Jekyll `link` tag to correctly construct the URL to
    images with otherwise relative paths. Without this logic, the images
    would only load when the landing page's permalink was not altered by the
    user. For example, if the permalink is changed to `get-started` in the
    Jekyll Front Matter, the relative URLs would become:
    
        get-started/assets/images/pic08.jpg
    
    However, since the `get-started` path doesn't really exist, this would
    fail to load the image.
    
    As of Jekyll 4.0, the `link` tag is safe to use without prepending
    `site.baseurl`, so this code works in all situations.
    b8721c35
Loading