Skip to content

Allow .yml as YAML file extension #161

Closed
@tbrlpld

Description

@tbrlpld

Issue Summary

When defining template context files (the YAML) files, these are only recognised when they use the full .yaml extension.

When using the shorter .yml extension the template is not picking up the context file.

This can be very confusing.

Steps to Reproduce

  1. Setup a project with django-patter-library enable
  2. Create a template test.html in one of the directories observed by django-pattern-library with the content
{{ test_var }}
  1. Create a context file test.yaml next to the template with the content
context:
  test_var: Test content
  1. Open the template in the patter library and observe that you see "Test content"
  2. Rename the context file mv test.yaml test.yml
  3. Open the template in the patter library and observe that you see nothing. The context is not rendered anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions