Yesod で Blog Engine つくってみた

Yesod で Blog Engine つくってみた

717e56bac925ce2db1e6f1cf7708056d?s=128

Hiromi Ishii

April 21, 2012
Tweet

Transcript

  1. Yesod Ͱ Blog Engine Λͭͬͯ͘Έͨ @mr_konn 2012೥4݄22೔೔༵೔

  2. ࣗݾ঺հ • @mr_konn • ਺ֶՊࡾ೥ • auehtnticate-oauth / yesod-auth-oauth ϝϯςφ

    • ϒϩάɿhttp://blog.konn-san.com • Powered by Yesod & Mighty • ͜Ε࡞ͬͨͱ͖ͷ࿩͠·͢ 2012೥4݄22೔೔༵೔
  3. Yablog: Yet Another Blog-engine 2012೥4݄22೔೔༵೔

  4. Yablog: Yet Another Blog-engine • ϒϩάͱͯ͠Ұ௨Γͷػೳ 2012೥4݄22೔೔༵೔

  5. Yablog: Yet Another Blog-engine • ϒϩάͱͯ͠Ұ௨Γͷػೳ • ෳ਺ਓࣥච / ίϝϯτ

    / τϥοΫόοΫ / Real Time Preview / λά / ϑΟʔυ / ίϝϯτ௨஌ 2012೥4݄22೔೔༵೔
  6. Yablog: Yet Another Blog-engine • ϒϩάͱͯ͠Ұ௨Γͷػೳ • ෳ਺ਓࣥච / ίϝϯτ

    / τϥοΫόοΫ / Real Time Preview / λά / ϑΟʔυ / ίϝϯτ௨஌ • ΢ΣϒαʔϏεͱͷ࿈ܞ 2012೥4݄22೔೔༵೔
  7. Yablog: Yet Another Blog-engine • ϒϩάͱͯ͠Ұ௨Γͷػೳ • ෳ਺ਓࣥච / ίϝϯτ

    / τϥοΫόοΫ / Real Time Preview / λά / ϑΟʔυ / ίϝϯτ௨஌ • ΢ΣϒαʔϏεͱͷ࿈ܞ • SocialɿTwitter / ͸ͯϒ / ͸ͯελ / G+ / ͍͍Ͷʂ 2012೥4݄22೔೔༵೔
  8. Yablog: Yet Another Blog-engine • ϒϩάͱͯ͠Ұ௨Γͷػೳ • ෳ਺ਓࣥච / ίϝϯτ

    / τϥοΫόοΫ / Real Time Preview / λά / ϑΟʔυ / ίϝϯτ௨஌ • ΢ΣϒαʔϏεͱͷ࿈ܞ • SocialɿTwitter / ͸ͯϒ / ͸ͯελ / G+ / ͍͍Ͷʂ • Google CSE / Google Analytics / Amazon Associates 2012೥4݄22೔೔༵೔
  9. Yablog: Yet Another Blog-engine • ϒϩάͱͯ͠Ұ௨Γͷػೳ • ෳ਺ਓࣥච / ίϝϯτ

    / τϥοΫόοΫ / Real Time Preview / λά / ϑΟʔυ / ίϝϯτ௨஌ • ΢ΣϒαʔϏεͱͷ࿈ܞ • SocialɿTwitter / ͸ͯϒ / ͸ͯελ / G+ / ͍͍Ͷʂ • Google CSE / Google Analytics / Amazon Associates • ଟ͘ͷϚʔΫΞοϓݴޠɺ Syntax Colouring Λαϙʔτ 2012೥4݄22೔೔༵೔
  10. Yablog: Yet Another Blog-engine • ϒϩάͱͯ͠Ұ௨Γͷػೳ • ෳ਺ਓࣥච / ίϝϯτ

    / τϥοΫόοΫ / Real Time Preview / λά / ϑΟʔυ / ίϝϯτ௨஌ • ΢ΣϒαʔϏεͱͷ࿈ܞ • SocialɿTwitter / ͸ͯϒ / ͸ͯελ / G+ / ͍͍Ͷʂ • Google CSE / Google Analytics / Amazon Associates • ଟ͘ͷϚʔΫΞοϓݴޠɺ Syntax Colouring Λαϙʔτ • MathJax ʹΑΔඒ͍͠਺ࣜ 2012೥4݄22೔೔༵೔
  11. ཉ͍͠ػೳ͸ɺ Ұ௨Γɻ 2012೥4݄22೔೔༵೔

  12. ཉ͍͠΋ͷ͸ ࡞Ζ͏ʂ 2012೥4݄22೔೔༵೔

  13. ࡞Δͷ͸ େม……ʁ 2012೥4݄22೔೔༵೔

  14. ͦΜͳ͜ͱ͸ͳ͍ʂ 2012೥4݄22೔೔༵೔

  15. ͔ͭͬͨ΋ͷ 2012೥4݄22೔೔༵೔

  16. ͔ͭͬͨ΋ͷ • Yesod 2012೥4݄22೔೔༵೔

  17. ͔ͭͬͨ΋ͷ • Yesod • Google Analytics ͸࠷ॳ͔Βαϙʔτ 2012೥4݄22೔೔༵೔

  18. ͔ͭͬͨ΋ͷ • Yesod • Google Analytics ͸࠷ॳ͔Βαϙʔτ • ඇಉظ൛ʹ͸ॻ͖׵͑·ͨ͠ɻ 2012೥4݄22೔೔༵೔

  19. ͔ͭͬͨ΋ͷ • Yesod • Google Analytics ͸࠷ॳ͔Βαϙʔτ • ඇಉظ൛ʹ͸ॻ͖׵͑·ͨ͠ɻ •

    Newsfeed ͷੜ੒΍ࠃࡍԽ΋ָνϯ 2012೥4݄22೔೔༵೔
  20. ͔ͭͬͨ΋ͷ • Yesod • Google Analytics ͸࠷ॳ͔Βαϙʔτ • ඇಉظ൛ʹ͸ॻ͖׵͑·ͨ͠ɻ •

    Newsfeed ͷੜ੒΍ࠃࡍԽ΋ָνϯ • ೝূػߏ΋޷͖ͳ΋ͷΛ࢖͑Δ 2012೥4݄22೔೔༵೔
  21. ͔ͭͬͨ΋ͷ • Yesod • Google Analytics ͸࠷ॳ͔Βαϙʔτ • ඇಉظ൛ʹ͸ॻ͖׵͑·ͨ͠ɻ •

    Newsfeed ͷੜ੒΍ࠃࡍԽ΋ָνϯ • ೝূػߏ΋޷͖ͳ΋ͷΛ࢖͑Δ • Yablog Ͱ͸ͦͷ·· Google ͔ BrowserId 2012೥4݄22೔೔༵೔
  22. ͔ͭͬͨ΋ͷ • Yesod • Google Analytics ͸࠷ॳ͔Βαϙʔτ • ඇಉظ൛ʹ͸ॻ͖׵͑·ͨ͠ɻ •

    Newsfeed ͷੜ੒΍ࠃࡍԽ΋ָνϯ • ೝূػߏ΋޷͖ͳ΋ͷΛ࢖͑Δ • Yablog Ͱ͸ͦͷ·· Google ͔ BrowserId • HashDB ͱ͔ͷ͕Α͔͔ͬͨͳ͊ɻ 2012೥4݄22೔೔༵೔
  23. ͔ͭͬͨ΋ͷʢଓʣ 2012೥4݄22೔೔༵೔

  24. ͔ͭͬͨ΋ͷʢଓʣ • Pandoc 2012೥4݄22೔೔༵೔

  25. ͔ͭͬͨ΋ͷʢଓʣ • Pandoc • Markdown (+lhs) / ReST / HTML

    / TeX… 2012೥4݄22೔೔༵೔
  26. ͔ͭͬͨ΋ͷʢଓʣ • Pandoc • Markdown (+lhs) / ReST / HTML

    / TeX… • ϚʔΫΞοϓͷύʔζ&HTML੔ܗʹ 2012೥4݄22೔೔༵೔
  27. ͔ͭͬͨ΋ͷʢଓʣ • Pandoc • Markdown (+lhs) / ReST / HTML

    / TeX… • ϚʔΫΞοϓͷύʔζ&HTML੔ܗʹ • HTML ͸Yesodͱڞ௨ͷ blaze Λར༻ 2012೥4݄22೔೔༵೔
  28. ͔ͭͬͨ΋ͷʢଓʣ • Pandoc • Markdown (+lhs) / ReST / HTML

    / TeX… • ϚʔΫΞοϓͷύʔζ&HTML੔ܗʹ • HTML ͸Yesodͱڞ௨ͷ blaze Λར༻ • highlighting-kate 2012೥4݄22೔೔༵೔
  29. ͔ͭͬͨ΋ͷʢଓʣ • Pandoc • Markdown (+lhs) / ReST / HTML

    / TeX… • ϚʔΫΞοϓͷύʔζ&HTML੔ܗʹ • HTML ͸Yesodͱڞ௨ͷ blaze Λར༻ • highlighting-kate • γϯλοΫεΧϥʔϦϯάɻ 2012೥4݄22೔೔༵೔
  30. ͔ͭͬͨ΋ͷʢଓʣ • Pandoc • Markdown (+lhs) / ReST / HTML

    / TeX… • ϚʔΫΞοϓͷύʔζ&HTML੔ܗʹ • HTML ͸Yesodͱڞ௨ͷ blaze Λར༻ • highlighting-kate • γϯλοΫεΧϥʔϦϯάɻ • Yablog Ͱ͸௚઀ୟ͍͍ͯ·͕͢ɺPandoc ͔Β΋ୟ͚ Δɻ 2012೥4݄22೔೔༵೔
  31. Amazon Associates • Pandoc + SYB ͷҖྗ • URL Λݟ෇͚ͨΒ

    Amazon ͔Ͳ͏͔൑ ఆɺࣗಈͰΞϑΟϦϯΫԽ 2012೥4݄22೔೔༵೔
  32. ͔ͭͬͨ΋ͷ 2012೥4݄22೔೔༵೔

  33. ͔ͭͬͨ΋ͷ • MongoDB 2012೥4݄22೔೔༵೔

  34. ͔ͭͬͨ΋ͷ • MongoDB • όοΫΤϯυɻϞμϯʂ 2012೥4݄22೔೔༵೔

  35. ͔ͭͬͨ΋ͷ • MongoDB • όοΫΤϯυɻϞμϯʂ • Day ΍ TimeOfDay Λͦͷ··Ͱ͸อ

    ଘͰ͖ͳ͍ͷͰ஫ҙʂ 2012೥4݄22೔೔༵೔
  36. ͔ͭͬͨ΋ͷ • MongoDB • όοΫΤϯυɻϞμϯʂ • Day ΍ TimeOfDay Λͦͷ··Ͱ͸อ

    ଘͰ͖ͳ͍ͷͰ஫ҙʂ • auth ͷֻ͔ͬͨDBʹΞΫηεग़དྷͳ ͍ʁ 2012೥4݄22೔೔༵೔
  37. ͔ͭͬͨ΋ͷ • Bootstrap • ͓खܰʹ Twitter ϞυΩͷWeb UI Λʂ •

    ࠷৽ͷ Yesod ͔Β͸ಉࠝ……ʁ 2012೥4݄22೔೔༵೔
  38. ͔ͭͬͨ΋ͷ 2012೥4݄22೔೔༵೔

  39. ͔ͭͬͨ΋ͷ • Mighty • @kazu_yamamoto ͞ΜͷHTTPαʔό • Reverse Proxy Λ࢖ͬͯαϒυϝΠϯ

    Ͱӡ༻͍ͯ͠Δ 2012೥4݄22೔೔༵೔
  40. ࠓޙͷ༧ఆ • τϥόඈ͹͢ػೳ • ໘౗ͳͷͰ࡞ͬͯͳ͔ͬͨʈʈʀ • ը૾ͷຒΊࠐΈ • Ͳ͜ʹͲ͏อଘ͢΂͖ʁ •

    JavaScript ॏ͍ͷΛԿͱ͔͢Δ • ద౰ʹಥͬࠐΜͩΒಡΈࠐΈ͕ੌ͘஗͍……ɻ • USTҎ֎ͷ࣌ؒଳͷαϙʔτ 2012೥4݄22೔೔༵೔
  41. ഑෍৔ॴ • ϨϙδτϦɿhttp://gitweb.konn-san.com/ repo/Yablog/tree/master • ͜ͷϨϙδτϦ΋ Yesod ΞϓϦ • ·ͩൃల్্ͳͷͰɺཁ๬͕͋Ε͹

    GitHub ͷํʹ΋Ϩϙ࡞Γ·͢ 2012೥4݄22೔೔༵೔
  42. ·ͱΊ • Haskell ʹ͸୔ࢁͷϥΠϒϥϦ͕͋Δ • ૊Έ߹Θ͍ͤͯΔͱ͍ͭͷؒʹ͔׬ ੒͍ͯ͠Δ • ཉ͍͠΋ͷΛ࡞ΕΔʂ 2012೥4݄22೔೔༵೔

  43. Any Questions? 2012೥4݄22೔೔༵೔

  44. ޚਗ਼ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠ 2012೥4݄22೔೔༵೔