getherbie/plugin-lipsum

Herbie的Lipsum插件。

安装: 295

依赖: 1

建议: 0

安全: 0

星星: 1

关注者: 1

分支: 0

开放问题: 0

类型:herbie-plugin

v1.0.0 2016-04-05 15:02 UTC

This package is auto-updated.

Last update: 2024-09-28 22:26:09 UTC


README

Lipsum是一个Herbie插件,它允许你轻松地在网站上输出占位文本。

安装

您可以通过Composer安装此插件。

$ composer require getherbie/plugin-lipsum

之后,在配置文件中激活插件。

plugins:
    enable:
        - lipsum

配置

plugins.config.lipsum下,您有如下选项可用

# enable shortcodes
shortcode: true

# enable twig functions
twig: false

应用

Shortcodes可以按以下方式使用

[lipsum_titel]

[lipsum_text]

[lipsum_image width="240" height="120" category="abstract"]

通过激活Twig函数,您也可以在布局文件中使用它们

{{ lipsum_titel() }}    

{{ lipsum_text() }}    

{{ lipsum_image(width="240", height="120", category="abstract") }}