Beacon
▼
Project version
v0.5.1
v0.5.0
v0.4.3
v0.4.2
v0.4.1
v0.4.0
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.2
v0.2.1
v0.2.0
v0.1.4
v0.1.3
v0.1.2
v0.1.1
v0.1.0
v0.1.0-rc.2
v0.1.0-rc.1
v0.1.0-rc.0
Go to latest
GUIDES
Modules
Mix
Tasks
API Reference
Modules
Mix Tasks
Changelog
0.5.0 (2025-03-18)
0.4.3 (2025-03-04)
0.4.2 (2025-02-26)
0.4.1 (2025-02-20)
0.4.0 (2025-02-12)
0.3.3 (2024-12-13)
0.3.2 (2024-12-11)
0.3.1 (2024-12-10)
0.3.0 (2024-12-05)
0.2.2 (2024-11-17)
0.2.1 (2024-11-14)
0.2.0 (2024-11-08)
0.1.4 (2024-10-31)
0.1.3 (2024-10-29)
0.1.2 (2024-10-23)
0.1.1 (2024-10-22)
0.1.0 (2024-10-09)
0.1.0-rc.2 (2024-09-20)
0.1.0-rc.1 (2024-08-27)
Fixes
0.1.0-rc.0 (2024-08-02)
Introduction
Installation
Objective
Notes
Steps
Next Steps
Your First Site
Objective
Prerequisites
Setup
Starting the application
Accessing LiveAdmin to manage your site
Live Data
Handle the form submission event
Upload an image
Update the home page template
Recipes
Access Page Info
Add Custom Page Fields
Add a module that implements the Beacon.Content.PageField behavior
Add the field to Beacon.Config
Access the field content
Create a Blog
Objective
Prerequisites
Create the blog site
Custom Fields
Create the layout
Create the first blog post
Create the blog index
Custom Repo
Customize Markdown Rendering
Embed tweets
Steps
Heroicons
JavaScript interoperability
Libraries in JS Hooks
Multiple Domains/Tenants
Multiple Domains/Tenants hosting with BeaconCMS
Notify Page Published
Handle async and continuous updates with handle_info and on_mount
Creating the On Mount Handler Module
Updating the Live Session
Accessing LiveAdmin to manage your site
Live Data
Handle the :update_current_time info callback
Update the home page template
Protect Pages with Basic Auth
Create an authentication plug
Use the plug in your router
Reuse app.css
Tailwind Setup
Objective
Prerequisites
Constraints
Steps
Testing
Config
Test
General
Troubleshooting
Server crashes due to missing tailwind or tailwind fails to generate stylesheets
Site not booting because it's not reachable
Could not resolve "tailwindcss/plugin"
Deployment
Deploy to Fly.io
Fly.io CLI
Sign in or sign up
Dockerfile
Copy files into the release
Launch
Deploy
Open
Certificates
More commands
Troubleshooting
Deployment Topologies
Core Concepts
Strategies
Upgrading
Upgrading from pre v0.1.0 to v0.1.0-rc.0
Backup
Migrate the database schema and data
Phoenix HTML
beacon_api
First site config change
Check for errors
Execute the migrations
Bump Beacon to latest version
Site config for v0.1
Remove Beacon.Repo
Update Esbuild and Tailwind
Beacon.Web.ErrorHTML
Migrate to latest schema
Test the app
Beacon.DataSource.Behaviour
Publish pages
Upgrading to v0.1.0-rc.1
Bump your deps
Update Beacon tables
Upgrading to v0.1.0-rc.2
Bump your deps
Update Gettext
Upgrading to v0.1.0
Bump your deps
Update sites config
Update Elixir version
Update mdex version (only if using :mdex directly)
Upgrading to v0.3.0
Move Beacon after the endpoint in application.ex
Add Beacon.Plug to your Router
Upgrading to v0.4.0
Update Beacon tables
Move Beacon before the endpoint in application.ex
Generate your site Endpoint and the global Proxy Endpoint
Copy the esbuild binary in the release
Beacon
Summary
Functions
boot/1
start_link/1
Beacon.Plug
Sections
Usage
Beacon.Test
Sections
Usage
Default site
Summary
Functions
default_site/0
Beacon.Test.Fixtures
Sections
Usage
Fixtures
Default site
Summary
Functions
beacon_component_fixture/1
beacon_error_page_fixture/1
beacon_event_handler_fixture/1
beacon_info_handler_fixture/1
beacon_js_hook_fixture/1
beacon_layout_fixture/1
beacon_live_data_assign_fixture/1
beacon_live_data_fixture/1
beacon_media_library_asset_fixture/1
beacon_page_fixture/1
beacon_page_variant_fixture/1
beacon_published_layout_fixture/1
beacon_published_page_fixture/1
beacon_snippet_helper_fixture/1
beacon_stylesheet_fixture/1
beacon_upload_metadata_fixture/1
Execution
Beacon.Migration
Sections
Usage
Summary
Functions
down/1
up/1
Beacon.Router
Sections
Helpers
Path
Route Precedence
Summary
Functions
beacon_site/2
Content
Beacon.Content
Sections
Templates
Meta Tags
Summary
Functions: Layouts
change_layout/2
count_layouts/2
create_layout/1
create_layout!/1
default_layout/0
get_latest_layout_event/2
get_layout/2
get_layout!/2
get_layout_by/3
get_published_layout/2
list_layout_events/2
list_layouts/2
list_published_layouts/1
publish_layout/1
publish_layout/2
update_layout/2
Functions: Pages
change_page/2
count_pages/2
create_page/1
create_page!/1
default_site_meta_tags/0
get_latest_page_event/2
get_page/3
get_page!/3
get_page_by/3
get_published_page/2
list_page_events/2
list_pages/2
list_published_pages/2
list_published_pages_for_paths/2
publish_page/1
publish_page/2
publish_pages/1
put_page_extra/2
unpublish_page/1
update_page/2
validate_page/3
Functions: Page Variants
change_page_variant/2
create_variant_for_page/2
delete_variant_from_page/2
update_variant_for_page/3
Functions: Stylesheets
create_stylesheet/1
create_stylesheet!/1
get_stylesheet_by/3
list_stylesheets/1
update_stylesheet/2
Functions: Components
change_component/2
change_component_attr/3
change_component_slot/3
change_slot_attr/3
component_categories/0
count_components/2
create_component/1
create_component!/1
create_slot_attr/3
create_slot_for_component/2
delete_slot_attr/2
delete_slot_from_component/2
get_component_by/3
list_components/2
list_components_by_name/2
update_component/2
update_slot_attr/4
update_slot_for_component/4
Functions: Snippets
create_snippet_helper/1
create_snippet_helper!/1
list_snippet_helpers/1
render_snippet/2
Functions: Event Handlers
change_event_handler/2
create_event_handler/1
create_event_handler!/1
delete_event_handler/1
list_event_handlers/1
update_event_handler/2
Functions: Error Pages
change_error_page/2
create_error_page/1
create_error_page!/1
default_error_pages/0
delete_error_page/1
get_error_page/2
list_error_pages/2
list_error_pages_by/3
update_error_page/2
Functions: Live Data
change_live_data_assign/2
change_live_data_path/2
create_assign_for_live_data/2
create_live_data/1
create_live_data!/1
delete_live_data/1
delete_live_data_assign/2
get_live_data_by/3
live_data_assign_formats/0
live_data_for_site/2
update_live_data_assign/3
update_live_data_path/2
Functions: Info Handlers
change_info_handler/2
create_info_handler/1
create_info_handler!/1
delete_info_handler/1
get_info_handler/2
get_info_handler!/2
list_info_handlers/1
update_info_handler/2
Functions: JS Hooks
change_js_hook/2
create_js_hook/1
create_js_hook!/1
default_hook_code/1
delete_js_hook/1
get_js_hook_by/3
list_js_hooks/1
update_js_hook/2
Beacon.Content.Component
Summary
Types
t/0
Functions
categories/0
Beacon.Content.ComponentAttr
Summary
Types
t/0
Beacon.Content.ComponentSlot
Summary
Types
t/0
Beacon.Content.ComponentSlotAttr
Summary
Types
t/0
Beacon.Content.ErrorPage
Summary
Types
error_status/0
t/0
Functions
valid_statuses/0
Beacon.Content.EventHandler
Summary
Types
t/0
Beacon.Content.InfoHandler
Summary
Types
t/0
Beacon.Content.JSHook
Summary
Types
t/0
Beacon.Content.Layout
Summary
Types
t/0
Functions
version/0
Beacon.Content.LayoutEvent
Summary
Types
t/0
Beacon.Content.LayoutSnapshot
Summary
Types
t/0
Beacon.Content.LiveData
Summary
Types
t/0
Functions
changeset/2
path_changeset/2
Beacon.Content.LiveDataAssign
Summary
Types
t/0
Functions
changeset/2
formats/0
Beacon.Content.Page
Sections
SEO
Summary
Types
t/0
Functions
version/0
Beacon.Content.PageEvent
Summary
Types
event/0
t/0
Beacon.Content.PageSnapshot
Summary
Types
t/0
Beacon.Content.PageVariant
Summary
Types
t/0
Beacon.Content.Snippets.Helper
Summary
Types
t/0
Beacon.Content.Stylesheet
Summary
Types
t/0
Beacon.Template
Summary
Types
ast/0
t/0
Beacon.Template.HEEx
Summary
Functions
compile/4
compile!/4
render/3
Beacon.Template.Markdown
Summary
Functions
convert_to_html/3
Media Library
Beacon.MediaLibrary
Summary
Functions
change_asset/2
change_derivation/2
count_assets/2
file_stat/2
get_asset_by/2
is_image?/1
list_assets/2
read_binary/1
read_binary!/1
save_asset/1
save_asset!/1
search/2
send_to_cdns/1
soft_delete/1
srcset_for_image/2
upload/1
url_for/1
url_for/2
url_for_asset/2
urls_for/1
Beacon.MediaLibrary.Asset
Summary
Types
t/0
Beacon.MediaLibrary.Provider
Beacon.MediaLibrary.Provider.Repo
Beacon.MediaLibrary.Provider.S3
Beacon.MediaLibrary.UploadMetadata
Summary
Types
t/0
Web
Beacon.RuntimeCSS
Summary
Callbacks
compile/1
config/1
Functions
css_config_url/1
Beacon.RuntimeCSS.TailwindCompiler
Beacon.Web.BeaconAssigns
Sections
Examples
Summary
Types
t/0
Beacon.Web.ErrorHTML
Beacon.Web.Layouts
Summary
Functions
app/1
asset_path/2
dynamic/1
live_socket_path/1
render_meta_tags/1
render_page_title/1
render_resource_links/1
render_schema/1
runtime/1
Extensibility
Beacon.Config
Summary
Types
allowed_media_accept_types/0
css_compiler/0
default_meta_tags/0
endpoint/0
extra_asset_field/0
extra_asset_fields/0
extra_page_fields/0
lifecycle/0
lifecycle_stage/0
live_socket_path/0
media_type_config/0
media_type_configs/0
mode/0
option/0
page_warming/0
repo/0
router/0
safe_code_check/0
t/0
tailwind_config/0
tailwind_css/0
template_formats/0
Functions
config_for_media_type/2
fetch!/1
get_media_type_config/2
new/1
update_value/3
Beacon.Content.PageField
Sections
Example
Summary
Callbacks
changeset/3
default/0
name/0
render/1
type/0
Functions
render_field/3
Beacon.Lifecycle
Summary
Types
t/0
Callbacks
put_metadata/3
validate_input!/3
validate_output!/3
Functions
execute/5
execute_steps/1
put_metadata/4
put_steps/3
validate_input!/4
validate_output!/4
Beacon.MediaLibrary.AssetField
Sections
Example
Summary
Callbacks
changeset/3
default/0
name/0
render_input/1
render_show/1
type/0
Beacon.Template.LoadMetadata
Summary
Types
t/0
Beacon.Template.RenderMetadata
Summary
Types
t/0
Types
Beacon.Types.JsonArrayMap
Summary
Types
t/0
Functions
embed_as/1
equal?/2
Beacon.Types.Site
Summary
Types
t/0
Functions
embed_as/1
equal?/2
valid?/1
valid_name?/1
valid_path?/1
Exceptions
Beacon.ConfigError
Beacon.InvokeError
Beacon.LoaderError
Beacon.ParserError
Beacon.RuntimeError
Beacon.SnippetError
Summary
Types
t/0
Beacon.Web.NotFoundError
Beacon.Web.ServerError
mix beacon.gen.proxy_endpoint
Sections
Example
Options
mix beacon.gen.site
Sections
Examples
Using --host-dev for Multiple Sites
Options
mix beacon.gen.tailwind_config
Sections
Example
mix beacon.install
Sections
Examples
Options
Search documentation of Beacon
Settings
Beacon.Web.ErrorHTML
(Beacon v0.5.0)
View Source
Render
Beacon.Content.ErrorPage
.