From 63924ee712a4a40b902990a4af1f16cbdd49175b Mon Sep 17 00:00:00 2001 From: aries Date: Mon, 22 Jul 2019 18:46:32 +0900 Subject: [PATCH 1/3] Fix static_dir docs --- docs/config/small_customizations.md | 29 ++----------------- docs/config/static_dir.md | 44 +++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 26 deletions(-) diff --git a/docs/config/small_customizations.md b/docs/config/small_customizations.md index 09e8d6041..f91657a4c 100644 --- a/docs/config/small_customizations.md +++ b/docs/config/small_customizations.md @@ -1,35 +1,12 @@ # Small customizations -Replace `dev.secret.exs` with `prod.secret.exs` according to your setup. -# Thumbnail +See also static_dir.md for visual settings. -Replace `priv/static/instance/thumbnail.jpeg` with your selfie or other neat picture. It will appear in [Pleroma Instances](http://distsn.org/pleroma-instances.html). - -# Instance-specific panel - -![instance-specific panel demo](/uploads/296b19ec806b130e0b49b16bfe29ce8a/image.png) - -To show the instance specific panel, set `show_instance_panel` to `true` in `config/dev.secret.exs`. You can modify its content by editing `priv/static/instance/panel.html`. - -# Background - -You can change the background of your Pleroma instance by uploading it to `priv/static/static`, and then changing `"background"` in `config/dev.secret.exs` accordingly. - -# Logo - -![logo modification demo](/uploads/c70b14de60fa74245e7f0dcfa695ebff/image.png) - -If you want to give a brand to your instance, look no further. You can change the logo of your instance by uploading it to `priv/static/static`, and then changing `logo` in `config/dev.secret.exs` accordingly. - -# Theme +## Theme All users of your instance will be able to change the theme they use by going to the settings (the cog in the top-right hand corner). However, if you wish to change the default theme, you can do so by editing `theme` in `config/dev.secret.exs` accordingly. -# Terms of Service - -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 changing `priv/static/static/terms-of-service.html`. - -# Message Visibility +## Message Visibility To enable message visibility options when posting like in the Mastodon frontend, set `scope_options_enabled` to `true` in `config/dev.secret.exs`. diff --git a/docs/config/static_dir.md b/docs/config/static_dir.md index 0cc52b99a..0da1e6c9f 100644 --- a/docs/config/static_dir.md +++ b/docs/config/static_dir.md @@ -18,3 +18,47 @@ If you want to generate a restrictive `robots.txt`, you can run the following mi ``` mix pleroma.robots_txt disallow_all ``` + +# Small customizations + +You can directly overwrite files in `priv/static`, but you can also use`instance/static`. + +Since `priv` is tracked by git, it is recommended to put panel.html or thumbnail.jpeg and more under the `instance` directory if you do not use your own pleroma git repository. + +For example, `instance/static/instance/panel.html` + +This is when static_dir is the default. + +## Thumbnail + +Replace `priv/static/instance/thumbnail.jpeg` with your selfie or other neat picture. It will appear in [Pleroma Instances](http://distsn.org/pleroma-instances.html). + +Or put your file on `instance/static/instance/thumbnail.jpeg` when static_dir is default. + +## Instance-specific panel + +![instance-specific panel demo](/uploads/296b19ec806b130e0b49b16bfe29ce8a/image.png) + +To show the instance specific panel, set `show_instance_panel` to `true` in `config/dev.secret.exs`. You can modify its content by editing `priv/static/instance/panel.html`. + +Or put your file on `instance/static/instance/panel.html` when static_dir is default. + +## Background + +You can change the background of your Pleroma instance by uploading it to `priv/static/static`, and then changing `"background"` in `config/dev.secret.exs` accordingly. + +Or put your file on `instance/static/static/background.jpg` when static_dir is default. + +## Logo + +![logo modification demo](/uploads/c70b14de60fa74245e7f0dcfa695ebff/image.png) + +If you want to give a brand to your instance, look no further. You can change the logo of your instance by uploading it to `priv/static/static`, and then changing `logo` in `config/dev.secret.exs` accordingly. + +Or put your file on `instance/static/static/logo.png` when static_dir is default. + +## Terms of Service + +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 changing `priv/static/static/terms-of-service.html`. + +Or put your file on `instance/static/static/terms-of-service.html` when static_dir is default. From 1e7d68e8bf4777013e76fbf732cf81b6f1644320 Mon Sep 17 00:00:00 2001 From: Aries Date: Tue, 23 Jul 2019 09:55:58 +0900 Subject: [PATCH 2/3] Fix the sentence and add the setting example --- docs/config/static_dir.md | 51 +++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/docs/config/static_dir.md b/docs/config/static_dir.md index 0da1e6c9f..1326a5a17 100644 --- a/docs/config/static_dir.md +++ b/docs/config/static_dir.md @@ -7,7 +7,11 @@ config :pleroma, :instance, static_dir: "instance/static/", ``` -You can overwrite this value in your configuration to use a different static instance directory. +For example, edit `instance/static/instance/panel.html` . + +Alternatively, you can overwrite this value in your configuration to use a different static instance directory. + +This document is written assuming `instance/static/`. ## robots.txt @@ -19,46 +23,45 @@ If you want to generate a restrictive `robots.txt`, you can run the following mi mix pleroma.robots_txt disallow_all ``` -# Small customizations - -You can directly overwrite files in `priv/static`, but you can also use`instance/static`. - -Since `priv` is tracked by git, it is recommended to put panel.html or thumbnail.jpeg and more under the `instance` directory if you do not use your own pleroma git repository. - -For example, `instance/static/instance/panel.html` - -This is when static_dir is the default. - ## Thumbnail -Replace `priv/static/instance/thumbnail.jpeg` with your selfie or other neat picture. It will appear in [Pleroma Instances](http://distsn.org/pleroma-instances.html). - -Or put your file on `instance/static/instance/thumbnail.jpeg` when static_dir is default. +Put on `instance/static/instance/thumbnail.jpeg` with your selfie or other neat picture. It will appear in [Pleroma Instances](http://distsn.org/pleroma-instances.html). ## Instance-specific panel ![instance-specific panel demo](/uploads/296b19ec806b130e0b49b16bfe29ce8a/image.png) -To show the instance specific panel, set `show_instance_panel` to `true` in `config/dev.secret.exs`. You can modify its content by editing `priv/static/instance/panel.html`. - -Or put your file on `instance/static/instance/panel.html` when static_dir is default. +Create and Edit your file on `instance/static/instance/panel.html`. ## Background -You can change the background of your Pleroma instance by uploading it to `priv/static/static`, and then changing `"background"` in `config/dev.secret.exs` accordingly. +You can change the background of your Pleroma instance by uploading it to `instance/static/`, and then changing `background` in `config/prod.secret.exs` accordingly. -Or put your file on `instance/static/static/background.jpg` when static_dir is default. +If you put `instance/static/images/background.jpg` + +``` +config :pleroma, :frontend_configurations, + pleroma_fe: %{ + background: "/images/background.jpg" + } +``` ## Logo ![logo modification demo](/uploads/c70b14de60fa74245e7f0dcfa695ebff/image.png) -If you want to give a brand to your instance, look no further. You can change the logo of your instance by uploading it to `priv/static/static`, and then changing `logo` in `config/dev.secret.exs` accordingly. +If you want to give a brand to your instance, You can change the logo of your instance by uploading it to `instance/static/`. -Or put your file on `instance/static/static/logo.png` when static_dir is default. +Alternatively, you can specify the path with config. +If you put `instance/static/static/mylogo-file.png` + +``` +config :pleroma, :frontend_configurations, + pleroma_fe: %{ + logo: "/static/mylogo-file.png" + } +``` ## Terms of Service -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 changing `priv/static/static/terms-of-service.html`. - -Or put your file on `instance/static/static/terms-of-service.html` when static_dir is default. +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 changing `instance/static/static/terms-of-service.html`. From 9638da43e9f189e1ac46ab8857dd37f907c4d347 Mon Sep 17 00:00:00 2001 From: aries Date: Wed, 24 Jul 2019 01:50:56 +0000 Subject: [PATCH 3/3] Add text about gitignore --- docs/config/static_dir.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/config/static_dir.md b/docs/config/static_dir.md index 1326a5a17..5fb38c3de 100644 --- a/docs/config/static_dir.md +++ b/docs/config/static_dir.md @@ -13,6 +13,8 @@ Alternatively, you can overwrite this value in your configuration to use a diffe This document is written assuming `instance/static/`. +Or, if you want to manage your custom file in git repository, basically remove the `instance/` entry from `.gitignore`. + ## robots.txt By default, the `robots.txt` that ships in `priv/static/` is permissive. It allows well-behaved search engines to index all of your instance's URIs.