Skip to content

Cobalt processes vim .swp files in _layouts as templates, and warns #1198

Open
@skierpage

Description

@skierpage

(This is similar to issue #556)

If you use vim to edit a file in _layouts, Cobalt processes vim's binary .<FILE>.swp swap file(s) as if they were liquid templates, and cobalt serve complains about their content:

Building from `/tmp/myBlog` into `/tmp/.tmpxwRaPV`
WARN: Failed to load layout .default.liquid.swp

As @lazysoundsystem commented on 556, I think it happens because fn find_layouts() sets ignore_hidden(false) (I haven't tried their one-line fix yet). Processing files is different from serving pages, but it seems unnecessary and counterintuitive that Cobalt supports templates files starting with . or _ in _layouts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions