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: docs/content/doc/advanced/customizing-gitea.en-us.md
+9-13
Original file line number
Diff line number
Diff line change
@@ -58,22 +58,18 @@ To make Gitea serve custom public files (like pages and images), use the folder
58
58
For example, a file `image.png` stored in `$GITEA_CUSTOM/public/`, can be accessed with
59
59
the url `http://gitea.domain.tld/image.png`.
60
60
61
-
## Changing the default logo
61
+
## Changing the logo
62
62
63
-
To build a custom logo replace `assets/logo.svg` and run`make generate-images`. This will update
64
-
these customizable logo files which you can then place in `$GITEA_CUSTOM/public/img` on your server:
63
+
To build a custom logo clone the Gitea source repository, replace `assets/logo.svg` and run
64
+
`make generate-images`. This will update below output files which you can then place in `$GITEA_CUSTOM/public/img` on your server:
65
65
66
-
-`public/img/logo.svg`
67
-
-`public/img/logo.png`
68
-
-`public/img/favicon.png`
69
-
-`public/img/avatar_default.png`
70
-
-`public/img/apple-touch-icon.png`
66
+
-`public/img/logo.svg` - Used for favicon, site icon, app icon
67
+
-`public/img/logo.png` - Used for Open Graph
68
+
-`public/img/favicon.png` - Used as fallback for browsers that don't support SVG favicons
69
+
-`public/img/avatar_default.png` - Used as the default avatar image
70
+
-`public/img/apple-touch-icon.png` - Used on iOS devices for bookmarks
71
71
72
-
## Changing the default avatar
73
-
74
-
Either generate it via above method or place the png image at the following path:
75
-
76
-
-`$GITEA_CUSTOM/public/img/avatar_default.png`
72
+
In case the source image is not in vector format, you can attempt to convert a raster image using tools like [this](https://www.aconvert.com/image/png-to-svg/).
Copy file name to clipboardExpand all lines: docs/content/doc/advanced/external-renderers.en-us.md
+33
Original file line number
Diff line number
Diff line change
@@ -98,3 +98,36 @@ Once your configuration changes have been made, restart Gitea to have changes ta
98
98
99
99
**Note**: Prior to Gitea 1.12 there was a single `markup.sanitiser` section with keys that were redefined for multiple rules, however,
100
100
there were significant problems with this method of configuration necessitating configuration through multiple sections.
101
+
102
+
## Customizing CSS
103
+
The external renderer is specified in the .ini in the format `[markup.XXXXX]` and the HTML supplied by your external renderer will be wrapped in a `<div>` with classes `markup` and `XXXXX`. The `markup` class provides out of the box styling (as does `markdown` if `XXXXX` is `markdown`). Otherwise you can use these classes to specifically target the contents of your rendered HTML.
104
+
105
+
And so you could write some CSS:
106
+
```css
107
+
.markup.XXXXXhtml {
108
+
font-size: 100%;
109
+
overflow-y: scroll;
110
+
-webkit-text-size-adjust: 100%;
111
+
-ms-text-size-adjust: 100%;
112
+
}
113
+
114
+
.markup.XXXXXbody {
115
+
color: #444;
116
+
font-family: Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman', serif;
117
+
font-size: 12px;
118
+
line-height: 1.7;
119
+
padding: 1em;
120
+
margin: auto;
121
+
max-width: 42em;
122
+
background: #fefefe;
123
+
}
124
+
125
+
.markup.XXXXXp {
126
+
color: orangered;
127
+
}
128
+
```
129
+
130
+
Add your stylesheet to your custom directory e.g `custom/public/css/my-style-XXXXX.css` and import it using a custom header file `custom/templates/custom/header.tmpl`:
0 commit comments