HyphenationPublishPlugin

0.1.0

A Publish plugin to hyphenate text
john-mueller/HyphenationPublishPlugin

What's New

Version 0.1.0

2020-03-10T02:19:58Z

Initial release of the Hyphenation Publish step

Hyphenation plugin for Publish

A Publish plugin that automatically hyphenates the text of your website using Hyphenation.

Installation

To install the plugin, add it as a dependency within your Package.swift manifest:

let package = Package(
    ...
    dependencies: [
        ...
        .package(url: "https://github.com/john-mueller/HyphenationPublishPlugin", from: "0.1.0")
    ],
    targets: [
        .target(
            ...
            dependencies: [
                ...
                "HyphenationPublishPlugin"
            ]
        )
    ]
    ...
)

Then import HyphenationPublishPlugin where you'd like to use it.

Usage

The hyphenate(using:) plugin can be installed in a publishing pipeline using the installPlugin(_:) step. The default separator character is U+00AD (soft hyphen) if the parameter is omitted.

import HyphenationPublishPlugin
...
try DeliciousRecipes().publish(using: [
    .installPlugin(.hyphenate())
    ...
])

You can create the Modifers for Ink's MarkdownParser directly using the global makeHyphenationModifiers(using:) method.

import HyphenationPublishPlugin
import Ink

let parser = MarkdownParser(modifiers: makeHyphenationModifiers(using: "-"))
print(parser.html(from: "hyphenate")) // prints "<p>hy-phen-ate</p>"

Description

  • Swift Tools 5.1.0
View More Packages from this Author

Dependencies

Last updated: Thu Mar 21 2024 00:34:19 GMT-0900 (Hawaii-Aleutian Daylight Time)