NAME

Dancer2::Plugin::LiteBlog::Activities - Activities widget for LiteBlog

DESCRIPTION

This module provides a specific implementation for an Activities widget in LiteBlog, a Dancer2 plugin.

This widget provides a mechanism for managing and displaying "activity cards" in LiteBlog, a Dancer2-based blogging platform. Each activity card showcases a specific personal or professional activity, complete with an image, a title, a link (href) and a brief description.

For instance, these activity cards can be used to highlight: Profesional Profiles, Open Source Contributions, Social Network Profiles, Hobby, or any other activity the user wants to showcase on their LiteBlog site.

CONFIGURATION

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

    liteblog:
      ...
      widgets:
        - name: activities
          params: 
            source: "liteblog/activities.yml"
        ...

The source setting must be a valid YAML file local to the appdir where activities will be loaded from.

Example of a valid activities.yml file:

    ---
    - name: "LinkedIn"
      link: '#'
      image: '/images/some-linkedin-cover.jpg'
      desc: "Checkout my LinkedIn profile."
    - name: "GitHub"
      link: "https://github.com/PerlDancer"
      desc: "This is the Dancer GitHub Official account."

ATTRIBUTES

root

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

source

The `source` attribute specifies the path to the YAML file relative to the `root` directory. This YAML file contains the list of activities.

elements

This attribute lazily loads and returns the activities from the specified YAML source file.

SEE ALSO

Dancer2::Plugin::LiteBlog::Widget, Dancer2, Moo, YAML::XS

TODO

A refactoring is pending for the common logic of loading a YAML file which is similar to the 'meta' logic in Dancer2::Plugin::LiteBlog::Blog.

AUTHOR

Alexis Sukrieh, sukria@gmail.com

COPYRIGHT AND LICENSE

Copyright 2023 by Alexis Sukrieh.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.