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
3.6k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
75k
WordPress でも大丈夫!実例で見るウェブパフォーマンス改善
ixkaito
7
5.5k
WordPress でも大丈夫!実例で見るウェブパフォーマンス改善
ixkaito
22
7.9k
タイポグラフィベーシック (+ デザインアイデア)
ixkaito
13
4.2k
WordPress の今とこれから
ixkaito
1
2k
世界で一人しかできない WordPress コアを写経する話 ― 修行の先に見たものとは?
ixkaito
5
15k
WordPress の今とこれから
ixkaito
4
2.7k
Let's Think about Right Answers of Design and UI/UX
ixkaito
0
470
ブラウザのデフォルトスタイルを見てみよう
ixkaito
3
1.6k
Other Decks in Programming
See All in Programming
the container ship “Apple Silicon”@WWDC26 Recap -Japan-\(region).swift
shingangan
0
110
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
540
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
370
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
550
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
180
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
4
1.9k
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
210
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
210
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
150
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
590
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
300
数百円から始めるRuby電子工作
tarosay
0
140
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
270
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
230
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
370
Odyssey Design
rkendrick25
PRO
2
750
Designing Powerful Visuals for Engaging Learning
tmiket
1
480
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
400
A better future with KSS
kneath
240
18k
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!