Skip to content

Commit

Permalink
Update mp3 link
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacai2050 committed Jan 6, 2024
1 parent 09a74c7 commit 06218a0
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.111.3'
hugo-version: 'latest'
extended: true
- name: Setup Pages
id: pages
Expand Down
1 change: 1 addition & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ enableGitInfo = true
[params]
logo = true
mainSections = ["post", "podcast"]
mp3Root = "https://liujiacai.net/cdn-mp3/"
git_repo = "https://github.com/RustTalk/rusttalk.github.io"
fadian = """
#### 欢迎听众[打赏支持](https://liujiacai.net/donate/),您的支持是我不断创作的动力🍻
Expand Down
3 changes: 1 addition & 2 deletions content/podcast/009.org
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#+TITLE: 009. 卡比卡比的开源贡献之旅
#+DATE: 2023-12-16T21:14:03+0800
#+LASTMOD: 2023-12-17T09:20:39+0800
#+LASTMOD: 2024-01-06T22:16:48+0800
#+OPTIONS: toc:nil num:nil
#+STARTUP: content
#+PODCAST_DURATION: 01:17:56
#+PODCAST_LENGTH: 33023067
#+PODCAST_IMAGE_SRC: guests/kabikabi.jpg
#+PODCAST_MP3: https://en.liujiacai.net/podcast/RustTalk/009.mp3

本期嘉宾是卡比卡比,虽然他毕业不到三年,但已经成多个开源项目的重度参与者,而且已经是 Apache Arrow 的 PMC,他是怎么做得到?他的开源经历,对我们能有什么启发?这些问题都可以在本期节目中找到答案。

Expand Down
34 changes: 20 additions & 14 deletions layouts/podcast/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
{{ end -}}
{{ with .Site.Params.Podcast.Owner -}}
<itunes:owner>
{{ with .name }}<itunes:name>{{ . }}</itunes:name>{{ end }}
{{ with .email }}<itunes:email>{{ . }}</itunes:email>{{ end }}
{{ with .name }}<itunes:name>{{ . }}</itunes:name>{{ end }}
{{ with .email }}<itunes:email>{{ . }}</itunes:email>{{ end }}
</itunes:owner>
{{ end -}}
{{ with .Site.Params.Podcast.Description }}<itunes:summary>{{ . }}</itunes:summary>{{ end }}
Expand Down Expand Up @@ -85,16 +85,22 @@
{{ if .Params.podcast_mp3}}
<enclosure url="{{.Params.podcast_mp3}}" type="audio/mpeg" length='{{ .Params.podcast_length }}'/>
{{ else }}
<enclosure url="https://en.liujiacai.net/podcast/RustTalk/{{.File.BaseFileName}}.mp3" type="audio/mpeg"/>
{{end}}
{{ with .Params.podcast_duration}}<itunes:duration>{{ . }}</itunes:duration>{{end}}
{{ with .Params.podcast_image_src }}{{ $image := resources.Get . }}<itunes:image href="{{ $image.Permalink }}" />{{ end }}
{{ with .Params.podcast.episode }}<itunes:episode>{{ . }}</itunes:episode>{{ end }}
{{ with .Params.podcast.episodeType }}<itunes:episodeType>{{ . }}</itunes:episodeType>{{ end }}
{{ with .Params.podcast.season }}<itunes:season>{{ . }}</itunes:season>{{ end }}
{{ with .Params.podcast.block }}<itunes:block>{{ . }}</itunes:block>{{ end }}
<itunes:explicit>{{ if .Params.podcast.explicit }}true{{ else }}false{{ end }}</itunes:explicit>
</item>
{{ end }}
</channel>
<enclosure url='{{ urls.JoinPath .Site.Params.mp3Root "RustTalk" .File.BaseFileName}}.mp3' type="audio/mpeg"

{{ with .Params.podcast_length }}
length='{{ . }}'
{{end}}
/>

{{end}}
{{ with .Params.podcast_duration}}<itunes:duration>{{ . }}</itunes:duration>{{end}}
{{ with .Params.podcast_image_src }}{{ $image := resources.Get . }}<itunes:image href="{{ $image.Permalink }}" />{{ end }}
{{ with .Params.podcast.episode }}<itunes:episode>{{ . }}</itunes:episode>{{ end }}
{{ with .Params.podcast.episodeType }}<itunes:episodeType>{{ . }}</itunes:episodeType>{{ end }}
{{ with .Params.podcast.season }}<itunes:season>{{ . }}</itunes:season>{{ end }}
{{ with .Params.podcast.block }}<itunes:block>{{ . }}</itunes:block>{{ end }}
<itunes:explicit>{{ if .Params.podcast.explicit }}true{{ else }}false{{ end }}</itunes:explicit>
</item>
{{ end }}
</channel>
</rss>
109 changes: 58 additions & 51 deletions layouts/podcast/single.html
Original file line number Diff line number Diff line change
@@ -1,63 +1,70 @@
{{ define "main" -}}
<main class="main layout__main">
<article class="{{ with .Section }}section-{{ . | urlize }} {{ end }}single-view">
<header>
<h1 class="title {{ if $.Param "submitted" | default false }}title-submitted{{ end }}">{{ .Title }}</h1>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
{{ if .Params.tags }}{{ partial "tags.html" . }}{{ end -}}
</header>
<article class="{{ with .Section }}section-{{ . | urlize }} {{ end }}single-view">
<header>
<h1 class="title {{ if $.Param "submitted" | default false }}title-submitted{{ end }}">{{ .Title }}</h1>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
{{ if .Params.tags }}{{ partial "tags.html" . }}{{ end -}}
</header>

{{if .Params.podcast_iframe -}}
<iframe src="{{ .Params.podcast_iframe }}" width="100%" frameborder="0" scrolling="no"></iframe>
{{ else -}}
{{ $src := ($.Param "podcast_mp3" | absURL) -}}
<figure class="podcast">
<audio controls preload="{{ .Site.Params.Podcast.preload | default "metadata" }}"><source src="{{ $src }}" type="audio/mpeg"></audio>
</figure>
{{if .Params.podcast_iframe -}}
<iframe src="{{ .Params.podcast_iframe }}" width="100%" frameborder="0" scrolling="no"></iframe>
{{ else -}}
{{ $src := ($.Param "podcast_mp3" | absURL) -}}
<figure class="podcast">
<audio controls preload="{{ .Site.Params.Podcast.preload | default "metadata" }}">
{{ if .Params.podcast_mp3 }}
<source src="{{ .Params.podcast_mp3 }}" type="audio/mpeg">
{{ else }}
<source src='{{ urls.JoinPath .Site.Params.mp3Root "RustTalk" .File.BaseFileName}}.mp3' type="audio/mpeg">
{{end}}

{{if .Params.podcast_image_src -}}
{{ $resource := resources.Get .Params.podcast_image_src}}
<figure class="image {{ .Params.podcast_image_class | default "right" }}"><img src="{{ $resource.RelPermalink }}" width="{{ .Params.podcast_image_width | default "250" }}" alt="{{ .Params.podcast_image_alt }}" title="{{ .Params.podcast_image_alt }}"></figure>
{{ end -}}
{{ end -}}
</audio>
</figure>

{{if .Params.podcast_image_src -}}
{{ $resource := resources.Get .Params.podcast_image_src}}
<figure class="image {{ .Params.podcast_image_class | default "right" }}"><img src="{{ $resource.RelPermalink }}" width="{{ .Params.podcast_image_width | default "250" }}" alt="{{ .Params.podcast_image_alt }}" title="{{ .Params.podcast_image_alt }}"></figure>
{{ end -}}
{{ end -}}

<div class="content">

{{ with .Site.Params.fadian }}
<div class="content">

<div class="head-blockquote">
{{ . | markdownify}}
</div>
{{ with .Site.Params.fadian }}

{{ end }}
<div class="head-blockquote">
{{ . | markdownify}}
</div>

{{ end }}

{{ .Content }}
{{ .Content }}

<h2>
收听方式
</h2>
<ul>
<li>
国内:<a href="https://www.xiaoyuzhoufm.com/podcast/61d06724ee197a3aac3dab61">小宇宙</a><a href="/images/weixin.jpg">微信公众号</a><a href="/podcast/index.xml">RSS</a>
</li>
<li>
国外:<a href="https://podcasters.spotify.com/pod/show/rusttalk">Spotify for Podcasters</a><a href="https://podcasts.apple.com/us/podcast/rusttalk/id1602908335">Apple Podcasts</a><a href="https://anchor.fm/s/d2d6f254/podcast/rss">RSS</a>
</li>
</ul>
<img src="/misc/xyz-qrcode.webp"/>
<h2>
收听方式
</h2>
<ul>
<li>
国内:<a href="https://www.xiaoyuzhoufm.com/podcast/61d06724ee197a3aac3dab61">小宇宙</a><a href="/images/weixin.jpg">微信公众号</a><a href="/podcast/index.xml">RSS</a>
</li>
<li>
国外:<a href="https://podcasters.spotify.com/pod/show/rusttalk">Spotify for Podcasters</a><a href="https://podcasts.apple.com/us/podcast/rusttalk/id1602908335">Apple Podcasts</a><a href="https://anchor.fm/s/d2d6f254/podcast/rss">RSS</a>
</li>
</ul>
<img src="/misc/xyz-qrcode.webp"/>

<h2>
反馈
</h2>
<ul>
<li>
发现内容错误或链接失效?欢迎<a href="{{ .Site.Params.git_repo}}/blob/master/content/{{ .File.Path }}">提交 PR</a>
</li>
<li>对节目有想法或建议?欢迎<a href="mailto:{{ .Site.Author.email }}">来信交流️</a></li>
</ul>
</div>
</article>
<h2>
反馈
</h2>
<ul>
<li>
发现内容错误或链接失效?欢迎<a href="{{ .Site.Params.git_repo}}/blob/master/content/{{ .File.Path }}">提交 PR</a>
</li>
<li>对节目有想法或建议?欢迎<a href="mailto:{{ .Site.Author.email }}">来信交流️</a></li>
</ul>
</div>
</article>
</main>

<style>
Expand All @@ -67,9 +74,9 @@ <h2>
text-decoration-thickness: 2px;
}
figure figcaption {
text-align: center;
font-style: italic;
color: grey;
text-align: center;
font-style: italic;
color: grey;
}

.head-blockquote {
Expand Down

0 comments on commit 06218a0

Please sign in to comment.