Swiftpack.co - tgymnich/PygmentsPublishPlugin as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by tgymnich.
tgymnich/PygmentsPublishPlugin 0.1.0
🖍Syntax highlighting for Publish using pygments
⭐️ 0
🕓 1 year ago
macOS
.package(url: "https://github.com/tgymnich/PygmentsPublishPlugin.git", from: "0.1.0")

PygmentsPublishPlugin

A work in progress implemntation of a pygments plugin for use with Publish.

Install

Install pygments on your machine.

pip3 install pygments

In your Package.swift add:

.package(url: "https://github.com/tgymnich/PygmentsPublishPlugin.git", from: "0.0.4")

Setup

To load the plugin simply add these lines:


import PygmentsPublishPlugin

...

try MyWebsite().publish(
    ...
    plugins: [.pygmentize(withClassPrefix: "")]
])

CSS

You'll also need to add some CSS. Check out these examples

GitHub

link
Stars: 0
Last commit: 2 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

0.1.0
1 year ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics