The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Dancer2::Plugin::LiteBlog::Custom - include html fragments as widgets

DESCRIPTION

This widget allows you to inject arbitrary HTML fragments in your LiteBlog homepage easily. This way you can add any HTML/CSS/JavaScript code that you want without hacking around the code.

CONFIGURATION

The Widget looks for its configuration under the liteblog entry of the Dancer2 application.

    liteblog:
      ...
      widgets:
        - name: custom
          params: 
            root: directory-where-to-look-for-source
            source: path-to-some.html

ATTRIBUTES

root

Inherited from Dancer2::Plugin::LiteBlog::Widget, it specifies the root directory for the widget, where the source HTML file will be looked for.

source

The `source` attribute specifies the path to the HTML file relative to the `root` directory.

elements

This attribute lazily loads and returns the HTML content of the source file.