Contents

brightdigit/TransistorPublishPlugin

A Publish plugin that makes it easy to embed Transistor podcasts in your posts on any Publish website.

Requirements

Apple Platforms

  • Xcode 14.3 or later
  • Swift 5.8 or later
  • macOS 12 or later deployment targets

Linux

  • Ubuntu 18.04 or later
  • Swift 5.8 or late

Installation

To install it into your Publish package, add it as a dependency within your Package.swift manifest:

let package = Package(
  ...
  dependencies: [
	  ...
	  .package(
		 url: "https://github.com/johnsundell/publish.git", 
		 from: "0.9.0"
	  ),
	  .package(
		url: "https://github.com/brightdigit/TransistorPublishPlugin.git",
		from: "1.0.0"
	  )
  ],
  targets: [
	.target(
	  ...
	  dependencies: [
		  ...
		  .product(name: "Publish", package: "publish"),
		  .product(name: "TransistorPublishPlugin", package: "TransistorPublishPlugin"),
	  ]
	)
  ]
  ...
)

Then import TransistorPublishPlugin wherever you’d like to use it:

import TransistorPublishPlugin

Usage

There are two pieces to using the plugin:

First, add the plugin to your build steps:

try DeliciousRecipes().publish(using: [
    .installPlugin(.transistor()),
    .addMarkdownFiles(),
    .copyResources(),
    .addFavoriteItems(),
    .addDefaultSectionTitles(),
    .generateHTML(withTheme: .delicious),
    .generateRSSFeed(including: [.recipes]),
    .generateSiteMap(),
])

Lastly, get the share url from your podcast episode. On Transistor, this is known as either the podcast episode's simple share url or social media landing page:

Copy the URL from the Episode List [Copy the URL from the Episode List]

Copy the URL from the Episode Page [Copy the URL from the Episode Page]

Copy the URL from the Social Page [Copy the URL from the Social Page]

In your article add a block quote with the url to a podcast episode:

A thing to know about iOS apps is, that in a lot of cases, people don’t need the cloud to store their data. It can just be stored on their phone.

> transistor https://share.transistor.fm/s/67771090

When you're building an app, you should consider whether you really need something stored in the cloud. **In the end, you could save a lot of time and money, if everything can be saved as a file, keep the data on the phone, and maybe only back that data up into cloud storage.**

Now you should see the embed on your rendered page:

[Screenshot of Transistor Embed]

References

License

This code is distributed under the MIT license. See the LICENSE file for more info.

Package Metadata

Repository: brightdigit/TransistorPublishPlugin

Stars: 1

Forks: 0

Open issues: 0

Default branch: main

Primary language: shell

License: MIT

Topics: publish, publish-plugin, static-site-generator, swift

README: README.md