octodmin 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +7 -0
  2. data/.bowerrc +3 -0
  3. data/.gitignore +24 -0
  4. data/.rspec +2 -0
  5. data/.travis.yml +9 -0
  6. data/CHANGELOG.md +4 -0
  7. data/Gemfile +17 -0
  8. data/LICENSE.md +22 -0
  9. data/README.md +117 -0
  10. data/Rakefile +38 -0
  11. data/_config.yml +27 -0
  12. data/_deploy.yml +13 -0
  13. data/app/.DS_Store +0 -0
  14. data/app/assets/.DS_Store +0 -0
  15. data/app/assets/javascripts/.DS_Store +0 -0
  16. data/app/assets/javascripts/app.js.coffee +13 -0
  17. data/app/assets/javascripts/components/header.js.cjsx +69 -0
  18. data/app/assets/javascripts/components/posts.js.cjsx +309 -0
  19. data/app/assets/javascripts/components/router.js.cjsx +56 -0
  20. data/app/assets/stylesheets/.DS_Store +0 -0
  21. data/app/assets/stylesheets/app.scss +75 -0
  22. data/app/config/environment.rb +7 -0
  23. data/app/config/routes.rb +19 -0
  24. data/app/config/sprockets.rb +36 -0
  25. data/app/controllers/deploys/create.rb +20 -0
  26. data/app/controllers/frontend/index.rb +8 -0
  27. data/app/controllers/posts/create.rb +18 -0
  28. data/app/controllers/posts/destroy.rb +14 -0
  29. data/app/controllers/posts/index.rb +13 -0
  30. data/app/controllers/posts/restore.rb +14 -0
  31. data/app/controllers/posts/revert.rb +14 -0
  32. data/app/controllers/posts/show.rb +13 -0
  33. data/app/controllers/posts/update.rb +23 -0
  34. data/app/controllers/site/show.rb +12 -0
  35. data/app/controllers/syncs/create.rb +62 -0
  36. data/app/controllers/version/show.rb +12 -0
  37. data/app/octodmin.rb +56 -0
  38. data/app/public/.DS_Store +0 -0
  39. data/app/public/assets/app.css +7960 -0
  40. data/app/public/assets/app.css.gz +7960 -0
  41. data/app/public/assets/app.js +39181 -0
  42. data/app/public/assets/app.js.gz +39181 -0
  43. data/app/public/assets/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
  44. data/app/public/assets/bootstrap/dist/fonts/glyphicons-halflings-regular.eot.gz +0 -0
  45. data/app/public/assets/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +288 -0
  46. data/app/public/assets/bootstrap/dist/fonts/glyphicons-halflings-regular.svg.gz +288 -0
  47. data/app/public/assets/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
  48. data/app/public/assets/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf.gz +0 -0
  49. data/app/public/assets/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
  50. data/app/public/assets/bootstrap/dist/fonts/glyphicons-halflings-regular.woff.gz +0 -0
  51. data/app/public/assets/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 +0 -0
  52. data/app/public/assets/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2.gz +0 -0
  53. data/app/public/assets/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
  54. data/app/public/assets/bootstrap/fonts/glyphicons-halflings-regular.eot.gz +0 -0
  55. data/app/public/assets/bootstrap/fonts/glyphicons-halflings-regular.svg +288 -0
  56. data/app/public/assets/bootstrap/fonts/glyphicons-halflings-regular.svg.gz +288 -0
  57. data/app/public/assets/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
  58. data/app/public/assets/bootstrap/fonts/glyphicons-halflings-regular.ttf.gz +0 -0
  59. data/app/public/assets/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
  60. data/app/public/assets/bootstrap/fonts/glyphicons-halflings-regular.woff.gz +0 -0
  61. data/app/public/assets/bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
  62. data/app/public/assets/bootstrap/fonts/glyphicons-halflings-regular.woff2.gz +0 -0
  63. data/app/public/assets/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  64. data/app/public/assets/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.eot.gz +0 -0
  65. data/app/public/assets/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +288 -0
  66. data/app/public/assets/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.svg.gz +288 -0
  67. data/app/public/assets/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  68. data/app/public/assets/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf.gz +0 -0
  69. data/app/public/assets/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  70. data/app/public/assets/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff.gz +0 -0
  71. data/app/public/assets/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
  72. data/app/public/assets/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2.gz +0 -0
  73. data/app/public/assets/bootswatch/fonts/glyphicons-halflings-regular.eot +0 -0
  74. data/app/public/assets/bootswatch/fonts/glyphicons-halflings-regular.eot.gz +0 -0
  75. data/app/public/assets/bootswatch/fonts/glyphicons-halflings-regular.svg +288 -0
  76. data/app/public/assets/bootswatch/fonts/glyphicons-halflings-regular.svg.gz +288 -0
  77. data/app/public/assets/bootswatch/fonts/glyphicons-halflings-regular.ttf +0 -0
  78. data/app/public/assets/bootswatch/fonts/glyphicons-halflings-regular.ttf.gz +0 -0
  79. data/app/public/assets/bootswatch/fonts/glyphicons-halflings-regular.woff +0 -0
  80. data/app/public/assets/bootswatch/fonts/glyphicons-halflings-regular.woff.gz +0 -0
  81. data/app/public/assets/bootswatch/fonts/glyphicons-halflings-regular.woff2 +0 -0
  82. data/app/public/assets/bootswatch/fonts/glyphicons-halflings-regular.woff2.gz +0 -0
  83. data/app/public/assets/bootswatch-dist/fonts/glyphicons-halflings-regular.eot +0 -0
  84. data/app/public/assets/bootswatch-dist/fonts/glyphicons-halflings-regular.eot.gz +0 -0
  85. data/app/public/assets/bootswatch-dist/fonts/glyphicons-halflings-regular.svg +229 -0
  86. data/app/public/assets/bootswatch-dist/fonts/glyphicons-halflings-regular.svg.gz +229 -0
  87. data/app/public/assets/bootswatch-dist/fonts/glyphicons-halflings-regular.ttf +0 -0
  88. data/app/public/assets/bootswatch-dist/fonts/glyphicons-halflings-regular.ttf.gz +0 -0
  89. data/app/public/assets/bootswatch-dist/fonts/glyphicons-halflings-regular.woff +0 -0
  90. data/app/public/assets/bootswatch-dist/fonts/glyphicons-halflings-regular.woff.gz +0 -0
  91. data/app/public/assets/fontawesome/fonts/fontawesome-webfont.eot +0 -0
  92. data/app/public/assets/fontawesome/fonts/fontawesome-webfont.eot.gz +0 -0
  93. data/app/public/assets/fontawesome/fonts/fontawesome-webfont.svg +565 -0
  94. data/app/public/assets/fontawesome/fonts/fontawesome-webfont.svg.gz +565 -0
  95. data/app/public/assets/fontawesome/fonts/fontawesome-webfont.ttf +0 -0
  96. data/app/public/assets/fontawesome/fonts/fontawesome-webfont.ttf.gz +0 -0
  97. data/app/public/assets/fontawesome/fonts/fontawesome-webfont.woff +0 -0
  98. data/app/public/assets/fontawesome/fonts/fontawesome-webfont.woff.gz +0 -0
  99. data/app/public/assets/fontawesome/fonts/fontawesome-webfont.woff2 +0 -0
  100. data/app/public/assets/fontawesome/fonts/fontawesome-webfont.woff2.gz +0 -0
  101. data/app/public/assets/manifest.json +1 -0
  102. data/app/templates/application.html.erb +13 -0
  103. data/app/templates/frontend/index.html.erb +1 -0
  104. data/app/views/application_layout.rb +5 -0
  105. data/app/views/deploys/create.rb +10 -0
  106. data/app/views/frontend/index.rb +5 -0
  107. data/app/views/posts/create.rb +10 -0
  108. data/app/views/posts/destroy.rb +10 -0
  109. data/app/views/posts/index.rb +10 -0
  110. data/app/views/posts/restore.rb +10 -0
  111. data/app/views/posts/revert.rb +10 -0
  112. data/app/views/posts/show.rb +10 -0
  113. data/app/views/posts/update.rb +10 -0
  114. data/app/views/site/show.rb +10 -0
  115. data/app/views/syncs/create.rb +10 -0
  116. data/app/views/version/show.rb +10 -0
  117. data/bower.json +16 -0
  118. data/config.ru +5 -0
  119. data/lib/octodmin/app.rb +2 -0
  120. data/lib/octodmin/post.rb +161 -0
  121. data/lib/octodmin/site.rb +61 -0
  122. data/lib/octodmin/version.rb +3 -0
  123. data/lib/octodmin.rb +7 -0
  124. data/octodmin.gemspec +24 -0
  125. data/sample/.gitignore +2 -0
  126. data/sample/_includes/footer.html +55 -0
  127. data/sample/_includes/head.html +12 -0
  128. data/sample/_includes/header.html +27 -0
  129. data/sample/_layouts/default.html +20 -0
  130. data/sample/_layouts/page.html +14 -0
  131. data/sample/_layouts/post.html +15 -0
  132. data/sample/_posts/2015-01-29-welcome-to-jekyll.markdown +25 -0
  133. data/sample/_posts/2015-01-30-test.markdown +10 -0
  134. data/sample/_sass/_base.scss +204 -0
  135. data/sample/_sass/_layout.scss +236 -0
  136. data/sample/_sass/_syntax-highlighting.scss +67 -0
  137. data/sample/_templates/draft +4 -0
  138. data/sample/_templates/page +4 -0
  139. data/sample/_templates/post +8 -0
  140. data/sample/about.md +11 -0
  141. data/sample/css/main.scss +52 -0
  142. data/sample/feed.xml +30 -0
  143. data/sample/index.html +23 -0
  144. data/spec/api/deploys_spec.rb +36 -0
  145. data/spec/api/posts_spec.rb +411 -0
  146. data/spec/api/site_spec.rb +18 -0
  147. data/spec/api/syncs_spec.rb +81 -0
  148. data/spec/api/version_spec.rb +14 -0
  149. data/spec/frontend/assets_spec.rb +23 -0
  150. data/spec/frontend/home_spec.rb +16 -0
  151. data/spec/spec_helper.rb +31 -0
  152. data/tmp/.keep +0 -0
  153. metadata +259 -0
@@ -0,0 +1 @@
1
+ {"files":{"app.css":{"logical_path":"app.css","mtime":"2015-02-05T20:58:52+02:00","size":193714,"digest":"c3e6e20fc088e39f087db1e8df37d8415df9c5ffee7f9e6c1280e42703f42d94","integrity":"ni:///sha-256;w-biD8CI458IfbHo3zfYQV35xf_uf55sEoDkJwP0LZQ?ct=text/css"},"app.js":{"logical_path":"app.js","mtime":"2015-02-05T20:58:52+02:00","size":1168167,"digest":"6861ea2e0689bf91f4d4ef4382914eac818073f60fa4934991bc098a7d681148","integrity":"ni:///sha-256;aGHqLgaJv5H01O9DgpFOrIGAc_YPpJNJkbwJin1oEUg?ct=application/javascript"},"bootstrap/dist/fonts/glyphicons-halflings-regular.eot":{"logical_path":"bootstrap/dist/fonts/glyphicons-halflings-regular.eot","mtime":"2015-01-19T19:03:09+02:00","size":20127,"digest":"13634da87d9e23f8c3ed9108ce1724d183a39ad072e73e1b3d8cbf646d2d0407","integrity":"ni:///sha-256;E2NNqH2eI_jD7ZEIzhck0YOjmtBy5z4bPYy_ZG0tBAc?ct=application/vnd.ms-fontobject"},"bootstrap/dist/fonts/glyphicons-halflings-regular.svg":{"logical_path":"bootstrap/dist/fonts/glyphicons-halflings-regular.svg","mtime":"2015-01-19T19:03:09+02:00","size":108738,"digest":"42f60659d265c1a3c30f9fa42abcbb56bd4a53af4d83d316d6dd7a36903c43e5","integrity":"ni:///sha-256;QvYGWdJlwaPDD5-kKry7Vr1KU69Ng9MW1t16NpA8Q-U?ct=image/svg+xml"},"bootstrap/dist/fonts/glyphicons-halflings-regular.ttf":{"logical_path":"bootstrap/dist/fonts/glyphicons-halflings-regular.ttf","mtime":"2015-01-19T19:03:09+02:00","size":45404,"digest":"e395044093757d82afcb138957d06a1ea9361bdcf0b442d06a18a8051af57456","integrity":"ni:///sha-256;45UEQJN1fYKvyxOJV9BqHqk2G9zwtELQahioBRr1dFY?ct=application/x-font-ttf"},"bootstrap/dist/fonts/glyphicons-halflings-regular.woff":{"logical_path":"bootstrap/dist/fonts/glyphicons-halflings-regular.woff","mtime":"2015-01-19T19:03:09+02:00","size":23424,"digest":"a26394f7ede100ca118eff2eda08596275a9839b959c226e15439557a5a80742","integrity":"ni:///sha-256;omOU9-3hAMoRjv8u2ghZYnWpg5uVnCJuFUOVV6WoB0I?ct=application/font-woff"},"bootstrap/dist/fonts/glyphicons-halflings-regular.woff2":{"logical_path":"bootstrap/dist/fonts/glyphicons-halflings-regular.woff2","mtime":"2015-01-19T19:03:09+02:00","size":18028,"digest":"fe185d11a49676890d47bb783312a0cda5a44c4039214094e7957b4c040ef11c","integrity":"ni:///sha-256;_hhdEaSWdokNR7t4MxKgzaWkTEA5IUCU55V7TAQO8Rw"},"bootstrap/fonts/glyphicons-halflings-regular.eot":{"logical_path":"bootstrap/fonts/glyphicons-halflings-regular.eot","mtime":"2015-01-19T19:03:09+02:00","size":20127,"digest":"13634da87d9e23f8c3ed9108ce1724d183a39ad072e73e1b3d8cbf646d2d0407","integrity":"ni:///sha-256;E2NNqH2eI_jD7ZEIzhck0YOjmtBy5z4bPYy_ZG0tBAc?ct=application/vnd.ms-fontobject"},"bootstrap/fonts/glyphicons-halflings-regular.svg":{"logical_path":"bootstrap/fonts/glyphicons-halflings-regular.svg","mtime":"2015-01-19T19:03:09+02:00","size":108738,"digest":"42f60659d265c1a3c30f9fa42abcbb56bd4a53af4d83d316d6dd7a36903c43e5","integrity":"ni:///sha-256;QvYGWdJlwaPDD5-kKry7Vr1KU69Ng9MW1t16NpA8Q-U?ct=image/svg+xml"},"bootstrap/fonts/glyphicons-halflings-regular.ttf":{"logical_path":"bootstrap/fonts/glyphicons-halflings-regular.ttf","mtime":"2015-01-19T19:03:09+02:00","size":45404,"digest":"e395044093757d82afcb138957d06a1ea9361bdcf0b442d06a18a8051af57456","integrity":"ni:///sha-256;45UEQJN1fYKvyxOJV9BqHqk2G9zwtELQahioBRr1dFY?ct=application/x-font-ttf"},"bootstrap/fonts/glyphicons-halflings-regular.woff":{"logical_path":"bootstrap/fonts/glyphicons-halflings-regular.woff","mtime":"2015-01-19T19:03:09+02:00","size":23424,"digest":"a26394f7ede100ca118eff2eda08596275a9839b959c226e15439557a5a80742","integrity":"ni:///sha-256;omOU9-3hAMoRjv8u2ghZYnWpg5uVnCJuFUOVV6WoB0I?ct=application/font-woff"},"bootstrap/fonts/glyphicons-halflings-regular.woff2":{"logical_path":"bootstrap/fonts/glyphicons-halflings-regular.woff2","mtime":"2015-01-19T19:03:09+02:00","size":18028,"digest":"fe185d11a49676890d47bb783312a0cda5a44c4039214094e7957b4c040ef11c","integrity":"ni:///sha-256;_hhdEaSWdokNR7t4MxKgzaWkTEA5IUCU55V7TAQO8Rw"},"bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.eot":{"logical_path":"bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.eot","mtime":"2015-01-20T02:56:26+02:00","size":20127,"digest":"13634da87d9e23f8c3ed9108ce1724d183a39ad072e73e1b3d8cbf646d2d0407","integrity":"ni:///sha-256;E2NNqH2eI_jD7ZEIzhck0YOjmtBy5z4bPYy_ZG0tBAc?ct=application/vnd.ms-fontobject"},"bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.svg":{"logical_path":"bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.svg","mtime":"2015-01-20T02:56:26+02:00","size":108738,"digest":"42f60659d265c1a3c30f9fa42abcbb56bd4a53af4d83d316d6dd7a36903c43e5","integrity":"ni:///sha-256;QvYGWdJlwaPDD5-kKry7Vr1KU69Ng9MW1t16NpA8Q-U?ct=image/svg+xml"},"bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf":{"logical_path":"bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf","mtime":"2015-01-20T02:56:26+02:00","size":45404,"digest":"e395044093757d82afcb138957d06a1ea9361bdcf0b442d06a18a8051af57456","integrity":"ni:///sha-256;45UEQJN1fYKvyxOJV9BqHqk2G9zwtELQahioBRr1dFY?ct=application/x-font-ttf"},"bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff":{"logical_path":"bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff","mtime":"2015-01-20T02:56:26+02:00","size":23424,"digest":"a26394f7ede100ca118eff2eda08596275a9839b959c226e15439557a5a80742","integrity":"ni:///sha-256;omOU9-3hAMoRjv8u2ghZYnWpg5uVnCJuFUOVV6WoB0I?ct=application/font-woff"},"bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2":{"logical_path":"bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2","mtime":"2015-01-20T02:56:26+02:00","size":18028,"digest":"fe185d11a49676890d47bb783312a0cda5a44c4039214094e7957b4c040ef11c","integrity":"ni:///sha-256;_hhdEaSWdokNR7t4MxKgzaWkTEA5IUCU55V7TAQO8Rw"},"bootswatch/fonts/glyphicons-halflings-regular.eot":{"logical_path":"bootswatch/fonts/glyphicons-halflings-regular.eot","mtime":"2015-01-23T05:42:19+02:00","size":20127,"digest":"13634da87d9e23f8c3ed9108ce1724d183a39ad072e73e1b3d8cbf646d2d0407","integrity":"ni:///sha-256;E2NNqH2eI_jD7ZEIzhck0YOjmtBy5z4bPYy_ZG0tBAc?ct=application/vnd.ms-fontobject"},"bootswatch/fonts/glyphicons-halflings-regular.svg":{"logical_path":"bootswatch/fonts/glyphicons-halflings-regular.svg","mtime":"2015-01-23T05:42:19+02:00","size":108738,"digest":"42f60659d265c1a3c30f9fa42abcbb56bd4a53af4d83d316d6dd7a36903c43e5","integrity":"ni:///sha-256;QvYGWdJlwaPDD5-kKry7Vr1KU69Ng9MW1t16NpA8Q-U?ct=image/svg+xml"},"bootswatch/fonts/glyphicons-halflings-regular.ttf":{"logical_path":"bootswatch/fonts/glyphicons-halflings-regular.ttf","mtime":"2015-01-23T05:42:19+02:00","size":45404,"digest":"e395044093757d82afcb138957d06a1ea9361bdcf0b442d06a18a8051af57456","integrity":"ni:///sha-256;45UEQJN1fYKvyxOJV9BqHqk2G9zwtELQahioBRr1dFY?ct=application/x-font-ttf"},"bootswatch/fonts/glyphicons-halflings-regular.woff":{"logical_path":"bootswatch/fonts/glyphicons-halflings-regular.woff","mtime":"2015-01-23T05:42:19+02:00","size":23424,"digest":"a26394f7ede100ca118eff2eda08596275a9839b959c226e15439557a5a80742","integrity":"ni:///sha-256;omOU9-3hAMoRjv8u2ghZYnWpg5uVnCJuFUOVV6WoB0I?ct=application/font-woff"},"bootswatch/fonts/glyphicons-halflings-regular.woff2":{"logical_path":"bootswatch/fonts/glyphicons-halflings-regular.woff2","mtime":"2015-01-23T05:42:19+02:00","size":18028,"digest":"fe185d11a49676890d47bb783312a0cda5a44c4039214094e7957b4c040ef11c","integrity":"ni:///sha-256;_hhdEaSWdokNR7t4MxKgzaWkTEA5IUCU55V7TAQO8Rw"},"bootswatch-dist/fonts/glyphicons-halflings-regular.eot":{"logical_path":"bootswatch-dist/fonts/glyphicons-halflings-regular.eot","mtime":"2014-11-05T11:34:11+02:00","size":20335,"digest":"f495f34e4f177cf0115af995bbbfeb3fcabc88502876e76fc51a4ab439bc8431","integrity":"ni:///sha-256;9JXzTk8XfPARWvmVu7_rP8q8iFAodudvxRpKtDm8hDE?ct=application/vnd.ms-fontobject"},"bootswatch-dist/fonts/glyphicons-halflings-regular.svg":{"logical_path":"bootswatch-dist/fonts/glyphicons-halflings-regular.svg","mtime":"2014-11-05T11:34:11+02:00","size":62926,"digest":"5d234508037dc13a419ef6ce48f3fc73dbb477f1a162c052b872182b494e626e","integrity":"ni:///sha-256;XSNFCAN9wTpBnvbOSPP8c9u0d_GhYsBSuHIYK0lOYm4?ct=image/svg+xml"},"bootswatch-dist/fonts/glyphicons-halflings-regular.ttf":{"logical_path":"bootswatch-dist/fonts/glyphicons-halflings-regular.ttf","mtime":"2014-11-05T11:34:11+02:00","size":41280,"digest":"bd18efd3efd70fec8ad09611a20cdbf99440b2c1d40085c29be036f891d65358","integrity":"ni:///sha-256;vRjv0-_XD-yK0JYRogzb-ZRAssHUAIXCm-A2-JHWU1g?ct=application/x-font-ttf"},"bootswatch-dist/fonts/glyphicons-halflings-regular.woff":{"logical_path":"bootswatch-dist/fonts/glyphicons-halflings-regular.woff","mtime":"2014-11-05T11:34:11+02:00","size":23320,"digest":"fc969dc1c6ff531abcf368089dcbaf5775133b0626ff56b52301a059fc0f9e1e","integrity":"ni:///sha-256;_Jadwcb_Uxq882gIncuvV3UTOwYm_1a1IwGgWfwPnh4?ct=application/font-woff"},"fontawesome/fonts/fontawesome-webfont.eot":{"logical_path":"fontawesome/fonts/fontawesome-webfont.eot","mtime":"2015-01-22T20:09:42+02:00","size":60767,"digest":"cbb644d0ee730ea57dd5fbae35ef5ba4a41d57a254a6b1215de5c9ff8a321c2d","integrity":"ni:///sha-256;y7ZE0O5zDqV91fuuNe9bpKQdV6JUprEhXeXJ_4oyHC0?ct=application/vnd.ms-fontobject"},"fontawesome/fonts/fontawesome-webfont.svg":{"logical_path":"fontawesome/fonts/fontawesome-webfont.svg","mtime":"2015-01-22T20:09:42+02:00","size":313398,"digest":"bfdef833219a6edffd9c3cbc28db72739d22bb4d20cc2e2f8d56a7a4d408a206","integrity":"ni:///sha-256;v974MyGabt_9nDy8KNtyc50iu00gzC4vjVanpNQIogY?ct=image/svg+xml"},"fontawesome/fonts/fontawesome-webfont.ttf":{"logical_path":"fontawesome/fonts/fontawesome-webfont.ttf","mtime":"2015-01-22T20:09:42+02:00","size":122092,"digest":"9e540a087924a6e64790149d735cac022640e4fa6bff6bd65f5e9f41529bf0b3","integrity":"ni:///sha-256;nlQKCHkkpuZHkBSdc1ysAiZA5Ppr_2vWX16fQVKb8LM?ct=application/x-font-ttf"},"fontawesome/fonts/fontawesome-webfont.woff":{"logical_path":"fontawesome/fonts/fontawesome-webfont.woff","mtime":"2015-01-22T20:09:42+02:00","size":71508,"digest":"e3870de89716b72cb61a4bba0e17c75783b361cdaba35ea96961c3070bd8ca18","integrity":"ni:///sha-256;44cN6JcWtyy2Gku6DhfHV4OzYc2ro16paWHDBwvYyhg?ct=application/font-woff"},"fontawesome/fonts/fontawesome-webfont.woff2":{"logical_path":"fontawesome/fonts/fontawesome-webfont.woff2","mtime":"2015-01-22T20:09:42+02:00","size":56780,"digest":"aadc3580d2b64ff5a7e6f1425587db4e8b033efcbf8f5c332ca52a5ed580c87c","integrity":"ni:///sha-256;qtw1gNK2T_Wn5vFCVYfbTosDPvy_j1wzLKUqXtWAyHw"}},"assets":{"app.css":"app.css","app.js":"app.js","bootstrap/dist/fonts/glyphicons-halflings-regular.eot":"bootstrap/dist/fonts/glyphicons-halflings-regular.eot","bootstrap/dist/fonts/glyphicons-halflings-regular.svg":"bootstrap/dist/fonts/glyphicons-halflings-regular.svg","bootstrap/dist/fonts/glyphicons-halflings-regular.ttf":"bootstrap/dist/fonts/glyphicons-halflings-regular.ttf","bootstrap/dist/fonts/glyphicons-halflings-regular.woff":"bootstrap/dist/fonts/glyphicons-halflings-regular.woff","bootstrap/dist/fonts/glyphicons-halflings-regular.woff2":"bootstrap/dist/fonts/glyphicons-halflings-regular.woff2","bootstrap/fonts/glyphicons-halflings-regular.eot":"bootstrap/fonts/glyphicons-halflings-regular.eot","bootstrap/fonts/glyphicons-halflings-regular.svg":"bootstrap/fonts/glyphicons-halflings-regular.svg","bootstrap/fonts/glyphicons-halflings-regular.ttf":"bootstrap/fonts/glyphicons-halflings-regular.ttf","bootstrap/fonts/glyphicons-halflings-regular.woff":"bootstrap/fonts/glyphicons-halflings-regular.woff","bootstrap/fonts/glyphicons-halflings-regular.woff2":"bootstrap/fonts/glyphicons-halflings-regular.woff2","bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.eot":"bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.eot","bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.svg":"bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.svg","bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf":"bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf","bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff":"bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff","bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2":"bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2","bootswatch/fonts/glyphicons-halflings-regular.eot":"bootswatch/fonts/glyphicons-halflings-regular.eot","bootswatch/fonts/glyphicons-halflings-regular.svg":"bootswatch/fonts/glyphicons-halflings-regular.svg","bootswatch/fonts/glyphicons-halflings-regular.ttf":"bootswatch/fonts/glyphicons-halflings-regular.ttf","bootswatch/fonts/glyphicons-halflings-regular.woff":"bootswatch/fonts/glyphicons-halflings-regular.woff","bootswatch/fonts/glyphicons-halflings-regular.woff2":"bootswatch/fonts/glyphicons-halflings-regular.woff2","bootswatch-dist/fonts/glyphicons-halflings-regular.eot":"bootswatch-dist/fonts/glyphicons-halflings-regular.eot","bootswatch-dist/fonts/glyphicons-halflings-regular.svg":"bootswatch-dist/fonts/glyphicons-halflings-regular.svg","bootswatch-dist/fonts/glyphicons-halflings-regular.ttf":"bootswatch-dist/fonts/glyphicons-halflings-regular.ttf","bootswatch-dist/fonts/glyphicons-halflings-regular.woff":"bootswatch-dist/fonts/glyphicons-halflings-regular.woff","fontawesome/fonts/fontawesome-webfont.eot":"fontawesome/fonts/fontawesome-webfont.eot","fontawesome/fonts/fontawesome-webfont.svg":"fontawesome/fonts/fontawesome-webfont.svg","fontawesome/fonts/fontawesome-webfont.ttf":"fontawesome/fonts/fontawesome-webfont.ttf","fontawesome/fonts/fontawesome-webfont.woff":"fontawesome/fonts/fontawesome-webfont.woff","fontawesome/fonts/fontawesome-webfont.woff2":"fontawesome/fonts/fontawesome-webfont.woff2"}}
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>Loading...</title>
5
+ <meta charset="utf-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
7
+ <link rel="stylesheet" href="/assets/app.css">
8
+ </head>
9
+ <body>
10
+ <%= yield %>
11
+ <script src="/assets/app.js"></script>
12
+ </body>
13
+ </html>
@@ -0,0 +1 @@
1
+ <div id="app"></div>
@@ -0,0 +1,5 @@
1
+ module Octodmin::Views
2
+ class ApplicationLayout
3
+ include Octodmin::Layout
4
+ end
5
+ end
@@ -0,0 +1,10 @@
1
+ module Octodmin::Views::Deploys
2
+ class Create
3
+ include Octodmin::View
4
+ format :json
5
+
6
+ def render
7
+ JSON.dump(deploys: [message])
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,5 @@
1
+ module Octodmin::Views::Frontend
2
+ class Index
3
+ include Octodmin::View
4
+ end
5
+ end
@@ -0,0 +1,10 @@
1
+ module Octodmin::Views::Posts
2
+ class Create
3
+ include Octodmin::View
4
+ format :json
5
+
6
+ def render
7
+ JSON.dump(posts: post.serializable_hash)
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ module Octodmin::Views::Posts
2
+ class Destroy
3
+ include Octodmin::View
4
+ format :json
5
+
6
+ def render
7
+ JSON.dump(posts: post.serializable_hash)
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ module Octodmin::Views::Posts
2
+ class Index
3
+ include Octodmin::View
4
+ format :json
5
+
6
+ def render
7
+ JSON.dump(posts: posts.map(&:serializable_hash))
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ module Octodmin::Views::Posts
2
+ class Restore
3
+ include Octodmin::View
4
+ format :json
5
+
6
+ def render
7
+ JSON.dump(posts: post.serializable_hash)
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ module Octodmin::Views::Posts
2
+ class Revert
3
+ include Octodmin::View
4
+ format :json
5
+
6
+ def render
7
+ JSON.dump(posts: post.serializable_hash)
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ module Octodmin::Views::Posts
2
+ class Show
3
+ include Octodmin::View
4
+ format :json
5
+
6
+ def render
7
+ JSON.dump(posts: post.serializable_hash)
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ module Octodmin::Views::Posts
2
+ class Update
3
+ include Octodmin::View
4
+ format :json
5
+
6
+ def render
7
+ JSON.dump(posts: post.serializable_hash)
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ module Octodmin::Views::Site
2
+ class Show
3
+ include Octodmin::View
4
+ format :json
5
+
6
+ def render
7
+ JSON.dump(sites: site.serializable_hash)
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ module Octodmin::Views::Syncs
2
+ class Create
3
+ include Octodmin::View
4
+ format :json
5
+
6
+ def render
7
+ JSON.dump(syncs: [message])
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ module Octodmin::Views::Version
2
+ class Show
3
+ include Octodmin::View
4
+ format :json
5
+
6
+ def render
7
+ JSON.dump(versions: version)
8
+ end
9
+ end
10
+ end
data/bower.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "octodmin",
3
+ "dependencies": {
4
+ "jquery": "~2.1.3",
5
+ "jquery-serialize-object": "~2.4.5",
6
+ "bootstrap-sass": "~3.3.2",
7
+ "bootstrap-markdown": "~2.8.0",
8
+ "spin.js": "~2.0.2",
9
+ "react": "~0.12.0",
10
+ "react-loader": "~1.1.0",
11
+ "react-router": "~0.11.6",
12
+ "fontawesome": "~4.3.0",
13
+ "bootswatch": "~3.3.2",
14
+ "momentjs": "~2.9.0"
15
+ }
16
+ }
data/config.ru ADDED
@@ -0,0 +1,5 @@
1
+ ENV["RACK_ENV"] = ENV["LOTUS_ENV"] ||= "development"
2
+
3
+ require "bundler/setup"
4
+ require "octodmin/app"
5
+ run Octodmin::App.new(__dir__)
@@ -0,0 +1,2 @@
1
+ require_relative "../octodmin"
2
+ require_relative "../../app/octodmin"
@@ -0,0 +1,161 @@
1
+ module Octodmin
2
+ class Post
3
+ attr_accessor :post
4
+
5
+ ATTRIBUTES_FOR_SERIALIZAION = Jekyll::Post::ATTRIBUTES_FOR_LIQUID - %w[
6
+ previous
7
+ next
8
+ ]
9
+
10
+ def self.find(id)
11
+ site = Octodmin::Site.new
12
+ site.posts.find { |post| post.identifier == id }
13
+ end
14
+
15
+ def self.create(options = {})
16
+ site = Octodmin::Site.new
17
+
18
+ # Prepare slug
19
+ options["slug"] = slug_for(site, options[:title])
20
+
21
+ # Create post
22
+ post = Octopress::Post.new(Octopress.site, Jekyll::Utils.stringify_hash_keys(options))
23
+ post.write
24
+
25
+ site.posts.first
26
+ rescue RuntimeError
27
+ end
28
+
29
+ def initialize(post)
30
+ @post = post
31
+ @site = Octodmin::Site.new
32
+ end
33
+
34
+ def path
35
+ @post.path
36
+ end
37
+
38
+ def identifier
39
+ path.split("/").last.split(".").first
40
+ end
41
+
42
+ def serializable_hash
43
+ hash = @post.to_liquid(ATTRIBUTES_FOR_SERIALIZAION).dup
44
+
45
+ excerpt = Jekyll::Excerpt.new(@post)
46
+ excerpt.do_layout({ "site" => @site.config }, {})
47
+
48
+ hash.merge(
49
+ excerpt: excerpt.content,
50
+ identifier: identifier,
51
+ slug: @post.slug,
52
+ added: added?,
53
+ changed: changed?,
54
+ deleted: deleted?,
55
+ )
56
+ end
57
+
58
+ def update(params)
59
+ # Remove old post
60
+ delete
61
+
62
+ # Init the new one
63
+ octopost = Octopress::Post.new(Octopress.site, {
64
+ "path" => @post.path,
65
+ "date" => params["date"],
66
+ "slug" => params["slug"],
67
+ "title" => params["title"],
68
+ "force" => true,
69
+ })
70
+
71
+ options = @site.config["octodmin"]["front_matter"].keys.map do |key|
72
+ [key, params[key]]
73
+ end.to_h
74
+
75
+ content = params["content"].gsub("\r\n", "\n").strip
76
+ result = "---\n#{options.map { |k, v| "#{k}: \"#{v}\"" }.join("\n")}\n---\n\n#{content}\n"
77
+ octopost.instance_variable_set(:@content, result)
78
+ octopost.write
79
+
80
+ @post = post_for(octopost)
81
+
82
+ # Add/reset post just in case
83
+ git = Git.open(Octodmin::App.dir)
84
+ git.add(octopost.path)
85
+ git.reset(octopost.path)
86
+ end
87
+
88
+ def delete
89
+ octopost = octopost_for(@post)
90
+ git = Git.open(Octodmin::App.dir)
91
+ git.lib.send(:command, "rm", ["-f", "--cached", octopost.path])
92
+ rescue Git::GitExecuteError
93
+ File.delete(octopost.path)
94
+ end
95
+
96
+ def restore
97
+ return unless deleted?
98
+
99
+ octopost = octopost_for(@post)
100
+ git = Git.open(Octodmin::App.dir)
101
+ git.add(octopost.path)
102
+
103
+ @site.reset
104
+ @post = post_for(octopost)
105
+ end
106
+
107
+ def revert
108
+ return unless changed?
109
+
110
+ octopost = octopost_for(@post)
111
+ git = Git.open(Octodmin::App.dir)
112
+ git.reset(octopost.path)
113
+ git.checkout(octopost.path)
114
+
115
+ @site.reset
116
+ @post = post_for(octopost)
117
+ end
118
+
119
+ private
120
+
121
+ def self.slug_for(site, title)
122
+ title.to_slug.transliterate(
123
+ site.config["octodmin"]["transliterate"]
124
+ ).normalize.to_s
125
+ end
126
+
127
+ def octopost_for(post)
128
+ Octopress::Post.new(Octopress.site, {
129
+ "path" => post.path,
130
+ "date" => post.date,
131
+ "slug" => post.slug,
132
+ "title" => post.title,
133
+ })
134
+ end
135
+
136
+ def post_for(octopost)
137
+ @site.posts.find do |post|
138
+ File.join(@site.site.source, post.post.path) == octopost.path
139
+ end.post
140
+ end
141
+
142
+ def has_status?(post, status)
143
+ path = File.join(@site.source, post.path)
144
+ changed = @site.status.public_send(status).keys
145
+ paths = changed.map { |path| File.join(Octodmin::App.dir, path) }
146
+ paths.include?(path)
147
+ end
148
+
149
+ def added?
150
+ has_status?(@post, :untracked) && !changed? && !deleted?
151
+ end
152
+
153
+ def changed?
154
+ has_status?(@post, :changed)
155
+ end
156
+
157
+ def deleted?
158
+ has_status?(@post, :deleted)
159
+ end
160
+ end
161
+ end
@@ -0,0 +1,61 @@
1
+ module Octodmin
2
+ class Site
3
+ attr_accessor :site
4
+
5
+ DEFAULT_CONFIG = {
6
+ "octodmin" => {
7
+ "transliterate" => "latin",
8
+ "front_matter" => {
9
+ "layout" => {
10
+ "type" => "text",
11
+ },
12
+ "title" => {
13
+ "type" => "text",
14
+ },
15
+ "slug" => {
16
+ "type" => "text",
17
+ },
18
+ "date" => {
19
+ "type" => "text",
20
+ },
21
+ },
22
+ },
23
+ }
24
+
25
+ def initialize
26
+ @site = Jekyll::Site.new(Jekyll.configuration)
27
+ end
28
+
29
+ def source
30
+ @site.source
31
+ end
32
+
33
+ def config
34
+ @config ||= Jekyll::Utils.deep_merge_hashes(DEFAULT_CONFIG, @site.config)
35
+ end
36
+
37
+ def serializable_hash
38
+ config
39
+ end
40
+
41
+ def posts
42
+ reset
43
+ @site.read
44
+ @site.posts.sort_by(&:date).last(20).reverse.map { |post| Post.new(post) }
45
+ end
46
+
47
+ def reset
48
+ @status = nil
49
+ @site.reset
50
+ self
51
+ end
52
+
53
+ def status
54
+ @status ||= Git.open(Octodmin::App.dir).status
55
+ end
56
+
57
+ def process
58
+ @site.process
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,3 @@
1
+ module Octodmin
2
+ VERSION = "0.1.0"
3
+ end
data/lib/octodmin.rb ADDED
@@ -0,0 +1,7 @@
1
+ require "jekyll"
2
+ require "octopress"
3
+ require "babosa"
4
+
5
+ require "octodmin/version"
6
+ require "octodmin/site"
7
+ require "octodmin/post"
data/octodmin.gemspec ADDED
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "octodmin/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "octodmin"
8
+ spec.version = Octodmin::VERSION
9
+ spec.authors = ["Dmitry Krasnoukhov"]
10
+ spec.email = ["dmitry@krasnoukhov.com"]
11
+ spec.summary = spec.description = %q{Content management for Jekyll blogs}
12
+ spec.homepage = "https://github.com/krasnoukhov/octodmin"
13
+ spec.license = "MIT"
14
+
15
+ spec.files = (`git ls-files -z`.split("\x0") + `find app`.split("\n")).uniq
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_runtime_dependency "octopress", ">= 3.0.0.rc"
21
+ spec.add_runtime_dependency "babosa", "~> 1.0"
22
+ spec.add_runtime_dependency "lotusrb", ">= 0.2.0"
23
+ spec.add_runtime_dependency "git", "~> 1.2.9"
24
+ end
data/sample/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ _site
2
+ .sass-cache
@@ -0,0 +1,55 @@
1
+ <footer class="site-footer">
2
+
3
+ <div class="wrapper">
4
+
5
+ <h2 class="footer-heading">{{ site.title }}</h2>
6
+
7
+ <div class="footer-col-wrapper">
8
+ <div class="footer-col footer-col-1">
9
+ <ul class="contact-list">
10
+ <li>{{ site.title }}</li>
11
+ <li><a href="mailto:{{ site.email }}">{{ site.email }}</a></li>
12
+ </ul>
13
+ </div>
14
+
15
+ <div class="footer-col footer-col-2">
16
+ <ul class="social-media-list">
17
+ {% if site.github_username %}
18
+ <li>
19
+ <a href="https://github.com/{{ site.github_username }}">
20
+ <span class="icon icon--github">
21
+ <svg viewBox="0 0 16 16">
22
+ <path fill="#828282" d="M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761 c0,3.428,2.223,6.337,5.307,7.363c0.388,0.071,0.53-0.168,0.53-0.374c0-0.184-0.007-0.672-0.01-1.32 c-2.159,0.469-2.614-1.04-2.614-1.04c-0.353-0.896-0.862-1.135-0.862-1.135c-0.705-0.481,0.053-0.472,0.053-0.472 c0.779,0.055,1.189,0.8,1.189,0.8c0.692,1.186,1.816,0.843,2.258,0.645c0.071-0.502,0.271-0.843,0.493-1.037 C4.86,11.425,3.049,10.76,3.049,7.786c0-0.847,0.302-1.54,0.799-2.082C3.768,5.507,3.501,4.718,3.924,3.65 c0,0,0.652-0.209,2.134,0.796C6.677,4.273,7.34,4.187,8,4.184c0.659,0.003,1.323,0.089,1.943,0.261 c1.482-1.004,2.132-0.796,2.132-0.796c0.423,1.068,0.157,1.857,0.077,2.054c0.497,0.542,0.798,1.235,0.798,2.082 c0,2.981-1.814,3.637-3.543,3.829c0.279,0.24,0.527,0.713,0.527,1.437c0,1.037-0.01,1.874-0.01,2.129 c0,0.208,0.14,0.449,0.534,0.373c3.081-1.028,5.302-3.935,5.302-7.362C15.76,3.906,12.285,0.431,7.999,0.431z"/>
23
+ </svg>
24
+ </span>
25
+
26
+ <span class="username">{{ site.github_username }}</span>
27
+ </a>
28
+ </li>
29
+ {% endif %}
30
+
31
+ {% if site.twitter_username %}
32
+ <li>
33
+ <a href="https://twitter.com/{{ site.twitter_username }}">
34
+ <span class="icon icon--twitter">
35
+ <svg viewBox="0 0 16 16">
36
+ <path fill="#828282" d="M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809
37
+ c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27 c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767 c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206 C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271 c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469 c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"/>
38
+ </svg>
39
+ </span>
40
+
41
+ <span class="username">{{ site.twitter_username }}</span>
42
+ </a>
43
+ </li>
44
+ {% endif %}
45
+ </ul>
46
+ </div>
47
+
48
+ <div class="footer-col footer-col-3">
49
+ <p class="text">{{ site.description }}</p>
50
+ </div>
51
+ </div>
52
+
53
+ </div>
54
+
55
+ </footer>
@@ -0,0 +1,12 @@
1
+ <head>
2
+ <meta charset="utf-8">
3
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
4
+ <meta name="viewport" content="width=device-width, initial-scale=1">
5
+
6
+ <title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
7
+ <meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
8
+
9
+ <link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
10
+ <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
11
+ <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
12
+ </head>
@@ -0,0 +1,27 @@
1
+ <header class="site-header">
2
+
3
+ <div class="wrapper">
4
+
5
+ <a class="site-title" href="{{ site.baseurl }}/">{{ site.title }}</a>
6
+
7
+ <nav class="site-nav">
8
+ <a href="#" class="menu-icon">
9
+ <svg viewBox="0 0 18 15">
10
+ <path fill="#424242" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
11
+ <path fill="#424242" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484 h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
12
+ <path fill="#424242" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
13
+ </svg>
14
+ </a>
15
+
16
+ <div class="trigger">
17
+ {% for page in site.pages %}
18
+ {% if page.title %}
19
+ <a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>
20
+ {% endif %}
21
+ {% endfor %}
22
+ </div>
23
+ </nav>
24
+
25
+ </div>
26
+
27
+ </header>
@@ -0,0 +1,20 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ {% include head.html %}
5
+
6
+ <body>
7
+
8
+ {% include header.html %}
9
+
10
+ <div class="page-content">
11
+ <div class="wrapper">
12
+ {{ content }}
13
+ </div>
14
+ </div>
15
+
16
+ {% include footer.html %}
17
+
18
+ </body>
19
+
20
+ </html>
@@ -0,0 +1,14 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <div class="post">
5
+
6
+ <header class="post-header">
7
+ <h1 class="post-title">{{ page.title }}</h1>
8
+ </header>
9
+
10
+ <article class="post-content">
11
+ {{ content }}
12
+ </article>
13
+
14
+ </div>