docs: fix build on relative path

it worked on netlify but not cloudflare pages
This commit is contained in:
TonyRL 2023-04-27 13:30:19 +00:00
parent 5b6d7cb524
commit 1e8d030e0f
3 changed files with 23 additions and 3 deletions

View File

@ -20,6 +20,7 @@ on:
permissions:
contents: read
pull-requests: write
concurrency:
group: ${{ github.head_ref }}
@ -63,6 +64,7 @@ jobs:
with:
actions: 'add-labels'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
labels: 'Route Test: Failed'
- name: Test Docker image

View File

@ -134,7 +134,16 @@ All templates should be placed in the namespace's `templates` folder with the `.
Here's an example taken from the [furstar](https://github.com/DIYgod/RSSHub/blob/master/lib/v2/furstar) namespace:
<<< @/../lib/v2/furstar/templates/author.art
```html
<div>
<img src="{{ avatar }}" />
{{ if link !== null }}
<a href="{{ link }}">{{name}}</a>
{{ else }}
<a href="#">{{name}}</a>
{{ /if }}
</div>
```
```js
const path = require('path');

View File

@ -133,10 +133,19 @@ RSSHub 会将所有路由命名空间的文件夹名附加到路由前面。路
下面是在 [furstar](https://github.com/DIYgod/RSSHub/blob/master/lib/v2/furstar) 命名空间中示例:
<<< @/../lib/v2/furstar/templates/author.art
<!-- markdownlint-disable MD046 -->
```html
<div>
<img src="{{ avatar }}" />
{{ if link !== null }}
<a href="{{ link }}">{{name}}</a>
{{ else }}
<a href="#">{{name}}</a>
{{ /if }}
</div>
```
```js
const path = require('path');
const { art } = require('@/utils/render');