From 547e6dcbb11a5ec95f4b282aa478be68168f57ad Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 7 Apr 2023 11:29:12 +0100 Subject: [PATCH] Add Plausible to Gitea https://theorangeone.net/posts/plausible-gitea/ --- ansible/roles/gitea/files/footer.html | 3 +++ ansible/roles/gitea/tasks/main.yml | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 ansible/roles/gitea/files/footer.html diff --git a/ansible/roles/gitea/files/footer.html b/ansible/roles/gitea/files/footer.html new file mode 100644 index 0000000..27f98b4 --- /dev/null +++ b/ansible/roles/gitea/files/footer.html @@ -0,0 +1,3 @@ +{{ if not .SignedUserName}} + +{{ end }} diff --git a/ansible/roles/gitea/tasks/main.yml b/ansible/roles/gitea/tasks/main.yml index 416bdc8..38abca9 100644 --- a/ansible/roles/gitea/tasks/main.yml +++ b/ansible/roles/gitea/tasks/main.yml @@ -45,6 +45,15 @@ mode: "{{ docker_compose_directory_mask }}" become: true +- name: Create custom templates directory + file: + path: "{{ app_data_dir }}/gitea/data/custom/templates/custom" + state: directory + owner: "{{ docker_user.name }}" + mode: "{{ docker_compose_directory_mask }}" + recurse: true + become: true + - name: Install custom branding unarchive: src: https://git.theorangeone.net/api/packages/sys/generic/gitea-branding/latest/branding.zip @@ -52,3 +61,12 @@ remote_src: true owner: "{{ docker_user.name }}" become: true + +- name: Install custom footer + copy: + src: files/footer.html + dest: "{{ app_data_dir }}/gitea/data/custom/templates/custom/footer.tmpl" + owner: "{{ docker_user.name }}" + mode: "{{ docker_compose_file_mask }}" + notify: restart gitea + become: true