Update README.md
Reading time estimation plugin for Publish.
Start by adding the dependency to your project:
dependencies: [ ... .package(name: "ReadingTimePublishPlugin", url: "https://github.com/alexito4/ReadingTimePublishPlugin", from: "0.2.0") ],
Then assign it to your target:
targets: [ .target( name: "Foo", dependencies: [ "Publish", ... "ReadingTimePublishPlugin" ] ) ]
The plugin can then be used within any publishing pipeline like this:
import ReadingTimePublishPlugin ... try DeliciousRecipes().publish(using: [ ... .addMarkdownFiles(), .installPlugin(.readingTime()), ... ])
Note that it must be installed after the Items are created (in this case by addMarkdownFiles() ).
addMarkdownFiles()
Then you can add the information on your Theme:
HTML(... .p("\(item.readingTime.minutes) minutes"), ...
Alejandro Martinez | http://alejandromp.com | @alexito4
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
PublishReadingTime
Reading time estimation plugin for Publish.
Installation
Start by adding the dependency to your project:
Then assign it to your target:
Usage
The plugin can then be used within any publishing pipeline like this:
Note that it must be installed after the Items are created (in this case by
addMarkdownFiles()
).Then you can add the information on your Theme:
Author
Alejandro Martinez | http://alejandromp.com | @alexito4