Skip to content

Commit 702e8df

Browse files
IDPROD-2142 part2: generate docs index.html page (#302)
Now generating a `docs/index.html` page that links to the documentation for all of the modules in the repo that have documentation enabled (`Stripe` & `StripeIdentity`). The index page reuses the same html template as the Jazzy theme we use to generate our docs. The descriptions that display for each module are populated by the summary in their podspec file. With the next deploy, this page will be visible at https://stripe.dev/stripe-ios.
1 parent 987a7d0 commit 702e8df

File tree

10 files changed

+220
-94
lines changed

10 files changed

+220
-94
lines changed

.jazzy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ github_url: https://github.com/stripe/stripe-ios
88
github_file_prefix: https://github.com/stripe/stripe-ios/tree/master
99
skip_undocumented: true
1010
hide_documentation_coverage: true
11-
theme: fullwidth
11+
theme: .jazzy/theme

.jazzy/theme/templates/doc.mustache

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,16 @@
3131
{{> header}}
3232

3333
<p class="breadcrumbs">
34-
<a class="breadcrumb" href="{{path_to_root}}index.html">{{module_name}} Reference</a>
34+
{{#is_root_index}}
35+
<a class="breadcrumb" href="{{path_to_root}}index.html">Stripe iOS SDKs</a>
36+
{{/is_root_index}}
37+
{{^is_root_index}}
38+
<a class="breadcrumb" href="{{path_to_root}}../index.html">Stripe iOS SDKs</a>
39+
<img class="carat" src="{{path_to_root}}img/carat.png" />
40+
<a class="breadcrumb" href="{{path_to_root}}index.html">{{module_name}}</a>
3541
<img class="carat" src="{{path_to_root}}img/carat.png" />
3642
{{name}} {{kind}} Reference
43+
{{/is_root_index}}
3744
</p>
3845

3946
<div class="content-wrapper">

.jazzy/theme/templates/header.mustache

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<header class="header">
22
<p class="header-col header-col--primary">
3+
{{#is_root_index}}
34
<a class="header-link" href="{{path_to_root}}index.html">
5+
{{/is_root_index}}
6+
{{^is_root_index}}
7+
<a class="header-link" href="{{path_to_root}}../index.html">
8+
{{/is_root_index}}
49
{{docs_title}}
510
</a>
611
{{#doc_coverage}} ({{doc_coverage}}% documented){{/doc_coverage}}

.jazzy/theme/templates/index.mustache

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{#modules}}
2+
<a href="{{path_to_root}}{{directory}}/index.html"><h2 class="heading">{{name}}</h2></a>
3+
{{summary}}
4+
{{/modules}}

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ source "https://rubygems.org"
33
gem "fastlane"
44
gem "cocoapods"
55

6-
gem "jazzy", "~> 0.13.6"
6+
gem "jazzy", "~> 0.13.7"
7+
gem "mustache", "~> 1.1.1"
78

89
gem "xcode-install", "~> 2.6"

Gemfile.lock

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ GEM
188188
httpclient (2.8.3)
189189
i18n (1.8.7)
190190
concurrent-ruby (~> 1.0)
191-
jazzy (0.13.6)
191+
jazzy (0.13.7)
192192
cocoapods (~> 1.5)
193193
mustache (~> 1.1)
194194
open4
@@ -283,7 +283,8 @@ PLATFORMS
283283
DEPENDENCIES
284284
cocoapods
285285
fastlane
286-
jazzy (~> 0.13.6)
286+
jazzy (~> 0.13.7)
287+
mustache (~> 1.1.1)
287288
xcode-install (~> 2.6)
288289

289290
BUNDLED WITH

Stripe.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ Pod::Spec.new do |s|
55
# Instead, update the VERSION file and run ./ci_scripts/update_version.sh
66
s.version = '21.7.0'
77

8-
s.summary = 'Stripe is a web-based API for accepting payments online.'
8+
s.summary = 'Accept online payments using Stripe.'
99
s.license = { :type => 'MIT', :file => 'LICENSE' }
1010
s.homepage = 'https://stripe.com/docs/mobile/ios'
1111
s.authors = { 'Stripe' => '[email protected]' }
1212
s.source = { :git => 'https://github.com/stripe/stripe-ios.git', :tag => "#{s.version}" }
13-
s.frameworks = 'Foundation', 'Security', 'WebKit', 'PassKit', 'Contacts', 'CoreLocation'
13+
s.frameworks = 'Foundation', 'Security', 'WebKit', 'PassKit', 'Contacts', 'CoreLocation', 'UIKit'
1414
s.requires_arc = true
1515
s.platform = :ios
1616
s.ios.deployment_target = '11.0'

StripeCore.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
1111
s.homepage = 'https://stripe.com/docs/mobile/ios'
1212
s.authors = { 'Stripe' => '[email protected]' }
1313
s.source = { :git => 'https://github.com/stripe/stripe-ios.git', :tag => "#{s.version}" }
14-
s.frameworks = 'Foundation', 'Security', 'WebKit', 'PassKit', 'Contacts', 'CoreLocation'
14+
s.frameworks = 'Foundation', 'UIKit'
1515
s.requires_arc = true
1616
s.platform = :ios
1717
s.ios.deployment_target = '11.0'

StripeIdentity.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ Pod::Spec.new do |s|
55
# Instead, update the VERSION file and run ./ci_scripts/update_version.sh
66
s.version = '21.7.0'
77

8-
s.summary = 'StripeIdentity is a web-based API that confirms the identity of global users.'
8+
s.summary = 'Securely capture ID documents and selfies on iOS for use with Stripe\'s Identity API to confirm the identity of global users.'
99
s.license = { :type => 'MIT', :file => 'LICENSE' }
10-
s.homepage = 'https://stripe.com/docs/mobile/ios'
10+
s.homepage = 'https://stripe.com/identity'
1111
s.authors = { 'Stripe' => '[email protected]' }
1212
s.source = { :git => 'https://github.com/stripe/stripe-ios.git', :tag => "#{s.version}" }
13-
s.frameworks = 'Foundation', 'Security', 'WebKit', 'PassKit', 'Contacts', 'CoreLocation'
13+
s.frameworks = 'Foundation', 'WebKit', 'UIKit'
1414
s.requires_arc = true
1515
s.platform = :ios
1616
s.ios.deployment_target = '11.0'

0 commit comments

Comments
 (0)