diff --git a/.gitignore b/.gitignore index 060af90..d2e35f7 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,12 @@ chiya-*.tar # Ignore assets that are produced by build tools. /priv/static/assets/ +# Ignore processed assets +/priv/static +!/priv/static/robots.txt +!/priv/static/site.webmanifest +!/priv/static/browserconfig.xml + # Ignore digested assets cache. /priv/static/cache_manifest.json diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..270221e --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +SHELL := /bin/bash + +all: build + +build: + source ~/.asdf/asdf.sh && bash scripts/build.sh \ No newline at end of file diff --git a/lib/chiya/channels.ex b/lib/chiya/channels.ex index 63259eb..e8d5a09 100644 --- a/lib/chiya/channels.ex +++ b/lib/chiya/channels.ex @@ -9,7 +9,9 @@ defmodule Chiya.Channels do alias Chiya.Notes.Note @preloads [:notes] - @public_preloads [notes: (from n in Note, where: not is_nil(n.published_at))] + @public_preloads [notes: (from n in Note, + where: not is_nil(n.published_at), + order_by: [desc: n.published_at])] @doc """ Returns the list of channels. diff --git a/lib/chiya_web/components/layouts/root_public.html.heex b/lib/chiya_web/components/layouts/root_public.html.heex index 356e68d..6f9f15c 100644 --- a/lib/chiya_web/components/layouts/root_public.html.heex +++ b/lib/chiya_web/components/layouts/root_public.html.heex @@ -13,9 +13,12 @@ + <.admin_bar current_user={@current_user} /> <%= @inner_content %> + + <%= @settings.custom_html %> \ No newline at end of file diff --git a/scripts/build.sh b/scripts/build.sh index 2229013..7ff920c 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash echo "Pulling latest changes.." -git pull +git pull origin main echo "Updating mix dependencies.." mix deps.get --only prod @@ -18,5 +18,3 @@ MIX_ENV=prod mix assets.deploy echo "Generating release.." MIX_ENV=prod mix release --overwrite -echo "Restarting application.." -systemctl --user restart chiya