Skip to content

Commit 6243638

Browse files
authored
Update documentation to reflect #15219 (#16442) (#16444)
Backport #16442 The move to render custom/public as within /assets in #15219 missed updating several documentation pages. This PR updates this documentation. Signed-off-by: Andrew Thornton <[email protected]>
1 parent 195c999 commit 6243638

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

docs/content/doc/advanced/adding-legal-pages.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ You absolutely must not place a general ToS or privacy statement that implies th
3232
Create or append to `/path/to/custom/templates/custom/extra_links_footer.tmpl`:
3333

3434
```go
35-
<a class="item" href="{{AppSubUrl}}/privacy.html">Privacy Policy</a>
35+
<a class="item" href="{{AppSubUrl}}/assets/privacy.html">Privacy Policy</a>
3636
```
3737

3838
Restart Gitea to see the changes.

docs/content/doc/advanced/customizing-gitea.en-us.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ For instance, let's say you are in Germany and must add the famously legally-req
102102
just place it under your "$GITEA_CUSTOM/public/" directory (for instance `$GITEA_CUSTOM/public/impressum.html`) and put a link to it in either `$GITEA_CUSTOM/templates/custom/extra_links.tmpl` or `$GITEA_CUSTOM/templates/custom/extra_links_footer.tmpl`.
103103

104104
To match the current style, the link should have the class name "item", and you can use `{{AppSubUrl}}` to get the base URL:
105-
`<a class="item" href="{{AppSubUrl}}/impressum.html">Impressum</a>`
105+
`<a class="item" href="{{AppSubUrl}}/assets/impressum.html">Impressum</a>`
106106

107107
For more information, see [Adding Legal Pages](https://docs.gitea.io/en-us/adding-legal-pages).
108108

@@ -174,21 +174,21 @@ You can display STL file directly in Gitea by adding:
174174
175175
if ($('.view-raw>a[href$=".stl" i]').length) {
176176
$("body").append(
177-
'<link href="/Madeleine.js/src/css/Madeleine.css" rel="stylesheet">'
177+
'<link href="/assets/Madeleine.js/src/css/Madeleine.css" rel="stylesheet">'
178178
);
179179
Promise.all([
180-
lS("/Madeleine.js/src/lib/stats.js"),
181-
lS("/Madeleine.js/src/lib/detector.js"),
182-
lS("/Madeleine.js/src/lib/three.min.js"),
183-
lS("/Madeleine.js/src/Madeleine.js"),
180+
lS("/assets/Madeleine.js/src/lib/stats.js"),
181+
lS("/assets/Madeleine.js/src/lib/detector.js"),
182+
lS("/assets/Madeleine.js/src/lib/three.min.js"),
183+
lS("/assets/Madeleine.js/src/Madeleine.js"),
184184
]).then(function () {
185185
$(".view-raw")
186186
.attr("id", "view-raw")
187187
.attr("style", "padding: 0;margin-bottom: -10px;");
188188
new Madeleine({
189189
target: "view-raw",
190190
data: $('.view-raw>a[href$=".stl" i]').attr("href"),
191-
path: "/Madeleine.js/src",
191+
path: "/assets/Madeleine.js/src",
192192
});
193193
$('.view-raw>a[href$=".stl"]').remove();
194194
});

docs/content/doc/advanced/customizing-gitea.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Gitea 引用 `custom` 目录中的自定义配置文件来覆盖配置、模板
6161
"custom/public/"目录下(比如 `custom/public/impressum.html`)并且将它与 `custom/templates/custom/extra_links.tmpl` 链接起来即可。
6262

6363
这个链接应当使用一个名为“item”的 class 来匹配当前样式,您可以使用 `{{AppSubUrl}}` 来获取 base URL:
64-
`<a class="item" href="{{AppSubUrl}}/impressum.html">Impressum</a>`
64+
`<a class="item" href="{{AppSubUrl}}/assets/impressum.html">Impressum</a>`
6565

6666
同理,您可以将页签添加到 `extra_tabs.tmpl` 中,使用同样的方式来添加页签。它的具体样式需要与
6767
`templates/repo/header.tmpl` 中已有的其他选项卡的样式匹配

docs/content/doc/advanced/external-renderers.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,5 +164,5 @@ And so you could write some CSS:
164164

165165
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`:
166166
```html
167-
<link type="text/css" href="{{AppSubUrl}}/css/my-style-XXXXX.css" />
167+
<link type="text/css" href="{{AppSubUrl}}/assets/css/my-style-XXXXX.css" />
168168
```

0 commit comments

Comments
 (0)