Edit Transcript link in theme

It appears that the code for the transcript is automatically part of {{ .content }} in a theme. Is there a way to separate it from .content? As it is I need to “display: none” in CSS, and then add the followin to change the text. Which I never would have know how to do if not for Link for Transcripts of podcasts

  {{ .Content }}
 {{ if .Params.transcript -}}
<a href="{{ .Params.transcript }}" >NEW TEXT HERE</a>{{ end }}

Including this makes for the transcript link in .content, as well as the params NEW TEXT

Edit: I now see that one can disable transcript via the plugin, but I don’t see a way to change the text for “transcript” itself.
So would a correct way be to “omit link” in the plugin and re-insert it via the if .Params.transcript element?

Transcripts doesn’t seem to have much documentation for these things.

Hello @letters!
I believe that you can turn this off in the settings for the transcripts plugin.

image

Yes, thank you. I edited the post when I figured out the difference between plugin on/off, as well as the (apparently undocumented) custom theme script there.

It would be nice if this is more flexible. The reason the transcript link is appended to the content is just so that it’s compatible with all themes without changes.

If I’m understanding the root problem, if the transcripts plug-in offered a way to customize the text link, would that mostly solve it?

Now that I figured it out, I’m fine, but it may be confusing for another used.

My flow was add this:

 {{ .Content }}
 {{ if .Params.transcript -}}
<a href="{{ .Params.transcript }}" >NEW TEXT HERE</a>{{ end }}

to a custom theme, and disable showing the link via the plugin. This could be confusing when the plugin could include “default text” that is conditional on the check box.

This way someone could uncheck it and customize further in custom theme, or check it and add custom text without modifying theme.

In my case, I needed to add a disclaimer that it is auto-generated, as someone took great issue with something they thought I said in the transcript. So to reduce liability, I added a (note: auto generated text)

Thanks, that’s good to know. We should probably add a disclaimer that it is auto-generated directly in the transcript, and then that can be edited out if someone goes through to fix problems in the transcript.

Something like:
Enable audio transcription
Add transcript link to posts
Enable Custom Text for link: ______________ (Default: Auto-Generated Transcript)

that uses the if .Params.transcript portion for .Content, and if Add transcript is unchecked, then someone could custom alter according to my post above.

I would suggest that the Params.transcript part have documented somewhere with the feature: I only found it in the help forum for someone else who was trying to customize, otherwise I would not have known how to change things for the theme/design of site.

1 Like