You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+73-3
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@
20
20
-[Docker](#docker)
21
21
-[API](#api)
22
22
-[Configuration](#configuration)
23
+
-[Themes and customizations](#themes-and-customizations)
23
24
-[Browser extensions](#browser-extensions)
24
25
-[Videos](#videos)
25
26
-[Integrations](#integrations)
@@ -93,8 +94,10 @@ All variables are optional except `JWT_SECRET` which is required on production.
93
94
|`SITE_NAME`| Name of the website |`Kutt`|`Your Site`|
94
95
|`DEFAULT_DOMAIN`| The domain address that this app runs on |`localhost:3000`|`yoursite.com`|
95
96
|`LINK_LENGTH`| The length of of shortened address |`6`|`5`|
97
+
|`LINK_CUSTOM_ALPHABET`| Alphabet used to generate custom addresses. Default value omits o, O, 0, i, I, l, 1, and j to avoid confusion when reading the URL. | (abcd..789) |`abcABC^&*()@`|
96
98
|`DISALLOW_REGISTRATION`| Disable registration. Note that if `MAIL_ENABLED` is set to false, then the registration would still be disabled since it relies on emails to sign up users. |`true`|`false`|
97
99
|`DISALLOW_ANONYMOUS_LINKS`| Disable anonymous link creation |`true`|`false`|
100
+
|`TRUST_PROXY`| If the app is running behind a proxy server like NGINX or Cloudflare and that it should get the IP address from that proxy server. If you're not using a proxy server then set this to false, otherwise users can override their IP address. |`true`|`false`|
98
101
|`DB_CLIENT`| Which database client to use. Supported clients: `pg` or `pg-native` for Postgres, `mysql2` for MySQL or MariaDB, `sqlite3` and `better-sqlite3` for SQLite. NOTE: `pg-native` and `better-sqlite3` are not installed by default, use `npm` to install them before use. |`sqlite3`|`pg`|
99
102
|`DB_HOST`| Database connection host. Only if you use Postgres or MySQL. |`localhost`|`your-db-host.com`|
100
103
|`DB_PORT`| Database port. Only if you use Postgres or MySQL. |`5432` (Postgres) |`3306` (MySQL) |
@@ -118,10 +121,77 @@ All variables are optional except `JWT_SECRET` which is required on production.
118
121
|`MAIL_PORT`| Email server port |`587`|`465` (SSL) |
119
122
|`MAIL_USER`| Email server user | - |`myuser`|
120
123
|`MAIL_PASSWORD`| Email server password for the user | - |`mypassword`|
121
-
|`MAIL_FROM`| Email address to send the user from | - |`some.address@yoursite.com`|
124
+
|`MAIL_FROM`| Email address to send the user from | - |`example@yoursite.com`|
122
125
|`MAIL_SECURE`| Whether use SSL for the email server connection |`false`|`true`|
123
-
|`REPORT_EMAIL`| The email address that will receive submitted reports | - |`[email protected]`|
124
-
|`CONTACT_EMAIL`| The support email address to show on the app | - |`[email protected]`|
126
+
|`REPORT_EMAIL`| The email address that will receive submitted reports | - |`[email protected]`|
127
+
|`CONTACT_EMAIL`| The support email address to show on the app | - |`[email protected]`|
128
+
129
+
## Themes and customizations
130
+
131
+
You can add styles, change images, or render custom HTML. Place your content inside the [`/custom`](./custom) folder according to below instructions.
132
+
133
+
#### How it works:
134
+
135
+
The structure of the custom folder is like this:
136
+
137
+
```
138
+
custom/
139
+
├─ css/
140
+
│ ├─ custom1.css
141
+
│ ├─ custom2.css
142
+
│ ├─ ...
143
+
├─ images/
144
+
│ ├─ logo.png
145
+
│ ├─ favicon.ico
146
+
│ ├─ ...
147
+
├─ views/
148
+
│ ├─ partials/
149
+
│ │ ├─ footer.hbs
150
+
│ ├─ 404.hbs
151
+
│ ├─ ...
152
+
```
153
+
154
+
-**css**: Put your CSS style files here. ([View example →](https://github.com/thedevs-network/kutt-customizations/tree/main/themes/crimson/css))
155
+
- You can put as many style files as you want: `custom1.css`, `custom2.css`, etc.
156
+
- If you name your style file `styles.css`, it will replace Kutt's original `styles.css` file.
157
+
- Each file will be accessible by `<your-site.com>/css/<file>.css`
158
+
-**images**: Put your images here. ([View example →](https://github.com/thedevs-network/kutt-customizations/tree/main/themes/crimson/images))
159
+
- Name them just like the files inside the [`/static/images/`](./static/images) folder to replace Kutt's original images.
160
+
- Each image will be accessible by `<your-site.com>/images/<image>.<image-format>`
161
+
-**views**: Custom HTML templates to render. ([View example →](https://github.com/thedevs-network/kutt-customizations/tree/main/themes/crimson/views))
162
+
- It should follow the same file naming and folder structure as [`/server/views`](./server/views)
163
+
- Although we try to keep the original file names unchanged, be aware that new changes on Kutt might break your custom views.
164
+
165
+
#### Example theme: Crimson
166
+
167
+
This is an example and official theme. Crimson includes custom styles, images, and views.
If you're building the image locally, then the `/custom` folder should already be included in your app.
181
+
182
+
If you're pulling the official image, make sure `/kutt/custom` volume is mounted or you have access to it. [View Docker compose example →](https://github.com/thedevs-network/kutt/blob/main/docker-compose.yml#L7)
183
+
184
+
Then, move your files to that volume. You can do it with this Docker command:
0 commit comments