Phoenix Blog Template
Legacy Template — maintained for security and compatibility fixes only. No new features. EOL review: July 2027. See LEGACY-STATUS.md. For actively developed starters, see the core PHX products at phxtemplates.com.
A personal blog and portfolio site built with Phoenix 1.7 and LiveView 0.19:
- Public blog with markdown posts (rendered with Earmark, HTML escaped by default) and a projects showcase.
- Admin-only content management: the single admin account (matched by email) can create, edit, and delete blogs and projects. All write routes and LiveView events are gated server-side.
- Contact form and mailing-list signup wired for EmailJS (client-side, placeholder credentials shipped — nothing sends until you add yours).
- Optional Buy Me a Coffee widget.
- Ships with the demo persona “Alex Rivera” — all demo content is redistributable placeholder copy for you to replace.
Not included (by design): comments, categories/tags, multi-author support,
image uploads (blog images are external URLs; project images live in
priv/static/images/projects/).
Install
Requirements: Elixir >= 1.15 / OTP 25+, PostgreSQL 12+. Node is not required (esbuild/tailwind binaries are fetched by mix).
mix setup # deps, database, seeds, assets
mix phx.server # visit http://localhost:4000
The dev/test database reads DB_PORT (default 5432) if your Postgres runs on
a non-standard port.
Run the test suite:
mix test
Customize
-
Admin account — set your email as
admin_emailinconfig/config.exs(line 12), then register that email at/users/register. Only that account can manage content at/blogs/newand/projects/new. -
Persona and copy — replace “Alex Rivera” and the sample copy in
lib/blog_template_web/live/home_live/index.html.heex,lib/blog_template_web/components/layouts/root.html.heex(title, meta description), and the blog/projects headers. -
Contact + mailing list (EmailJS) — create a free EmailJS account and
put your service ID, template IDs, and public key into
assets/js/mailer.js(placeholders are clearly marked). The forms alert on success/failure client-side. -
Buy Me a Coffee — add your user id to the widget
<script>tag inlib/blog_template_web/components/layouts/root.html.heex, or delete the tag. -
Images — blog post images are external URLs entered in the blog form;
project thumbnails are files in
priv/static/images/projects/. -
Social links — the fixed sidebar icons in
root.html.heexpoint to#; set your profiles or remove them.
Deploy
Standard Phoenix release deployment. In production you must set:
-
DATABASE_URL(e.g.ecto://USER:PASS@HOST/DATABASE) -
SECRET_KEY_BASE(generate withmix phx.gen.secret) -
PHX_HOST, andPHX_SERVER=truewhen starting a release
mix assets.deploy
MIX_ENV=prod mix release
See the Phoenix deployment guides for platform specifics (Fly.io, Gigalixir, Docker, bare VMs).
Support & policies
- LEGACY-STATUS.md — maintenance policy and EOL review
- SUPPORT.md — how to get help
- SECURITY.md — reporting vulnerabilities
- CHANGELOG.md — release history