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
35
SLOを考える
hrgruri
0
35
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
450
Amusing Abliteration
ianozsvald
1
210
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
300
Navigating Team Friction
lara
192
16k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
540
First, design no harm
axbom
PRO
2
1.2k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.9k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Deep Space Network (abreviated)
tonyrice
0
210
The Pragmatic Product Professional
lauravandoore
37
7.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
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/