Add Plausible to Gitea
Some checks failed
ansible
terraform

https://theorangeone.net/posts/plausible-gitea/
This commit is contained in:
Jake Howard 2023-04-07 11:29:12 +01:00
parent ae544a3a6b
commit 547e6dcbb1
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,3 @@
{{ if not .SignedUserName}}
<script defer data-domain="git.theorangeone.net" src="https://elbisualp.theorangeone.net/js/script.js"></script>
{{ end }}

View file

@ -45,6 +45,15 @@
mode: "{{ docker_compose_directory_mask }}" mode: "{{ docker_compose_directory_mask }}"
become: true 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 - name: Install custom branding
unarchive: unarchive:
src: https://git.theorangeone.net/api/packages/sys/generic/gitea-branding/latest/branding.zip src: https://git.theorangeone.net/api/packages/sys/generic/gitea-branding/latest/branding.zip
@ -52,3 +61,12 @@
remote_src: true remote_src: true
owner: "{{ docker_user.name }}" owner: "{{ docker_user.name }}"
become: true 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