soapbox/docs/customization.md

91 wiersze
3.7 KiB
Markdown
Czysty Zwykły widok Historia

2020-05-01 21:22:26 +00:00
# Customizing Soapbox
2020-05-01 21:44:28 +00:00
First [Install Soapbox](https://soapbox.pub/)
2020-05-01 21:22:26 +00:00
Soapbox supports customization of the user interface, to allow per instance branding and other features. Current customization features include:
* Instance name
* Site logo
2020-05-01 21:44:28 +00:00
* Promo panel list items, e.g. blog site link
2020-05-01 21:22:26 +00:00
* Favicon
* About page
* Terms of Service page
* Privacy Policy page
* Copyright Policy page
2020-05-28 22:22:22 +00:00
* Soapbox extensions
* Default settings
2020-05-01 21:44:28 +00:00
## Instance Name
Instance name is edited during the Pleroma installation step or via admin configuration
## Instance Description
Instance description is edited during the Pleroma installation step or via admin configuration
## Captcha on Registration Page
2020-05-28 22:22:22 +00:00
Use of the Captcha feature on the registration page is configured during the Pleroma installation step or via admin configuration
2020-05-01 21:44:28 +00:00
## Site Logo and Promo Panel List Items
The site logo and promo panel list items are customized by copying `soapbox.example.json` in the `static/instance` folder to `soapbox.json`.
The site logo, in SVG format, is rendered to be able to allow the site theme colors to appear in the less than 100% opaque sections of the logo.
The logo colors are rendered in a color that provides contrast for the site theme.
2020-05-01 21:44:28 +00:00
2020-05-28 22:22:22 +00:00
The `navlinks` section of the `soapbox.json` file references the links that are displayed at the bottom of the About, Terms of Service, Privacy Policy and Copyright Policy (DMCA) pages.
After editing your HTML files and folder names, re-create the webpack and restart the soapbox-fe service to effect the changes.
Following is an example of the contents of `soapbox.example.json`:
2020-05-01 21:44:28 +00:00
```
{
"logo": "https://media.gleasonator.com/site_uploads/files/000/000/002/original/logo.svg",
"promoPanel": {
"items": [{
"icon": "area-chart",
"text": "Our Site stats",
"url": "https://fediverse.network/example.com"
}, {
"icon": "comment-o",
"text": "Our Site blog",
"url": "https://blog.example.com"
}]
},
"extensions": {
"patron": false
},
"defaultSettings": {
"autoPlayGif": false,
2020-05-28 22:22:22 +00:00
"theme": "azure"
},
"copyright": "?2020. Copying is an act of love. Please copy and share.",
"navlinks": {
"homeFooter": [
{ "title": "About", "url": "/about" },
{ "title": "Terms of Service", "url": "/about/tos" },
{ "title": "Privacy Policy", "url": "/about/privacy" },
{ "title": "DMCA", "url": "/about/dmca" },
{ "title": "Source Code", "url": "/about#opensource" }
]
2020-05-01 21:44:28 +00:00
}
}
```
## Favicon
The favicon is customized by dropping a favicon.png file into the `/static` folder.
2020-05-28 22:22:22 +00:00
Re-create the webpack and start the soapbox-fe service to effect the changes.
2020-05-01 21:44:28 +00:00
2020-05-28 22:22:22 +00:00
## About Page, Terms of Service Page, Privacy Policy Page and Copyright Policy (DMCA) Page
These pages are all available for editing in the `static/instance/about.example` folder, as template files, named as:
* index.html
* tos.html
* privacy.html
* dmca.html
2020-05-28 22:22:22 +00:00
The `soapbox.json` file navlinks section's default URL valuess are pointing to the above file location, when the `about.example` folder is renamed to `about`
These four template files have placeholders in them, e.g. "Your_Instance", that should be edited to match your Soapbox instance configuration, and will be meaningless to your users until you edit them.
2020-05-28 22:22:22 +00:00
These pages will not become available resources on your instance until you rename the `static/instance/about.example` folder to `static/instance/about`, re-create the webpack and start the soapbox-fe service.
## Source Code Link
The Source Code link in the `soapbox.json` file, if used, references a bookmark in the `index.html` file in the `about` folder. The template index.html file has a default bookmark and URL defined in it that you can edit.