https://github.com/tgymnich/pygmentspublishplugin
đź–ŤSyntax highlighting for Publish using pygments
https://github.com/tgymnich/pygmentspublishplugin
publish publish-plugin pygments swift syntax-highlighting
Last synced: 8 months ago
JSON representation
đź–ŤSyntax highlighting for Publish using pygments
- Host: GitHub
- URL: https://github.com/tgymnich/pygmentspublishplugin
- Owner: tgymnich
- License: mit
- Created: 2020-01-11T13:55:06.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-02-01T23:30:24.000Z (about 2 years ago)
- Last Synced: 2025-03-31T08:16:12.493Z (11 months ago)
- Topics: publish, publish-plugin, pygments, swift, syntax-highlighting
- Language: Swift
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PygmentsPublishPlugin
A work in progress implemntation of a pygments plugin for use with [Publish](https://github.com/johnsundell/publish).
# Install
Install pygments on your machine.
```
pip3 install pygments
```
In your Package.swift add:
```swift
.package(url: "https://github.com/tgymnich/PygmentsPublishPlugin.git", from: "0.0.4")
```
# Setup
To load the plugin simply add these lines:
```swift
import PygmentsPublishPlugin
...
try MyWebsite().publish(
...
plugins: [.pygmentize(withClassPrefix: "")]
])
```
# CSS
You'll also need to add some CSS. Check out these [examples](https://github.com/richleland/pygments-css)