monad 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. checksums.yaml +7 -0
  2. data/CONTRIBUTING.markdown +91 -0
  3. data/Gemfile +1 -1
  4. data/History.markdown +772 -0
  5. data/{README.md → README.markdown} +5 -2
  6. data/Rakefile +163 -1
  7. data/bin/monad +86 -30
  8. data/features/create_sites.feature +54 -25
  9. data/features/data.feature +65 -0
  10. data/features/data_sources.feature +10 -10
  11. data/features/drafts.feature +5 -5
  12. data/features/embed_filters.feature +10 -10
  13. data/features/include_tag.feature +48 -0
  14. data/features/markdown.feature +5 -5
  15. data/features/pagination.feature +38 -10
  16. data/features/permalinks.feature +31 -11
  17. data/features/post_data.feature +41 -41
  18. data/features/post_excerpts.feature +50 -0
  19. data/features/site_configuration.feature +47 -26
  20. data/features/site_data.feature +30 -24
  21. data/features/step_definitions/{monad_steps.rb → jekyll_steps.rb} +66 -52
  22. data/features/support/env.rb +27 -8
  23. data/lib/jekyll.rb +99 -0
  24. data/lib/jekyll/cleaner.rb +73 -0
  25. data/lib/{monad → jekyll}/command.rb +6 -6
  26. data/lib/{monad → jekyll}/commands/build.rb +9 -9
  27. data/lib/jekyll/commands/doctor.rb +67 -0
  28. data/lib/jekyll/commands/new.rb +67 -0
  29. data/lib/jekyll/commands/serve.rb +65 -0
  30. data/lib/{monad → jekyll}/configuration.rb +60 -18
  31. data/lib/{monad → jekyll}/converter.rb +1 -1
  32. data/lib/{monad → jekyll}/converters/identity.rb +1 -1
  33. data/lib/{monad → jekyll}/converters/markdown.rb +2 -2
  34. data/lib/jekyll/converters/markdown/kramdown_parser.rb +29 -0
  35. data/lib/{monad → jekyll}/converters/markdown/maruku_parser.rb +12 -8
  36. data/lib/{monad → jekyll}/converters/markdown/rdiscount_parser.rb +4 -2
  37. data/lib/{monad → jekyll}/converters/markdown/redcarpet_parser.rb +1 -1
  38. data/lib/{monad → jekyll}/converters/textile.rb +1 -1
  39. data/lib/{monad → jekyll}/convertible.rb +39 -17
  40. data/lib/{monad → jekyll}/core_ext.rb +22 -4
  41. data/lib/jekyll/deprecator.rb +36 -0
  42. data/lib/{monad → jekyll}/draft.rb +1 -1
  43. data/lib/{monad → jekyll}/drivers/json_driver.rb +1 -1
  44. data/lib/{monad → jekyll}/drivers/yaml_driver.rb +1 -1
  45. data/lib/{monad → jekyll}/errors.rb +1 -1
  46. data/lib/jekyll/excerpt.rb +113 -0
  47. data/lib/{monad → jekyll}/filters.rb +16 -6
  48. data/lib/{monad → jekyll}/generator.rb +1 -1
  49. data/lib/jekyll/generators/pagination.rb +214 -0
  50. data/lib/{monad → jekyll}/layout.rb +4 -1
  51. data/lib/{monad → jekyll}/mime.types +0 -0
  52. data/lib/{monad → jekyll}/page.rb +36 -39
  53. data/lib/{monad → jekyll}/plugin.rb +1 -1
  54. data/lib/{monad → jekyll}/post.rb +58 -123
  55. data/lib/jekyll/related_posts.rb +59 -0
  56. data/lib/{monad → jekyll}/site.rb +120 -123
  57. data/lib/{monad → jekyll}/static_file.rb +1 -1
  58. data/lib/jekyll/stevenson.rb +89 -0
  59. data/lib/jekyll/tags/gist.rb +48 -0
  60. data/lib/{monad → jekyll}/tags/highlight.rb +3 -3
  61. data/lib/jekyll/tags/include.rb +135 -0
  62. data/lib/{monad → jekyll}/tags/post_url.rb +8 -6
  63. data/lib/jekyll/url.rb +67 -0
  64. data/lib/monad.rb +36 -27
  65. data/lib/site_template/_config.yml +2 -1
  66. data/lib/site_template/_layouts/default.html +21 -23
  67. data/lib/site_template/_layouts/post.html +1 -1
  68. data/lib/site_template/_posts/{0000-00-00-welcome-to-monad.markdown.erb → 0000-00-00-welcome-to-jekyll.markdown.erb} +6 -6
  69. data/lib/site_template/css/main.css +22 -27
  70. data/lib/site_template/index.html +2 -2
  71. data/monad.gemspec +153 -52
  72. data/site/.gitignore +4 -0
  73. data/site/CNAME +1 -0
  74. data/site/README +1 -0
  75. data/site/_config.yml +6 -0
  76. data/site/_includes/analytics.html +32 -0
  77. data/site/_includes/docs_contents.html +16 -0
  78. data/site/_includes/docs_contents_mobile.html +23 -0
  79. data/site/_includes/docs_option.html +11 -0
  80. data/site/_includes/docs_ul.html +20 -0
  81. data/site/_includes/footer.html +15 -0
  82. data/site/_includes/header.html +18 -0
  83. data/site/_includes/news_contents.html +23 -0
  84. data/site/_includes/news_contents_mobile.html +11 -0
  85. data/site/_includes/news_item.html +24 -0
  86. data/site/_includes/primary-nav-items.html +14 -0
  87. data/site/_includes/section_nav.html +22 -0
  88. data/site/_includes/top.html +17 -0
  89. data/site/_layouts/default.html +12 -0
  90. data/site/_layouts/docs.html +23 -0
  91. data/site/_layouts/news.html +19 -0
  92. data/site/_layouts/news_item.html +27 -0
  93. data/site/_posts/2013-05-06-jekyll-1-0-0-released.markdown +23 -0
  94. data/site/_posts/2013-05-08-jekyll-1-0-1-released.markdown +27 -0
  95. data/site/_posts/2013-05-12-jekyll-1-0-2-released.markdown +28 -0
  96. data/site/_posts/2013-06-07-jekyll-1-0-3-released.markdown +25 -0
  97. data/site/_posts/2013-07-14-jekyll-1-1-0-released.markdown +27 -0
  98. data/site/_posts/2013-07-24-jekyll-1-1-1-released.markdown +31 -0
  99. data/site/_posts/2013-07-25-jekyll-1-0-4-released.markdown +20 -0
  100. data/site/_posts/2013-07-25-jekyll-1-1-2-released.markdown +20 -0
  101. data/site/_posts/2013-09-06-jekyll-1-2-0-released.markdown +23 -0
  102. data/site/_posts/2013-09-14-jekyll-1-2-1-released.markdown +19 -0
  103. data/site/css/gridism.css +110 -0
  104. data/site/css/normalize.css +1 -0
  105. data/site/css/pygments.css +70 -0
  106. data/site/css/style.css +946 -0
  107. data/site/docs/configuration.md +373 -0
  108. data/site/docs/contributing.md +128 -0
  109. data/site/docs/datafiles.md +63 -0
  110. data/site/docs/deployment-methods.md +109 -0
  111. data/site/docs/drafts.md +20 -0
  112. data/site/docs/extras.md +56 -0
  113. data/site/docs/frontmatter.md +180 -0
  114. data/site/docs/github-pages.md +91 -0
  115. data/site/docs/heroku.md +9 -0
  116. data/site/docs/history.md +722 -0
  117. data/site/docs/index.md +52 -0
  118. data/site/docs/installation.md +76 -0
  119. data/site/docs/migrations.md +257 -0
  120. data/site/docs/pages.md +86 -0
  121. data/site/docs/pagination.md +211 -0
  122. data/site/docs/permalinks.md +180 -0
  123. data/site/docs/plugins.md +508 -0
  124. data/site/docs/posts.md +181 -0
  125. data/site/docs/quickstart.md +32 -0
  126. data/site/docs/resources.md +46 -0
  127. data/site/docs/sites.md +29 -0
  128. data/site/docs/structure.md +190 -0
  129. data/site/docs/templates.md +319 -0
  130. data/site/docs/troubleshooting.md +150 -0
  131. data/site/docs/upgrading.md +146 -0
  132. data/site/docs/usage.md +63 -0
  133. data/site/docs/variables.md +322 -0
  134. data/site/favicon.png +0 -0
  135. data/site/feed.xml +36 -0
  136. data/site/freenode.txt +1 -0
  137. data/site/img/article-footer.png +0 -0
  138. data/site/img/footer-arrow.png +0 -0
  139. data/site/img/footer-logo.png +0 -0
  140. data/site/img/logo-2x.png +0 -0
  141. data/site/img/octojekyll.png +0 -0
  142. data/site/img/tube.png +0 -0
  143. data/site/img/tube1x.png +0 -0
  144. data/site/index.html +90 -0
  145. data/site/js/modernizr-2.5.3.min.js +4 -0
  146. data/site/news/index.html +10 -0
  147. data/site/news/releases/index.html +10 -0
  148. data/test/helper.rb +6 -3
  149. data/test/source/+/foo.md +7 -0
  150. data/test/source/_data/languages.yml +2 -0
  151. data/test/source/_data/members.yaml +7 -0
  152. data/test/source/_data/products.yml +4 -0
  153. data/test/source/_includes/params.html +7 -0
  154. data/test/source/_layouts/default.html +1 -1
  155. data/test/source/_layouts/post/simple.html +1 -0
  156. data/test/source/_plugins/dummy.rb +1 -1
  157. data/test/source/_posts/2013-01-02-post-excerpt.markdown +1 -1
  158. data/test/source/_posts/2013-07-22-post-excerpt-with-layout.markdown +23 -0
  159. data/test/source/_posts/2013-08-01-mkdn-extension.mkdn +0 -0
  160. data/test/source/deal.with.dots.html +1 -1
  161. data/test/source/products.yml +4 -0
  162. data/test/test_configuration.rb +46 -11
  163. data/test/test_convertible.rb +2 -2
  164. data/test/test_excerpt.rb +78 -0
  165. data/test/test_filters.rb +4 -4
  166. data/test/test_generated_site.rb +13 -13
  167. data/test/test_json_driver.rb +9 -9
  168. data/test/test_kramdown.rb +32 -5
  169. data/test/test_new_command.rb +8 -8
  170. data/test/test_page.rb +12 -3
  171. data/test/test_pager.rb +34 -33
  172. data/test/test_post.rb +34 -26
  173. data/test/test_redcloth.rb +3 -3
  174. data/test/test_related_posts.rb +47 -0
  175. data/test/test_site.rb +102 -44
  176. data/test/test_tags.rb +168 -23
  177. data/test/test_url.rb +28 -0
  178. data/test/test_yaml_driver.rb +6 -6
  179. metadata +215 -137
  180. data/lib/monad/commands/doctor.rb +0 -29
  181. data/lib/monad/commands/new.rb +0 -50
  182. data/lib/monad/commands/serve.rb +0 -33
  183. data/lib/monad/converters/markdown/kramdown_parser.rb +0 -44
  184. data/lib/monad/deprecator.rb +0 -32
  185. data/lib/monad/generators/pagination.rb +0 -143
  186. data/lib/monad/logger.rb +0 -54
  187. data/lib/monad/tags/gist.rb +0 -30
  188. data/lib/monad/tags/include.rb +0 -37
Binary file
@@ -0,0 +1,36 @@
1
+ ---
2
+ layout: none
3
+ permalink: /feed.xml
4
+ ---
5
+
6
+ <?xml version="1.0" encoding="utf-8"?>
7
+ <rss version="2.0"
8
+ xmlns:content="http://purl.org/rss/1.0/modules/content/"
9
+ xmlns:wfw="http://wellformedweb.org/CommentAPI/"
10
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
11
+ xmlns:atom="http://www.w3.org/2005/Atom"
12
+ xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
13
+ xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
14
+ >
15
+ <channel>
16
+ <title xml:lang="en">Jekyll • Simple, blog-aware, static sites</title>
17
+ <atom:link type="application/atom+xml" href="http://jekyllrb.com/feed/" rel="self"/>
18
+ <link>http://jekyllrb.com</link>
19
+ <pubDate>{{ site.time | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
20
+ <lastBuildDate>{{ site.time | date: "%a, %d %b %Y %H:%M:%S %z" }}</lastBuildDate>
21
+ <language>en-US</language>
22
+ <description>Transform your plain text into static websites and blogs.</description>
23
+ {% for post in site.posts %}
24
+ <item>
25
+ <title>{{ post.title | xml_escape}}</title>
26
+ <link>http://jekyllrb.com{{ post.url }}</link>
27
+ <pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
28
+ <dc:creator>{{ post.author }}</dc:creator>
29
+ {% for tag in post.tags %}<category>{{ tag | xml_escape }}</category>
30
+ {% endfor %}{% for cat in post.categories %}<category>{{ cat | xml_escape }}</category>
31
+ {% endfor %}<guid isPermaLink="false">{{ post.id }}</guid>
32
+ <description><![CDATA[ {{ post.content }} ]]></description>
33
+ </item>
34
+ {% endfor %}
35
+ </channel>
36
+ </rss>
@@ -0,0 +1 @@
1
+ aS3gAc4g
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,90 @@
1
+ ---
2
+ layout: default
3
+ title: Jekyll &bull; Simple, blog-aware, static sites
4
+ overview: true
5
+ ---
6
+
7
+ <section class="intro">
8
+ <div class="grid">
9
+ <div class="unit whole center-on-mobiles">
10
+ <p class="first">Transform your plain text into static&nbsp;websites and&nbsp;blogs.</p>
11
+ </div>
12
+ </div>
13
+ </section>
14
+ <section class="features">
15
+ <div class="grid">
16
+ <div class="unit one-third">
17
+ <h2>Simple</h2>
18
+ <p>
19
+ No more databases, comment moderation, or pesky updates to install—just <em>your content</em>.
20
+ </p>
21
+ <a href="/docs/usage/" class="">How Jekyll works &rarr;</a>
22
+ </div>
23
+ <div class="unit one-third">
24
+ <h2>Static</h2>
25
+ <p><a href="http://daringfireball.net/projects/markdown/">Markdown</a> (or <a href="http://textile.sitemonks.com/">Textile</a>), <a href="http://wiki.shopify.com/Liquid">Liquid</a>, HTML <span class="amp">&amp;</span> CSS go in. Static sites come out ready for deployment.</p>
26
+ <a href="/docs/templates/" class="">Jekyll template guide &rarr;</a>
27
+ </div>
28
+ <div class="unit one-third">
29
+ <h2>Blog-aware</h2>
30
+ <p>
31
+ Permalinks, categories, pages, posts, and custom layouts are all first-class citizens here.
32
+ </p>
33
+ <a href="/docs/migrations/" class="">Migrate your blog &rarr;</a>
34
+ </div>
35
+ <div class="clear"></div>
36
+ </div>
37
+ </section>
38
+ <section class="quickstart">
39
+ <div class="grid">
40
+ <div class="unit golden-small center-on-mobiles">
41
+ <h4>Get up and running <em>in&nbsp;seconds</em>.</h4>
42
+ </div>
43
+ <div class="unit golden-large code">
44
+ <p class="title">Quick-start Instructions</p>
45
+ <div class="shell">
46
+ <p class="line">
47
+ <span class="path">~</span>
48
+ <span class="prompt">$</span>
49
+ <span class="command">gem install jekyll</span>
50
+ </p>
51
+ <p class="line">
52
+ <span class="path">~</span>
53
+ <span class="prompt">$</span>
54
+ <span class="command">jekyll new my-awesome-site</span>
55
+ </p>
56
+ <p class="line">
57
+ <span class="path">~</span>
58
+ <span class="prompt">$</span>
59
+ <span class="command">cd my-awesome-site</span>
60
+ </p>
61
+ <p class="line">
62
+ <span class="path">~/my-awesome-site</span>
63
+ <span class="prompt">$</span>
64
+ <span class="command">jekyll serve</span>
65
+ </p>
66
+ <p class="line">
67
+ <span class="output"># => Now browse to http://localhost:4000</span>
68
+ </p>
69
+ </div>
70
+ </div>
71
+ <div class="clear"></div>
72
+ </div>
73
+ </section>
74
+ <section class="free-hosting">
75
+ <div class="grid">
76
+ <div class="unit whole">
77
+ <div class="grid pane">
78
+ <div class="unit whole center-on-mobiles">
79
+ <img src="img/octojekyll.png" alt="Free Jekyll hosting on GitHub Pages">
80
+ <div class="pane-content">
81
+ <h2 class="center-on-mobiles"><strong>Free hosting</strong> with GitHub Pages</h2>
82
+ <p>Sick of dealing with hosting companies? <a href="http://pages.github.com/">GitHub Pages</a> are <em>powered by Jekyll</em>, so you can easily deploy your site using GitHub for free&mdash;<a href="https://help.github.com/articles/setting-up-a-custom-domain-with-pages">custom domain name</a> and&nbsp;all.</p>
83
+ <a href="http://pages.github.com/" class="">Learn more about GitHub Pages &rarr;</a>
84
+ </div>
85
+ </div>
86
+ <div class="clear"></div>
87
+ </div>
88
+ </div>
89
+ </div>
90
+ </section>
@@ -0,0 +1,4 @@
1
+ /* Modernizr 2.5.3 (Custom Build) | MIT & BSD
2
+ * Build: http://www.modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
3
+ */
4
+ ;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a)if(j[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.substr(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function L(){e.input=function(c){for(var d=0,e=c.length;d<e;d++)u[c[d]]=c[d]in k;return u.list&&(u.list=!!b.createElement("datalist")&&!!a.HTMLDataListElement),u}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)k.setAttribute("type",f=a[d]),e=k.type!=="text",e&&(k.value=l,k.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&k.style.WebkitAppearance!==c?(g.appendChild(k),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(k,null).WebkitAppearance!=="textfield"&&k.offsetHeight!==0,g.removeChild(k)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=k.checkValidity&&k.checkValidity()===!1:/^color$/.test(f)?(g.appendChild(k),g.offsetWidth,e=k.value!=l,g.removeChild(k)):e=k.value!=l)),t[a[d]]=!!e;return t}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var d="2.5.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k=b.createElement("input"),l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={svg:"http://www.w3.org/2000/svg"},s={},t={},u={},v=[],w=v.slice,x,y=function(a,c,d,e){var f,i,j,k=b.createElement("div"),l=b.body,m=l?l:b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),k.appendChild(j);return f=["&#173;","<style>",a,"</style>"].join(""),k.id=h,m.innerHTML+=f,m.appendChild(k),l||(m.style.background="",g.appendChild(m)),i=c(k,a),l?k.parentNode.removeChild(k):m.parentNode.removeChild(m),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e});var K=function(c,d){var f=c.join(""),g=d.length;y(f,function(c,d){var f=b.styleSheets[b.styleSheets.length-1],h=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"",i=c.childNodes,j={};while(g--)j[i[g].id]=i[g];e.touch="ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch||(j.touch&&j.touch.offsetTop)===9,e.csstransforms3d=(j.csstransforms3d&&j.csstransforms3d.offsetLeft)===9&&j.csstransforms3d.offsetHeight===3,e.generatedcontent=(j.generatedcontent&&j.generatedcontent.offsetHeight)>=1,e.fontface=/src/i.test(h)&&h.indexOf(d.split(" ")[0])===0},g,d)}(['@font-face {font-family:"font";src:url("https://")}',["@media (",n.join("touch-enabled),("),h,")","{#touch{top:9px;position:absolute}}"].join(""),["@media (",n.join("transform-3d),("),h,")","{#csstransforms3d{left:9px;position:absolute;height:3px;}}"].join(""),['#generatedcontent:after{content:"',l,'";visibility:hidden}'].join("")],["fontface","touch","csstransforms3d","generatedcontent"]);s.flexbox=function(){return J("flexOrder")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){try{var d=b.createElement("canvas"),e;e=!(!a.WebGLRenderingContext||!d.getContext("experimental-webgl")&&!d.getContext("webgl")),d=c}catch(f){e=!1}return e},s.touch=function(){return e.touch},s.geolocation=function(){return!!navigator.geolocation},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){for(var b=-1,c=p.length;++b<c;)if(a[p[b]+"WebSocket"])return!0;return"WebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&(a=e.csstransforms3d),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){return e.fontface},s.generatedcontent=function(){return e.generatedcontent},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var M in s)C(s,M)&&(x=M.toLowerCase(),e[x]=s[M](),v.push((e[x]?"":"no-")+x));return e.input||L(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,g.className+=" "+(b?"":"no-")+a,e[a]=b}return e},D(""),i=k=null,function(a,b){function g(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function h(){var a=k.elements;return typeof a=="string"?a.split(" "):a}function i(a){var b={},c=a.createElement,e=a.createDocumentFragment,f=e();a.createElement=function(a){var e=(b[a]||(b[a]=c(a))).cloneNode();return k.shivMethods&&e.canHaveChildren&&!d.test(a)?f.appendChild(e):e},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+h().join().replace(/\w+/g,function(a){return b[a]=c(a),f.createElement(a),'c("'+a+'")'})+");return n}")(k,f)}function j(a){var b;return a.documentShived?a:(k.shivCSS&&!e&&(b=!!g(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),f||(b=!i(a)),b&&(a.documentShived=b),a)}var c=a.html5||{},d=/^<|^(?:button|form|map|select|textarea)$/i,e,f;(function(){var a=b.createElement("a");a.innerHTML="<xyz></xyz>",e="hidden"in a,f=a.childNodes.length==1||function(){try{b.createElement("a")}catch(a){return!0}var c=b.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()})();var k={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:j};a.html5=k,j(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return o.call(a)=="[object Function]"}function e(a){return typeof a=="string"}function f(){}function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){a!="img"&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l={},o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),a!="img"&&(r||y[c]===2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return o.call(a)=="[object Array]"},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,i){var j=b(a),l=j.autoCallback;j.url.split(".").pop().split("?").shift(),j.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]||h),j.instead?j.instead(a,e,f,g,i):(y[j.url]?j.noexec=!0:y[j.url]=1,f.load(j.url,j.forceCSS||!j.forceJS&&"css"==j.url.split(".").pop().split("?").shift()?"c":c,j.noexec,j.attrs,j.timeout),(d(e)||d(l))&&f.load(function(){k(),e&&e(j.origUrl,i,g),l&&l(j.origUrl,i,g),y[j.url]=2})))}function i(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var j,l,m=this.yepnope.loader;if(e(a))g(a,0,m,0);else if(w(a))for(j=0;j<a.length;j++)l=a[j],e(l)?g(l,0,m,0):w(l)?B(l):Object(l)===l&&i(l,m);else Object(a)===a&&i(a,m)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
@@ -0,0 +1,10 @@
1
+ ---
2
+ layout: news
3
+ title: News
4
+ permalink: /news/
5
+ author: all
6
+ ---
7
+
8
+ {% for post in site.posts %}
9
+ {% include news_item.html %}
10
+ {% endfor %}
@@ -0,0 +1,10 @@
1
+ ---
2
+ layout: news
3
+ title: Releases
4
+ permalink: /news/releases/
5
+ author: all
6
+ ---
7
+
8
+ {% for post in site.categories.release %}
9
+ {% include news_item.html %}
10
+ {% endfor %}
@@ -1,14 +1,17 @@
1
- if RUBY_VERSION > '1.9' && ENV["COVERAGE"] == "true"
1
+ if RUBY_VERSION > '1.9'
2
2
  require 'simplecov'
3
3
  require 'simplecov-gem-adapter'
4
4
  SimpleCov.start('gem')
5
+
6
+ require 'coveralls'
7
+ Coveralls.wear_merged!
5
8
  end
6
9
 
7
10
  require 'rubygems'
8
11
  require 'test/unit'
9
12
  require 'ostruct'
10
13
 
11
- require 'monad'
14
+ require 'jekyll'
12
15
 
13
16
  require 'RedCloth'
14
17
  require 'rdiscount'
@@ -23,7 +26,7 @@ require 'webmock'
23
26
  include WebMock::API
24
27
  WebMock.allow_net_connect!
25
28
 
26
- include Monad
29
+ include Jekyll
27
30
 
28
31
  # Send STDERR into the void to suppress program output messages
29
32
  STDERR.reopen(test(?e, '/dev/null') ? '/dev/null' : 'NUL:')
@@ -0,0 +1,7 @@
1
+ ---
2
+ layout: default
3
+ title : Page inside +
4
+ permalink: plus+in+url
5
+ ---
6
+ Line 1
7
+ {{ page.title }}
@@ -0,0 +1,2 @@
1
+ - java
2
+ - ruby
@@ -0,0 +1,7 @@
1
+ - name: Jack
2
+ age: 27
3
+ blog: http://example.com/jack
4
+
5
+ - name: John
6
+ age: 32
7
+ blog: http://example.com/john
@@ -0,0 +1,4 @@
1
+ - name: sugar
2
+ price: 5.3
3
+ - name: salt
4
+ price: 2.5
@@ -0,0 +1,7 @@
1
+ <span id='include-param'>{{include.param}}</span>
2
+
3
+ <ul id='param-list'>
4
+ {% for param in include %}
5
+ <li>{{param[0]}} = {{param[1]}}</li>
6
+ {% endfor %}
7
+ </ul>
@@ -19,7 +19,7 @@
19
19
  <div class="title">
20
20
  Tom Preston-Werner
21
21
  </div>
22
-
22
+
23
23
  {{ content }}
24
24
  </div>
25
25
 
@@ -0,0 +1 @@
1
+ <<< {{ content }} >>>
@@ -1,4 +1,4 @@
1
- module Monad
1
+ module Jekyll
2
2
  class Dummy < Generator
3
3
  priority :high
4
4
 
@@ -11,4 +11,4 @@ Second paragraph
11
11
 
12
12
  Third paragraph
13
13
 
14
- [link]: http://www.monadrb.com/
14
+ [link]: http://www.jekyllrb.com/
@@ -0,0 +1,23 @@
1
+ ---
2
+ layout: post
3
+ title: Post Excerpt with Layout
4
+ categories:
5
+ - bar
6
+ - baz
7
+ - z_category
8
+ tags:
9
+ - first
10
+ - second
11
+ - third
12
+ - jekyllrb.com
13
+ ---
14
+
15
+ First paragraph with [link ref][link].
16
+
17
+ Second paragraph
18
+
19
+ ---
20
+
21
+ Third paragraph
22
+
23
+ [link]: http://www.jekyllrb.com/
@@ -3,5 +3,5 @@ title: Deal with dots
3
3
  permalink: /deal.with.dots/
4
4
  ---
5
5
 
6
- Let's test if monad deals properly with dots.
6
+ Let's test if jekyll deals properly with dots.
7
7
 
@@ -0,0 +1,4 @@
1
+ - name: sugar
2
+ price: 5.3
3
+ - name: salt
4
+ price: 2.5
@@ -51,9 +51,11 @@ class TestConfiguration < Test::Unit::TestCase
51
51
  context "#backwards_compatibilize" do
52
52
  setup do
53
53
  @config = Configuration[{
54
- "auto" => true,
55
- "watch" => true,
56
- "server" => true
54
+ "auto" => true,
55
+ "watch" => true,
56
+ "server" => true,
57
+ "exclude" => "READ-ME.md, Gemfile,CONTRIBUTING.hello.markdown",
58
+ "include" => "STOP_THE_PRESSES.txt,.heloses, .git"
57
59
  }]
58
60
  end
59
61
  should "unset 'auto' and 'watch'" do
@@ -66,29 +68,62 @@ class TestConfiguration < Test::Unit::TestCase
66
68
  assert @config.has_key?("server")
67
69
  assert !@config.backwards_compatibilize.has_key?("server")
68
70
  end
71
+ should "transform string exclude into an array" do
72
+ assert @config.has_key?("exclude")
73
+ assert @config.backwards_compatibilize.has_key?("exclude")
74
+ assert_equal @config.backwards_compatibilize["exclude"], %w[READ-ME.md Gemfile CONTRIBUTING.hello.markdown]
75
+ end
76
+ should "transform string include into an array" do
77
+ assert @config.has_key?("include")
78
+ assert @config.backwards_compatibilize.has_key?("include")
79
+ assert_equal @config.backwards_compatibilize["include"], %w[STOP_THE_PRESSES.txt .heloses .git]
80
+ end
81
+ end
82
+ context "#fix_common_issues" do
83
+ setup do
84
+ @config = Proc.new do |val|
85
+ Configuration[{
86
+ 'paginate' => val
87
+ }]
88
+ end
89
+ end
90
+ should "sets an invalid 'paginate' value to nil" do
91
+ assert_nil @config.call(0).fix_common_issues['paginate']
92
+ assert_nil @config.call(-1).fix_common_issues['paginate']
93
+ assert_nil @config.call(true).fix_common_issues['paginate']
94
+ end
69
95
  end
70
96
  context "loading configuration" do
71
97
  setup do
72
98
  @path = File.join(Dir.pwd, '_config.yml')
99
+ @user_config = File.join(Dir.pwd, "my_config_file.yml")
73
100
  end
74
101
 
75
102
  should "fire warning with no _config.yml" do
76
103
  mock(YAML).safe_load_file(@path) { raise SystemCallError, "No such file or directory - #{@path}" }
77
104
  mock($stderr).puts("Configuration file: none".yellow)
78
- assert_equal Monad::Configuration::DEFAULTS, Monad.configuration({})
105
+ assert_equal Jekyll::Configuration::DEFAULTS, Jekyll.configuration({})
79
106
  end
80
107
 
81
108
  should "load configuration as hash" do
82
109
  mock(YAML).safe_load_file(@path) { Hash.new }
83
110
  mock($stdout).puts("Configuration file: #{@path}")
84
- assert_equal Monad::Configuration::DEFAULTS, Monad.configuration({})
111
+ assert_equal Jekyll::Configuration::DEFAULTS, Jekyll.configuration({})
85
112
  end
86
113
 
87
114
  should "fire warning with bad config" do
88
115
  mock(YAML).safe_load_file(@path) { Array.new }
89
116
  mock($stderr).puts(("WARNING: ".rjust(20) + "Error reading configuration. Using defaults (and options).").yellow)
90
117
  mock($stderr).puts("Configuration file: (INVALID) #{@path}".yellow)
91
- assert_equal Monad::Configuration::DEFAULTS, Monad.configuration({})
118
+ assert_equal Jekyll::Configuration::DEFAULTS, Jekyll.configuration({})
119
+ end
120
+
121
+ should "fire warning when user-specified config file isn't there" do
122
+ mock(YAML).safe_load_file(@user_config) { raise SystemCallError, "No such file or directory - #{@user_config}" }
123
+ mock($stderr).puts(("Fatal: ".rjust(20) + "The configuration file '#{@user_config}' could not be found.").red)
124
+ assert_raises LoadError do
125
+ Jekyll.configuration({'config' => [@user_config]})
126
+ end
92
127
  end
93
128
  end
94
129
  context "loading config from external file" do
@@ -103,19 +138,19 @@ class TestConfiguration < Test::Unit::TestCase
103
138
  should "load default config if no config_file is set" do
104
139
  mock(YAML).safe_load_file(@paths[:default]) { Hash.new }
105
140
  mock($stdout).puts("Configuration file: #{@paths[:default]}")
106
- assert_equal Monad::Configuration::DEFAULTS, Monad.configuration({})
141
+ assert_equal Jekyll::Configuration::DEFAULTS, Jekyll.configuration({})
107
142
  end
108
143
 
109
144
  should "load different config if specified" do
110
145
  mock(YAML).safe_load_file(@paths[:other]) { {"baseurl" => "http://wahoo.dev"} }
111
146
  mock($stdout).puts("Configuration file: #{@paths[:other]}")
112
- assert_equal Monad::Configuration::DEFAULTS.deep_merge({ "baseurl" => "http://wahoo.dev" }), Monad.configuration({ "config" => @paths[:other] })
147
+ assert_equal Jekyll::Configuration::DEFAULTS.deep_merge({ "baseurl" => "http://wahoo.dev" }), Jekyll.configuration({ "config" => @paths[:other] })
113
148
  end
114
149
 
115
150
  should "load default config if path passed is empty" do
116
151
  mock(YAML).safe_load_file(@paths[:default]) { Hash.new }
117
152
  mock($stdout).puts("Configuration file: #{@paths[:default]}")
118
- assert_equal Monad::Configuration::DEFAULTS, Monad.configuration({ "config" => @paths[:empty] })
153
+ assert_equal Jekyll::Configuration::DEFAULTS, Jekyll.configuration({ "config" => @paths[:empty] })
119
154
  end
120
155
 
121
156
  should "load multiple config files" do
@@ -123,7 +158,7 @@ class TestConfiguration < Test::Unit::TestCase
123
158
  mock(YAML).safe_load_file(@paths[:other]) { Hash.new }
124
159
  mock($stdout).puts("Configuration file: #{@paths[:default]}")
125
160
  mock($stdout).puts("Configuration file: #{@paths[:other]}")
126
- assert_equal Monad::Configuration::DEFAULTS, Monad.configuration({ "config" => [@paths[:default], @paths[:other]] })
161
+ assert_equal Jekyll::Configuration::DEFAULTS, Jekyll.configuration({ "config" => [@paths[:default], @paths[:other]] })
127
162
  end
128
163
 
129
164
  should "load multiple config files and last config should win" do
@@ -131,7 +166,7 @@ class TestConfiguration < Test::Unit::TestCase
131
166
  mock(YAML).safe_load_file(@paths[:other]) { {"baseurl" => "http://wahoo.dev"} }
132
167
  mock($stdout).puts("Configuration file: #{@paths[:default]}")
133
168
  mock($stdout).puts("Configuration file: #{@paths[:other]}")
134
- assert_equal Monad::Configuration::DEFAULTS.deep_merge({ "baseurl" => "http://wahoo.dev" }), Monad.configuration({ "config" => [@paths[:default], @paths[:other]] })
169
+ assert_equal Jekyll::Configuration::DEFAULTS.deep_merge({ "baseurl" => "http://wahoo.dev" }), Jekyll.configuration({ "config" => [@paths[:default], @paths[:other]] })
135
170
  end
136
171
  end
137
172
  end
@@ -5,7 +5,7 @@ class TestConvertible < Test::Unit::TestCase
5
5
  context "yaml front-matter" do
6
6
  setup do
7
7
  @convertible = OpenStruct.new
8
- @convertible.extend Monad::Convertible
8
+ @convertible.extend Jekyll::Convertible
9
9
  @base = File.expand_path('../fixtures', __FILE__)
10
10
  end
11
11
 
@@ -40,7 +40,7 @@ class TestConvertible < Test::Unit::TestCase
40
40
  should "not parse if there is encoding error in file" do
41
41
  name = 'broken_front_matter3.erb'
42
42
  out = capture_stdout do
43
- ret = @convertible.read_yaml(@base, name)
43
+ ret = @convertible.read_yaml(@base, name, :encoding => 'utf-8')
44
44
  assert_equal({}, ret)
45
45
  end
46
46
  assert_match(/invalid byte sequence in UTF-8/, out)