logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

static_dir.md (3246B)


  1. # Static Directory
  2. 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.
  3. You can find the location of the static directory in the [configuration](../cheatsheet/#instance).
  4. === "OTP"
  5. ```elixir
  6. config :pleroma, :instance,
  7. static_dir: "/var/lib/pleroma/static/"
  8. ```
  9. === "From Source"
  10. ```elixir
  11. config :pleroma, :instance,
  12. static_dir: "instance/static/"
  13. ```
  14. Alternatively, you can overwrite this value in your configuration to use a different static instance directory.
  15. This document is written using `$static_dir` as the value of the `config :pleroma, :instance, static_dir` setting.
  16. 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`.
  17. ## robots.txt
  18. There's a mix tasks to [generate a new robot.txt](../../administration/CLI_tasks/robots_txt/).
  19. For more complex things, you can write your own robots.txt to `$static_dir/robots.txt`.
  20. E.g. if you want to block all crawlers except for [fediverse.network](https://fediverse.network/about) you can use
  21. ```
  22. User-Agent: *
  23. Disallow: /
  24. User-Agent: crawler-us-il-1.fediverse.network
  25. Allow: /
  26. User-Agent: makhnovtchina.random.sh
  27. Allow: /
  28. ```
  29. ## Thumbnail
  30. 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.
  31. ## Instance-specific panel
  32. Create and Edit your file at `$static_dir/instance/panel.html`.
  33. ## Background
  34. 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.
  35. E.g. if you put `$static_dir/images/background.jpg`
  36. ```
  37. config :pleroma, :frontend_configurations,
  38. pleroma_fe: %{
  39. background: "/images/background.jpg"
  40. }
  41. ```
  42. ## Logo
  43. !!! important
  44. Note the extra `static` folder for the default logo.png location
  45. 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`.
  46. Alternatively, you can specify the path to your logo in [your configuration](../cheatsheet/#frontend_configurations).
  47. E.g. if you put `$static_dir/static/mylogo-file.png`
  48. ```
  49. config :pleroma, :frontend_configurations,
  50. pleroma_fe: %{
  51. logo: "/static/mylogo-file.png"
  52. }
  53. ```
  54. ## Terms of Service
  55. !!! important
  56. Note the extra `static` folder for the terms-of-service.html
  57. 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`.
  58. ## Styling rendered pages
  59. To overwrite the CSS stylesheet of the OAuth form and other static pages, you can upload your own CSS file to `instance/static/static.css`. This will completely replace the CSS used by those pages, so it might be a good idea to copy the one from `priv/static/instance/static.css` and make your changes.