Skip to content

Commit e17c805

Browse files
authored
Update README.md to add script instructions
1 parent 5bcc695 commit e17c805

File tree

1 file changed

+62
-3
lines changed

1 file changed

+62
-3
lines changed

README.md

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,55 @@ These are known Mastodon instances that have enabled Tangerine UI for their user
165165
Follow these instructions if you wish to add Tangerine UI as an available theme for your users on your instance.
166166
This will also allow you to set Tangerine UI as the default theme for your instance, while still letting your users change back to any of Mastodon's default themes in their Appearance settings.
167167

168+
#### Install using the included script
169+
Run the following commands as the `mastodon` user to install Tangerine UI using the [included script](https://github.com/nileane/TangerineUI-for-Mastodon/blob/main/install.sh.sample):
170+
171+
1. **Clone** the Tangerine UI repository
172+
```sh
173+
git clone https://github.com/nileane/TangerineUI-for-Mastodon.git ./TangerineUI
174+
cd TangerineUI
175+
```
176+
177+
2. **Copy the sample install script**.
178+
```sh
179+
cp install.sh.sample install.sh
180+
```
181+
182+
Make sure the Mastodon and Tangerine UI directory paths at the top of `install.sh` are correct:
183+
* Edit the line beginning with `TANGERINEUI=` to adjust the path to the Tangerine UI directory.
184+
* Edit the line beginning with `MASTODON=` to adjust the path to your Mastodon installation directory.
185+
186+
4. **Run the install script**.
187+
```sh
188+
./install.sh
189+
```
190+
191+
> [!NOTE]
192+
> To bypass all confirmation prompts, use `--skip-confirm`:
193+
> ```sh
194+
> ./install.sh --skip-confirm
195+
> ```
196+
197+
5. **\[Optional\] Add a localized name.** You can edit each desired language's locale file in `config/locales/[lang].yml` to add a localized string name for Tangerine UI. You need to do this for every language you expect your users to use. Otherwise, in their themes list, they will see the unlocalized theme name ("*tangerineui-purple*"), instead of a readable theme name ("*Tangerine UI (Purple)*").
198+
199+
```yml
200+
themes:
201+
contrast: Mastodon (High contrast)
202+
default: Mastodon (Dark)
203+
mastodon-light: Mastodon (Light)
204+
tangerineui: Tangerine UI
205+
tangerineui-purple: Tangerine UI (Purple)
206+
tangerineui-cherry: Tangerine UI (Cherry)
207+
tangerineui-lagoon: Tangerine UI (Lagoon)
208+
```
209+
210+
6. Restart your Mastodon instance for the changes to take effect.
211+
212+
> [!NOTE]
213+
> `./install.sh` can be run again to update Tangerine UI on your Mastodon instance.
214+
215+
#### Install manually (without the included script)
216+
168217
1. **Check your Mastodon version**. For Tangerine UI to work properly, you need to make sure you're installing the right version for your Mastodon instance. Please check the [Compatibility](#compatibility) section in this document before you proceed.
169218
170219
2. **Copy the files** from `mastodon/app/javascript/styles/` [in this repository](https://github.com/nileane/TangerineUI-for-Mastodon/tree/main/mastodon/app/javascript/styles/) to your Mastodon themes directory `app/javascript/styles/`:
@@ -187,7 +236,7 @@ tangerineui-cherry: styles/tangerineui-cherry.scss
187236
tangerineui-lagoon: styles/tangerineui-lagoon.scss
188237
```
189238
190-
4. **Add a localized name (optional).** You can edit each desired language's locale file in `config/locales/[lang].yml` to add a localized string name for Tangerine UI. You need to do this for every language you expect your users to use. Otherwise, in their themes list, they will see the unlocalized theme name ("*tangerineui-purple*"), instead of a readable theme name ("*Tangerine UI (Purple)*").
239+
4. **\[Optional\] Add a localized name.** You can edit each desired language's locale file in `config/locales/[lang].yml` to add a localized string name for Tangerine UI. You need to do this for every language you expect your users to use. Otherwise, in their themes list, they will see the unlocalized theme name ("*tangerineui-purple*"), instead of a readable theme name ("*Tangerine UI (Purple)*").
191240
192241
```yml
193242
themes:
@@ -200,7 +249,12 @@ themes:
200249
tangerineui-lagoon: Tangerine UI (Lagoon)
201250
```
202251
203-
5. **Compile theme assets and restart.** Run `RAILS_ENV=production bundle exec rails assets:precompile` and restart your Mastodon instance for the changes to take effect.
252+
5. **Compile**:
253+
```sh
254+
RAILS_ENV=production bundle exec rails assets:precompile
255+
```
256+
257+
6. **Restart** your Mastodon instance for the changes to take effect.
204258
205259
Your users should now be able to choose '*Tangerine UI*', '*Tangerine UI (Purple)*', '*Tangerine UI (Cherry)*', or '*Tangerine UI (Lagoon)*' as their site theme:
206260
@@ -230,7 +284,12 @@ cp -r $REPO/mastodon/app/javascript/styles/* $INSTALLDIR/app/javascript/styles
230284
cp -r $REPO/mastodon/app/javascript/skins/vanilla/* $INSTALLDIR/app/javascript/skins/vanilla
231285
```
232286
233-
4. **Compile theme assets and restart.** Run `RAILS_ENV=production bundle exec rails assets:precompile` and restart your Glitch-soc instance for the changes to take effect.
287+
4. **Compile**:
288+
```sh
289+
RAILS_ENV=production bundle exec rails assets:precompile
290+
```
291+
292+
5. **Restart** your Mastodon instance for the changes to take effect.
234293
235294
Your users should now be able to select Tangerine UI as a theme in their settings, under Flavours → Vanilla Mastodon → Skin
236295

0 commit comments

Comments
 (0)