Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
GitHub Pages を Web API として使う
Search
Kite
June 11, 2016
Programming
2
3.5k
GitHub Pages を Web API として使う
GitHub の API ではなく、GitHub のサービスの一つである GitHub Pagesを使って、サーバなしで Web API を提供
Kite
June 11, 2016
Tweet
Share
More Decks by Kite
See All by Kite
個人からチームまで、情報・タスク管理の一元化はNotionにお任せ!
ixkaito
12
74k
WordPress でも大丈夫!実例で見るウェブパフォーマンス改善
ixkaito
7
5.3k
WordPress でも大丈夫!実例で見るウェブパフォーマンス改善
ixkaito
22
7.8k
タイポグラフィベーシック (+ デザインアイデア)
ixkaito
13
4k
WordPress の今とこれから
ixkaito
1
1.9k
世界で一人しかできない WordPress コアを写経する話 ― 修行の先に見たものとは?
ixkaito
5
15k
WordPress の今とこれから
ixkaito
4
2.6k
Let's Think about Right Answers of Design and UI/UX
ixkaito
0
410
ブラウザのデフォルトスタイルを見てみよう
ixkaito
3
1.5k
Other Decks in Programming
See All in Programming
What’s Fair is FAIR: A Decentralised Future for WordPress Distribution
rmccue
0
180
Promise.tryで実現する新しいエラーハンドリング New error handling with Promise try
bicstone
3
450
Eloquentを使ってどこまでコードの治安を保てるのか?を新人が考察してみた
itokoh0405
0
3.2k
CloudNative Days Winter 2025: 一週間で作る低レイヤコンテナランタイム
ternbusty
4
720
AIの弱点、やっぱりプログラミングは人間が(も)勉強しよう / YAPC AI and Programming
kishida
9
4.6k
SUZURIの規約違反チェックにおけるクリエイタフィードバックの試⾏錯誤/Trial and Error in Creator Feedback for SUZURI's Terms of Service Violation Checks
ae14watanabe
1
150
オフライン対応!Flutterアプリに全文検索エンジンを実装する @FlutterKaigi2025
itsmedreamwalker
2
210
乱雑なコードの整理から学ぶ設計の初歩
masuda220
PRO
31
12k
Flutterアプリ運用の現場で役立った監視Tips 5選
ostk0069
1
450
AI 時代だからこそ抑えたい「価値のある」PHP ユニットテストを書く技術 #phpconfuk / phpcon-fukuoka-2025
shogogg
1
460
Querying Design System デザインシステムの意思決定を支える構造検索
ikumatadokoro
1
1.1k
イベントストーミングのはじめかた / Getting Started with Event Storming
nrslib
1
510
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
670
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
A Modern Web Designer's Workflow
chriscoyier
697
190k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.8k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
GitHub's CSS Performance
jonrohan
1032
470k
Transcript
Use GitHub Pages as a Web API GitHub Pages Λ
Web API ͱͯ͠͏ Kansai Front-end users group 2016.06.11 ϑϩϯτΤϯυͷਓ͕Web APIΛޠΔձ
WordPress core contributor Ruby on Rails contributor Wocker developer Bathe
developer Frasco developer Web & graphic designer Programmer Kite KITERETZ inc. CEO & Funder ! kite.koga " ixkaito # ixkaito WHO AM I?
ຊͷςʔϚ GitHub API Ͱͳ͘ɺ Jekyll Pages API Λ͍ GitHub Pages
Ͱ Web API Λ ఏڙ͢Δ͜ͱͰ͋Δɻ
Jekyll Pages API ͱ • Jekyll ͷϓϥάΠϯ • Jekyll αΠτͷͯ͢ͷϖʔδɺߘɺυΩϡϝϯτɺ੩త
ϑΝΠϧͷσʔλΛجʹ JSON ϑΝΠϧΛੜ͢Δ • API http://example.com/api/v1/pages.json ͷΑ͏ͳURL ͰऔಘՄೳ
GitHub Pages Jekyll Λ͏ ϝϦοτ • GitHub Pages Λ͏͜ͱͰɺΠϯϑϥͷϝϯςφϯε͕ෆཁ
• Git ʹΑΔιʔεཧ • API ͷΧελϚΠζ͕ࣗ༝ • ελςΟοΫͳϑΝΠϧͷ৴ͳͷͰɺηΩϡϦςΟϦεΫ͕͍ • ύϒϦοΫϦϙδτϦͰ͔ͭಠࣗυϝΠϯΛ༻͠ͳ͍߹ແ ྉ • ଞͷαʔϏεͷҠߦ༰қ
GitHub Pages GitHub Pages dependencies ʹ͋Δ ϓϥάΠϯҎ֎αϙʔτ͍ͯ͠ͳ͍
ͦͷ·· gh-pages ϒϥϯνͳͲʹϓογϡͯ͠ɺJSON ϑΝ Πϧੜ͞Εͳ͍
ղܾํ๏ • ϩʔΧϧͰੜ͠ɺखಈͰ gh-pages ϒϥϯνͳͲʹϓογϡ ͢Δ • Travis CI ͳͲͷ֎෦αʔϏεΛͬͯࣗಈԽ͢Δ
• Rakefile ͳͲͰσϓϩΠΛ؆୯ʹ͢Δ
खಈσϓϩΠ ϝϦοτ • ֶशίετ͕͍ • ͙͢ʹެ։͞ΕΔ σϝϦοτ • ໘͍͘͞
Travis CI ͳͲʹΑΔσϓϩΠ ϝϦοτ • ௨ৗͷ GitHub Pages/Jekyll ͷӡ༻ͱશ͘ಉ͡ σϝϦοτ
• Travis CI ͳͲͷֶशίετ͕͔͔Δ • GitHub Pages ʹެ։͞ΕΔ·Ͱ͕͔͔࣌ؒΔ
Travis CI ʹΑΔσϓϩΠͷࣄྫ IUUQTHJUIVCDPNDXEJTBTUFSJOGPSNBUJPO
Rakefile ͳͲʹΑΔσϓϩΠ ϝϦοτ • ֎෦αʔϏεʹཔΔඞཁ͕ͳ͘ɺσϓϩΠͷख͔͔ؒΒͳ͍ • GitHub Pages ʹ͙͢ʹެ։͞ΕΔ •
Travis CI ͳͲΑΓֶशίετ͕͍ σϝϦοτ • Rakefile Λ࡞Δඞཁ͕͋Δ • `git push` Ҏ֎ʹɺσϓϩΠ༻ͷίϚϯυΛ࣮ߦ͢Δඞཁ͕͋Δ
Rakefile ͷϘΠϥʔϓϨʔτ IUUQTHJUIVCDPNJYLBJUPKFLZMMBQJCPJMFSQMBUF
͍ํ 1. Jekyll API Boilerplate ΛϑΥʔΫ 2. ϑΥʔΫͨ͠ϦϙδτϦΛΫϩʔϯ 3. Ϋϩʔϯͨ͠σΟϨΫτϦͰԼهΛ࣮ߦ
$ bundle install --path vendor/bundle $ bundle exec jekyll serve --baseurl /jekyll-api-boilerplate 4. http://localhost:4000/jekyll-api-boilerplate/api/v1/ pages.json ʹΞΫηε͢Δ͜ͱͰ JSON API Λ֬ೝͰ͖Δ
GitHub Pages ʹσϓϩΠ 1. `_config.yml` ͷ `url` Λࣗ͝ͷͷʹมߋ 2. σΟϨΫτϦͰԼهΛ࣮ߦ
$ bundle exec rake deploy 3. http://username.github.io/jekyll-api-boilerplate/api/v1/ pages.json ͷΑ͏ͳ URL ʹɺJSON API ͕ެ։͞Ε·͢
Thank You!