From 8f45d60da82a1bc08d86936389548bfb26f199bf Mon Sep 17 00:00:00 2001 From: Inhji Date: Sat, 25 Mar 2023 10:39:06 +0100 Subject: [PATCH 1/6] add makefile --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Makefile 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 From 0dc82095f6377fcb8ee6ab27a41e160f9e050e08 Mon Sep 17 00:00:00 2001 From: Inhji Date: Sat, 25 Mar 2023 10:39:19 +0100 Subject: [PATCH 2/6] fine tune gitignore --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) 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 From 7b8b48eecba083a2d104d1acc76a6553150f4cbd Mon Sep 17 00:00:00 2001 From: Inhji Date: Sat, 25 Mar 2023 11:01:44 +0100 Subject: [PATCH 3/6] remove restart from buildscript --- scripts/build.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 2229013..26fb973 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -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 From 70366d8d7f5a36c9dc0dfcafa088fa33dfabac5b Mon Sep 17 00:00:00 2001 From: inhji Date: Mon, 27 Mar 2023 09:17:22 +0200 Subject: [PATCH 4/6] order channel notes by published_at date --- lib/chiya/channels.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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. From 1fcc71725c2225b1d6e262ad77dd57c14b77756a Mon Sep 17 00:00:00 2001 From: inhji Date: Mon, 27 Mar 2023 09:28:18 +0200 Subject: [PATCH 5/6] pull from main --- scripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index 26fb973..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 From b6166580dc64df8c3239d0522d8b192561dcdb0c Mon Sep 17 00:00:00 2001 From: inhji Date: Mon, 27 Mar 2023 11:53:09 +0200 Subject: [PATCH 6/6] render custom_html and custom_css --- lib/chiya_web/components/layouts/root_public.html.heex | 3 +++ 1 file changed, 3 insertions(+) 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