Some checks failed
deploy / deploy (push) Has been cancelled
- Add Site context for managing site-wide content (social links, nav items, announcement bar, footer content) - Add SocialLink schema with URL normalization and platform auto-detection supporting 40+ platforms via host and 25+ via URI scheme - Add NavItem schema for header/footer navigation (editor UI coming next) - Add SiteEditor component with collapsible sections for each content type - Wire social links card block and footer to use database data - Filter empty URLs from display in shop components - Add DetailsPreserver hook to preserve collapsible section state - Add comprehensive tests for Site context and SocialLink functions - Remove unused helper functions from onboarding to fix compiler warnings - Move sync_edit_url_param helper to group handle_editor_event clauses Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
28 lines
763 B
Elixir
28 lines
763 B
Elixir
# Script for populating the database. You can run it as:
|
|
#
|
|
# mix run priv/repo/seeds.exs
|
|
#
|
|
# Inside the script, you can read and write to any of your
|
|
# repositories directly:
|
|
#
|
|
# Berrypod.Repo.insert!(%Berrypod.SomeSchema{})
|
|
#
|
|
# We recommend using the bang functions (`insert!`, `update!`
|
|
# and so on) as they will fail if something goes wrong.
|
|
|
|
alias Berrypod.{Settings, Site}
|
|
|
|
# Set default theme settings (Studio preset)
|
|
IO.puts("Setting up default theme settings...")
|
|
|
|
{:ok, _theme} = Settings.apply_preset(:studio)
|
|
|
|
IO.puts("✓ Default theme settings applied (Studio preset)")
|
|
|
|
# Seed default navigation and social links
|
|
IO.puts("Setting up default site content...")
|
|
|
|
Site.seed_defaults()
|
|
|
|
IO.puts("✓ Default navigation and social links created")
|