按照 Lektor 流程文档,我创建了一个简单的块并包含在页面模型中。但是,此“文本”块不会显示在网页中。控制台中没有错误。
有人可以指出我做错了什么。
/models/page.ini
[model]
name = Page
label = {{ this.title }}
[fields.title]
label = Title
type = string
[fields.body]
label = Body
type = markdown
[fields.text]
label = Text Block
type = flow
flow_blocks = text
/flowblocks/text.ini
[block]
name = Text Block
button_label = Text
[fields.text]
label = Text
type = markdown
[fields.class]
label = Class
type = select
choices = default, centered
choice_labels = Default, Centered
default = default
/templates/blocks/text.html
<div class="text-block text-block-{{ this.class }}">
{{ this.text }}
</div>