Skip to content

Vithanco/AppDetailsPublishPlugin

Repository files navigation

AppDetailsPublishPlugin

What is this?

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.

How do I use it?

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/lookup API 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.

What does it look ike?

Example rendered application details

Feedback

Merge requests most welcome.

Author

Matthew Flint, [email protected]

License

AppDetailsPublishPlugin is available under the MIT license. See the LICENSE file for more info.

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages