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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kite
June 11, 2016
Programming
3.6k
2
Share
GitHub Pages を Web API として使う
GitHub の API ではなく、GitHub のサービスの一つである GitHub Pagesを使って、サーバなしで Web API を提供
Kite
June 11, 2016
More Decks by Kite
See All by Kite
個人からチームまで、情報・タスク管理の一元化はNotionにお任せ!
ixkaito
12
74k
WordPress でも大丈夫!実例で見るウェブパフォーマンス改善
ixkaito
7
5.5k
WordPress でも大丈夫!実例で見るウェブパフォーマンス改善
ixkaito
22
7.9k
タイポグラフィベーシック (+ デザインアイデア)
ixkaito
13
4.1k
WordPress の今とこれから
ixkaito
1
2k
世界で一人しかできない WordPress コアを写経する話 ― 修行の先に見たものとは?
ixkaito
5
15k
WordPress の今とこれから
ixkaito
4
2.6k
Let's Think about Right Answers of Design and UI/UX
ixkaito
0
460
ブラウザのデフォルトスタイルを見てみよう
ixkaito
3
1.6k
Other Decks in Programming
See All in Programming
Liberating Ruby's Parser from Lexer Hacks
ydah
2
1.9k
AIと共に生きる技術選定 2026
sgash708
0
100
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
280
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
840
Angular Signal Forms
debug_mode
0
110
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
230
Kingdom of the Machine
yui_knk
2
750
実用!Hono RPC2026
yodaka
2
250
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
6
3.5k
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
3
280
ドメインイベントでビジネスロジックを解きほぐす #phpcon_odawara
kajitack
3
790
Back to the roots of date
jinroq
0
320
Featured
See All Featured
Balancing Empowerment & Direction
lara
6
1.1k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
We Are The Robots
honzajavorek
0
220
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
Six Lessons from altMBA
skipperchong
29
4.2k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Scaling GitHub
holman
464
140k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
150
Speed Design
sergeychernyshev
33
1.6k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
490
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!