BeaconCMS / BeaconCMS/beacon

Expose `page.extra` field in the `@beacon` assign

Open
#465 0 comments 0 reactions 0 assignees View on GitHub
area:content good first issue roadmap
Dominant language
Elixir
Stars
1.3k
Forks
134
PR merge metrics
No merged PRs in 30d

Description

The `@beacon` assign that is managed and build by the `BeaconAssigns` module holds public data about the current page as the page title, path, and so on. But currently it's missing the `extra` field which holds the data of [custom page fields](https://github.com/BeaconCMS/beacon/blob/main/guides/recipes/add-custom-page-fields.md). We want to expose that data because it's public and useful to build pages.

So when the `@beacon` is [created](https://github.com/BeaconCMS/beacon/blob/ce916b5c5f20e94737f3f6b54e1356ae525d6be9/lib/beacon/web/live/page_live.ex#L93) we want to have `@beacon.page.extra` with all the data of custom page fields available.

Contributor guide

Open the contributing guide

Research direction

Start at lib/beacon/web/live/page_live.ex around the @beacon creation point and trace the BeaconAssigns module to see how current page data is assembled. Expose the page's custom-field data through @beacon.page.extra, then verify that the assign contains the expected values when a page has custom fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
web-dev
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.