Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import transcripts into episode template #61

Closed
wants to merge 12 commits into from

Conversation

gerhynes
Copy link
Contributor

In issue #15 Emma mentioned wanting to add the transcripts to the episode pages rather than just linking to them on GitHub.

Here's what I did as one possible solution:

  • Sourced the transcripts using gatsby-source-filesystem in gatsby-config.js.

  • Updated the GraphQL query in gatsby-node.js to filter out Markdown files that don't have a title in their frontmatter, so that only the episode Markdown files get turned into pages.

  • Added a link to the transcript Markdown files to the frontmatter of the episode Markdown files.

  • Updated the BlogPostByPath query in the episode.js template to also grab the transcript.

  • Added the transcript in a section tag below the episode in episode.js. (I originally ran into facebook/react#5479 where dangerouslySetInnerHTML does not work with nested

    tags.)

My code is here

I also set up a live demo on Netlify to check that it didn't just work on my local machine.

@emmabostian
Copy link
Collaborator

THIS LOOKS AWESOME THANK YOU! I'll take a look today :)

@gerhynes gerhynes closed this Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants