Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal issue when a field is not defined #13

Open
jvanasco opened this issue Apr 11, 2019 · 0 comments
Open

fatal issue when a field is not defined #13

jvanasco opened this issue Apr 11, 2019 · 0 comments

Comments

@jvanasco
Copy link

We allow for a field to override another, such as this:

page.html:

{% extends "site_layout.html" %}
{% block meta_title %}{{ this.meta_title or this.title }}{% endblock %}

site_layout.html:

<title>{% block title %}title{% endblock %}</title>
<meta name="title" content="{% block meta_title %}{% endblock %}"/>

A fatal exception is raised if lektor-jinja-content is enabled and the meta_title or title is not defined in a contents.lr file.

valid:

title: sample title
---
meta_title: sample meta_title

invalid:

title: sample title

I am working on a PR

jvanasco added a commit to jvanasco/lektor-jinja-content that referenced this issue Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant