Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ pages:
columns:
- size: full
widgets:
$include: rss.yml
- $include: rss.yml
- name: News
columns:
- size: full
widgets:
- type: group
widgets:
$include: rss.yml
- $include: rss.yml
- type: reddit
subreddit: news
```
Expand Down
2 changes: 1 addition & 1 deletion internal/glance/templates/video-card-contents.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ define "video-card-contents" }}
<img class="video-thumbnail thumbnail" loading="lazy" src="{{ .ThumbnailUrl }}" alt="">
<a href="{{ .Url | safeURL }}" target="_blank" rel="noreferrer"><img class="video-thumbnail thumbnail" loading="lazy" src="{{ .ThumbnailUrl }}" alt=""></a>
<div class="margin-top-10 margin-bottom-widget flex flex-column grow padding-inline-widget">
<a class="text-truncate-2-lines margin-bottom-auto color-primary-if-not-visited" href="{{ .Url | safeURL }}" target="_blank" rel="noreferrer">{{ .Title }}</a>
<ul class="list-horizontal-text flex-nowrap margin-top-7">
Expand Down
10 changes: 9 additions & 1 deletion internal/glance/widget-videos.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,20 @@ func fetchYoutubeChannelUploads(channelOrPlaylistIDs []string, videoUrlTemplate
}
}

var authorUrl string
if videoUrlTemplate == "" {
authorUrl = response.ChannelLink + "/videos"
} else {
baseUrl := strings.Split(videoUrlTemplate, "/watch")[0]
authorUrl = baseUrl + strings.TrimPrefix(response.ChannelLink, "https://www.youtube.com")
}

videos = append(videos, video{
ThumbnailUrl: v.Group.Thumbnail.Url,
Title: v.Title,
Url: videoUrl,
Author: response.Channel,
AuthorUrl: response.ChannelLink + "/videos",
AuthorUrl: authorUrl,
TimePosted: parseYoutubeFeedTime(v.Published),
})
}
Expand Down