Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support itms apps link (open app in app store) #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ page_title :
ios_app_id : 1234793120 # Required. Enter iOS app ID to automatically populate name, price and icons (e.g. 718043190).

appstore_link : # Automatically populates if not set and if iOS app ID is set. Otherwise enter manually.
use_itms_apps_link : false
playstore_link : # Enter Google Play Store URL.
presskit_download_link : # Enter a link to downloadable file or (e.g. public Dropbox link to a .zip file).
# Or upload your press kit file to assets and set path accordingly (e.g. "assets/your_press_kit.zip").
Expand Down
7 changes: 6 additions & 1 deletion _includes/appstoreimages.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,13 @@

// Set App Store link using the iOS app ID if it is not set manually in _config.yml
var $appStoreLink = $(".appStoreLink");
var url =appInfo.trackViewUrl;
if ("{{site.use_itms_apps_link}}" == "true") {
url = "itms-apps://apps.apple.com/us/app/" + appInfo.trackName +"/{{ site.ios_app_id }}";
}

if ($.trim($appStoreLink.attr('href')).length == 0) {
$($appStoreLink).attr("href", appInfo.trackViewUrl);
$($appStoreLink).attr("href", url);
}

console.info(appInfo);
Expand Down