Apply 1 suggestion(s) to 1 file(s)
[akkoma] / docs / configuration / static_dir.md
1 # Static Directory
2
3 Static frontend files are shipped with pleroma. If you want to overwrite or update these without problems during upgrades, you can write your custom versions to the static directory.
4
5 You can find the location of the static directory in the [configuration](../cheatsheet/#instance).
6
7 ```elixir tab="OTP"
8 config :pleroma, :instance,
9 static_dir: "/var/lib/pleroma/static/",
10 ```
11
12 ```elixir tab="From Source"
13 config :pleroma, :instance,
14 static_dir: "instance/static/",
15 ```
16
17 Alternatively, you can overwrite this value in your configuration to use a different static instance directory.
18
19 This document is written using `$static_dir` as the value of the `config :pleroma, :instance, static_dir` setting.
20
21 If you use a From Source installation and want to manage your custom files in the git repository, you can remove the `instance/` entry from `.gitignore`.
22
23 ## robots.txt
24
25 There's a mix tasks to [generate a new robot.txt](../../administration/CLI_tasks/robots_txt/).
26
27 For more complex things, you can write your own robots.txt to `$static_dir/robots.txt`.
28
29 E.g. if you want to block all crawlers except for [fediverse.network](https://fediverse.network/about) you can use
30
31 ```
32 User-Agent: *
33 Disallow: /
34
35 User-Agent: crawler-us-il-1.fediverse.network
36 Allow: /
37
38 User-Agent: makhnovtchina.random.sh
39 Allow: /
40 ```
41
42 ## Thumbnail
43
44 Add `$static_dir/instance/thumbnail.jpeg` with your selfie or other neat picture. It will be available on `http://your-domain.tld/instance/thumbnail.jpeg` and can be used by external applications.
45
46 ## Instance-specific panel
47
48 Create and Edit your file on `$static_dir/instance/panel.html`.
49
50 ## Background
51
52 You can change the background of your Pleroma instance by uploading it to `$static_dir/`, and then changing `background` in [your configuration](../cheatsheet/#frontend_configurations) accordingly.
53
54 E.g. if you put `$static_dir/images/background.jpg`
55
56 ```
57 config :pleroma, :frontend_configurations,
58 pleroma_fe: %{
59 background: "/images/background.jpg"
60 }
61 ```
62
63 ## Logo
64
65 !!! important
66 Note the extra `static` folder for the default logo.png location
67
68 If you want to give a brand to your instance, You can change the logo of your instance by uploading it to the static directory `$static_dir/static/logo.png`.
69
70 Alternatively, you can specify the path to your logo in [your configuration](../cheatsheet/#frontend_configurations).
71
72 E.g. if you put `$static_dir/static/mylogo-file.png`
73
74 ```
75 config :pleroma, :frontend_configurations,
76 pleroma_fe: %{
77 logo: "/static/mylogo-file.png"
78 }
79 ```
80
81 ## Terms of Service
82
83 !!! important
84 Note the extra `static` folder for the terms-of-service.html
85
86 Terms of Service will be shown to all users on the registration page. It's the best place where to write down the rules for your instance. You can modify the rules by adding and changing `$static_dir/static/terms-of-service.html`.