This is a plugin for John Sundell's Publish static site generator, which fetches details for an AppStore app and renders it in a Publish page.
In main.swift:
import AppDetailsPublishPlugin
try MyWebsite()
.publish(using: [
.installPlugin(.appDetails())
])
This will use a default Renderer. You can make your own renderer by passing it into the appDetails function:
.installPlugin(.appDetails(MyAppDetailsRenderer())
In your page.md page, add a blockquote:
> appstore 982783760 gb The train app for commuters!
The parameters are:
- the App ID for the Apple AppStore
- the region where the app is published. I think this is an ISO 3166-1 alpha-2 country code.
- an optional subtitle. (While there is a subtitle field in AppStoreConnect, the
https://itunes.apple.com/lookupAPI doesn't return the subtitle)
Finally, create a CSS file to style the app details, and add it to your Publish project. You can find an example in this GitLab Snippet. My CSS skills are awful - I'm sure you can do better.
Merge requests most welcome.
Matthew Flint, m@tthew.org
AppDetailsPublishPlugin is available under the MIT license. See the LICENSE file for more info.
