BeaconCMS / beacon

Open-source content management system (CMS) built with Phoenix LiveView. Faster render times to boost SEO performance, even for the most content-heavy pages.

Home Page:https://beaconcms.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Page Builder: Featured pages component

leandrocp opened this issue · comments

Currently the featured blog posts section in the dockyard.com website (screenshot below) is managed by a custom database table and custom code but we want to expose that kind of content as a reusable component that will look like:

<BeaconWeb.Components.featured_pages />

That component can receive an source argument that is a function used to return a list of pages. It should be optional and the default implementation should be Content.list_pages(site, per_page: 3, sort: :updated_at)

site can be fetched from the live view process, see

assigns = Map.put(assigns, :beacon_site, Process.get(:__beacon_site__))

Screenshot 2023-10-10 at 10 30 56 AM

Hey, I created a PR for this one ;)

#388