How to display Swift code in your Medium article with syntax highlighting

Mark van Wijnen
2 min readAug 27, 2023

I like to write articles about Swift and the Apple frameworks and I’ve been doing so since 2020. The thing that annoyed me the most when writing those articles was that there was no easy way to insert code with syntax highlighting on Medium. So you had to use third-party solutions, such as Github gists, to accomplish that.

--

--

Mark van Wijnen

macOS/iPadOS/iOS/watchOS/visionOS developer and SwiftUI enthousiast. “Stay Hungry, Stay Foolish!” — Steve Jobs