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.ioでブログを 公開しよう
Search
taniko
July 16, 2016
3.5k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
github.ioでブログを 公開しよう
PHPを使った静的サイトジェネレータのお話です
taniko
July 16, 2016
More Decks by taniko
See All by taniko
どうぶつと学ぶGitの考え方
hrgruri
0
37
SLOを考える
hrgruri
0
45
Featured
See All Featured
Ruling the World: When Life Gets Gamed
codingconduct
0
310
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
830
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.9k
Scaling GitHub
holman
464
140k
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
Ethics towards AI in product and experience design
skipperchong
2
360
The Limits of Empathy - UXLibs8
cassininazir
1
620
We Have a Design System, Now What?
morganepeng
55
8.3k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
710
Optimizing for Happiness
mojombo
378
71k
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
570
Transcript
github.ioͰϒϩάΛ ެ։͠Α͏ ߥ୩༏ @hrgruri
ࣗݾհ ߥ୩ ༏ @hrgruri ໋ཱؗେֶ ใཧֶ෦ B4 (M0) ITܥͷΠϕϯτॳࢀՃ (LTॳ)
Έͳ͞ΜϒϩάΛ ͍ͬͯ·͔͢?
ࢲgithub.ioͰ࢝Ί·ͨ͠
PHP ✕ github.io
github.io ? • ແྉͰ͡ΊΒΕΔ • GitHubʹpush͢Δͱެ։͞ΕΔ • username.github.io • PHPಈ͔ͳ͍!
(Ұൠతʹ)ϒϩάΛ࡞Δʹ ੩తαΠτδΣωϨʔλΛ༻
• Jekyll • Octopress • Pelican • Hexo • Hugo
੩తαΠτδΣωϨʔλ
• Jekyll • Octopress • Pelican • Hexo • Hugo
→ Ruby ੩తαΠτδΣωϨʔλ
• Jekyll • Octopress • Pelican • Hexo • Hugo
→ Ruby → Ruby ੩తαΠτδΣωϨʔλ
• Jekyll • Octopress • Pelican • Hexo • Hugo
→ Ruby → Ruby → Python ੩తαΠτδΣωϨʔλ
• Jekyll • Octopress • Pelican • Hexo • Hugo
→ Ruby → Ruby → Python → JavaScript ੩తαΠτδΣωϨʔλ
• Jekyll • Octopress • Pelican • Hexo • Hugo
→ Ruby → Ruby → Python → JavaScript → Go ੩తαΠτδΣωϨʔλ
PHP?
͋Δ͜ͱʹ͋Δ͕...
هࣄ͝ͱ(.php)ʹ @extends(), @section()Λهड़ @markdownͱ@endmarkdown ͷؒʹMarkdownΛຒΊࠐΉ
hrgruri/saori ͕࣌ؒ͋ΕσϞ͠·͢
PHPΛ4ߦॻ͚ͩ͘Ͱ (MarkdownͱJSONॻ͘) PHPΛͬͯ github.io༻ͷαΠτΛ ੜͰ͖Δ
main.php <?php require 'vendor/autoload.php'; $saori = new hrgruri\saori\Saori(__DIR__); $saori->run($argv);
hrgruri/saori • ComposerͰΠϯετʔϧͰ͖Δ • MarkdownͱJSONͰهड़͍ͯ͘͠ • λάػೳ, Atom৴ • ࣗ༝ʹ؆қϖʔδΛੜ
• config.jsonͰઃఆ, theme.jsonͰ৭ͳͲͷมߋ
JOJUͰॳظԽ QPTUͰϕʔεϑΝΠϧΛ ੜ BSUJDMFNE DPOpHKTPO Λฤू NBLFͰαΠτ )5.- Λੜ
ίϛοτϓογϡ جຊతͳྲྀΕ ϒϩάใΛهड़ DPOUFOUTDPOpHKTPO
contents/config.json { "id" : "hrgruri", "local" : "http://localhost:8000", "title" :
"blog\\hrgruri", "author" : "Yuya Aratani", "theme" : "saori", "lang" : "ja", "link" : { "github" : "https://github.com/hrgruri", "twitter" : "https://twitter.com/hrgruri", "ϦϙδτϦઆ໌": "/repository" }, "feed" : { "type" : "atom", "number": 30 }, "google-analytics" : "UA-xxxxxxx-x", "share" : [ "twitter" ] }
contents/theme.json { "saori": { "color": { "header" : "#A9EEE6", "title"
:"#F7FBFC", "body":"#FEFAEC", "page-contents": "#FFF1CF" } } }
saoriPHPͰͳͷͰ (ࢲͷΑ͏ͳPHP͔͠ಡΊͳ͍) PHPerͰίʔυΛಡΊΔ
هࣄΛߘ͢Δͨͼʹ GitHub͕ʹͳ͍ͬͯ͘
PHP࠷ߴ "
PHPΛ͔ͭͬͯ github.ioͰ ϒϩάΛΖ͏
DEMO
؆୯ͳ͍ํˣ https://hrgruri.github.io/ repository/saori/