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
39
Featured
See All Featured
Mind Mapping
helmedeiros
PRO
1
290
Unsuck your backbone
ammeep
672
58k
ラッコキーワード サービス紹介資料
rakko
1
4M
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
880
Building Adaptive Systems
keathley
44
3.1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.9k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
420
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Docker and Python
trallard
47
4k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
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/