jekyll 2.0.0.alpha.1 → 2.0.0.alpha.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jekyll might be problematic. Click here for more details.

Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +15 -0
  3. data/.travis.yml +27 -0
  4. data/History.markdown +66 -1
  5. data/LICENSE +2 -2
  6. data/README.markdown +2 -2
  7. data/Rakefile +4 -44
  8. data/bin/jekyll +10 -113
  9. data/docs/jp/CONTRIBUTING.jp.markdown +93 -0
  10. data/docs/jp/README.jp.markdown +69 -0
  11. data/features/create_sites.feature +12 -12
  12. data/features/drafts.feature +23 -2
  13. data/features/embed_filters.feature +7 -5
  14. data/features/include_tag.feature +7 -7
  15. data/features/markdown.feature +4 -4
  16. data/features/pagination.feature +2 -2
  17. data/features/permalinks.feature +7 -7
  18. data/features/post_data.feature +21 -21
  19. data/features/post_excerpts.feature +6 -6
  20. data/features/site_configuration.feature +17 -17
  21. data/features/site_data.feature +15 -15
  22. data/features/step_definitions/jekyll_steps.rb +4 -4
  23. data/features/support/env.rb +2 -2
  24. data/jekyll.gemspec +17 -284
  25. data/lib/jekyll.rb +21 -5
  26. data/lib/jekyll/command.rb +72 -20
  27. data/lib/jekyll/commands/build.rb +82 -58
  28. data/lib/jekyll/commands/docs.rb +30 -0
  29. data/lib/jekyll/commands/doctor.rb +18 -1
  30. data/lib/jekyll/commands/new.rb +19 -6
  31. data/lib/jekyll/commands/serve.rb +80 -49
  32. data/lib/jekyll/configuration.rb +3 -3
  33. data/lib/jekyll/converters/markdown/kramdown_parser.rb +1 -1
  34. data/lib/jekyll/converters/markdown/redcarpet_parser.rb +1 -0
  35. data/lib/jekyll/convertible.rb +19 -21
  36. data/lib/jekyll/draft.rb +5 -0
  37. data/lib/jekyll/excerpt.rb +5 -5
  38. data/lib/jekyll/layout.rb +2 -2
  39. data/lib/jekyll/layout_reader.rb +15 -2
  40. data/lib/jekyll/page.rb +17 -17
  41. data/lib/jekyll/post.rb +33 -33
  42. data/lib/jekyll/related_posts.rb +5 -5
  43. data/lib/jekyll/site.rb +84 -85
  44. data/lib/jekyll/static_file.rb +13 -0
  45. data/lib/jekyll/stevenson.rb +1 -1
  46. data/lib/jekyll/tags/highlight.rb +16 -6
  47. data/lib/jekyll/tags/include.rb +17 -17
  48. data/lib/jekyll/url.rb +2 -0
  49. data/lib/jekyll/utils.rb +79 -0
  50. data/lib/jekyll/version.rb +3 -0
  51. data/lib/site_template/_config.yml +3 -1
  52. data/lib/site_template/_includes/footer.html +61 -0
  53. data/lib/site_template/_includes/head.html +12 -0
  54. data/lib/site_template/_includes/header.html +27 -0
  55. data/lib/site_template/_layouts/default.html +9 -34
  56. data/lib/site_template/_layouts/page.html +14 -0
  57. data/lib/site_template/_layouts/post.html +11 -5
  58. data/lib/site_template/_posts/0000-00-00-this-post-demonstrates-post-content-styles.md +88 -0
  59. data/lib/site_template/about/index.md +10 -0
  60. data/lib/site_template/css/main.css +333 -100
  61. data/lib/site_template/feed.xml +21 -0
  62. data/lib/site_template/index.html +8 -4
  63. data/lib/site_template/projects/index.md +14 -0
  64. data/script/cibuild +0 -1
  65. data/script/rebund +1 -1
  66. data/site/_includes/analytics.html +2 -2
  67. data/site/_includes/css/normalize.css +1 -1
  68. data/site/_includes/css/style.css +28 -4
  69. data/site/_includes/docs_option.html +1 -1
  70. data/site/_includes/docs_ul.html +3 -3
  71. data/site/_includes/footer.html +1 -1
  72. data/site/_includes/header.html +2 -2
  73. data/site/_includes/news_item.html +1 -1
  74. data/site/_includes/primary-nav-items.html +4 -4
  75. data/site/_includes/section_nav.html +2 -2
  76. data/site/_includes/top.html +6 -7
  77. data/site/_layouts/news_item.html +1 -1
  78. data/site/_posts/2013-07-25-jekyll-1-0-4-released.markdown +1 -1
  79. data/site/_posts/2013-07-25-jekyll-1-1-2-released.markdown +1 -1
  80. data/site/_posts/2013-09-14-jekyll-1-2-1-released.markdown +1 -1
  81. data/site/_posts/2014-03-24-jekyll-1-5-0-released.markdown +19 -0
  82. data/site/docs/assets.md +14 -0
  83. data/site/docs/configuration.md +65 -56
  84. data/site/docs/contributing.md +7 -2
  85. data/site/docs/deployment-methods.md +1 -1
  86. data/site/docs/github-pages.md +1 -1
  87. data/site/docs/history.md +21 -0
  88. data/site/docs/index.md +7 -1
  89. data/site/docs/installation.md +28 -0
  90. data/site/docs/migrations.md +1 -1
  91. data/site/docs/plugins.md +6 -0
  92. data/site/docs/structure.md +3 -3
  93. data/site/docs/templates.md +44 -44
  94. data/site/docs/usage.md +1 -1
  95. data/site/docs/variables.md +15 -2
  96. data/site/favicon.png +0 -0
  97. data/site/feed.xml +0 -1
  98. data/site/img/article-footer.png +0 -0
  99. data/site/img/footer-arrow.png +0 -0
  100. data/site/img/footer-logo.png +0 -0
  101. data/site/img/logo-2x.png +0 -0
  102. data/site/img/octojekyll.png +0 -0
  103. data/site/img/tube.png +0 -0
  104. data/site/img/tube1x.png +0 -0
  105. data/site/index.html +5 -5
  106. data/site/js/modernizr-2.7.1.min.js +4 -0
  107. data/test/helper.rb +11 -0
  108. data/test/source/_drafts/draft-properties.text +11 -0
  109. data/test/source/_posts/2011-04-12-md-extension.md +1 -1
  110. data/test/source/_posts/2014-01-06-permalink-traversal.md +5 -0
  111. data/test/source/exploit.md +5 -0
  112. data/test/source/static_files.html +4 -0
  113. data/test/test_configuration.rb +2 -2
  114. data/test/test_draft.rb +56 -0
  115. data/test/test_excerpt.rb +2 -2
  116. data/test/test_filters.rb +1 -1
  117. data/test/test_generated_site.rb +10 -1
  118. data/test/test_kramdown.rb +1 -1
  119. data/test/test_layout_reader.rb +17 -0
  120. data/test/test_page.rb +10 -0
  121. data/test/test_pager.rb +4 -2
  122. data/test/test_path_sanitization.rb +14 -0
  123. data/test/test_post.rb +12 -1
  124. data/test/test_sass.rb +1 -64
  125. data/test/test_site.rb +26 -1
  126. data/test/test_tags.rb +39 -2
  127. data/test/{test_core_ext.rb → test_utils.rb} +12 -12
  128. metadata +200 -86
  129. data/lib/jekyll/converters/sass.rb +0 -58
  130. data/lib/jekyll/core_ext.rb +0 -55
  131. data/lib/site_template/css/syntax.css +0 -60
  132. data/site/js/modernizr-2.5.3.min.js +0 -4
@@ -56,10 +56,20 @@ eos
56
56
 
57
57
  @options[:encoding] = 'utf-8'
58
58
 
59
- output = add_code_tags(
60
- Pygments.highlight(code, :lexer => @lang, :options => @options),
61
- @lang
62
- )
59
+ highlighted_code = Pygments.highlight(code, :lexer => @lang, :options => @options)
60
+
61
+ if highlighted_code.nil?
62
+ Jekyll.logger.error "There was an error highlighting your code:"
63
+ puts
64
+ Jekyll.logger.error code
65
+ puts
66
+ Jekyll.logger.error "While attempting to convert the above code, Pygments.rb" +
67
+ " returned an unacceptable value."
68
+ Jekyll.logger.error "This is usually a timeout problem solved by running `jekyll build` again."
69
+ raise ArgumentError.new("Pygments.rb returned an unacceptable value when attempting to highlight some code.")
70
+ end
71
+
72
+ output = add_code_tags(highlighted_code, @lang)
63
73
 
64
74
  output = context["highlighter_prefix"] + output if context["highlighter_prefix"]
65
75
  output << context["highlighter_suffix"] if context["highlighter_suffix"]
@@ -89,14 +99,14 @@ eos
89
99
  #The div is required because RDiscount blows ass
90
100
  <<-HTML
91
101
  <div>
92
- <pre><code class='#{@lang}'>#{h(code).strip}</code></pre>
102
+ <pre><code class='#{@lang.to_s.gsub("+", "-")}'>#{h(code).strip}</code></pre>
93
103
  </div>
94
104
  HTML
95
105
  end
96
106
 
97
107
  def add_code_tags(code, lang)
98
108
  # Add nested <code> tags to code blocks
99
- code = code.sub(/<pre>/,'<pre><code class="' + lang + '">')
109
+ code = code.sub(/<pre>/,'<pre><code class="' + lang.to_s.gsub("+", "-") + '">')
100
110
  code = code.sub(/<\/pre>/,"</code></pre>")
101
111
  end
102
112
 
@@ -55,11 +55,11 @@ module Jekyll
55
55
  raise ArgumentError.new <<-eos
56
56
  Invalid syntax for include tag. File contains invalid characters or sequences:
57
57
 
58
- #{file}
58
+ #{file}
59
59
 
60
60
  Valid syntax:
61
61
 
62
- #{SYNTAX_EXAMPLE}
62
+ #{SYNTAX_EXAMPLE}
63
63
 
64
64
  eos
65
65
  end
@@ -71,11 +71,11 @@ eos
71
71
  raise ArgumentError.new <<-eos
72
72
  Invalid syntax for include tag:
73
73
 
74
- #{@params}
74
+ #{@params}
75
75
 
76
76
  Valid syntax:
77
77
 
78
- #{SYNTAX_EXAMPLE}
78
+ #{SYNTAX_EXAMPLE}
79
79
 
80
80
  eos
81
81
  end
@@ -95,14 +95,13 @@ eos
95
95
  end
96
96
 
97
97
  def render(context)
98
- dir = File.join(context.registers[:site].source, INCLUDES_DIR)
99
- validate_dir(dir, context.registers[:site].safe)
98
+ dir = File.join(File.realpath(context.registers[:site].source), INCLUDES_DIR)
100
99
 
101
100
  file = render_variable(context) || @file
102
101
  validate_file_name(file)
103
102
 
104
103
  path = File.join(dir, file)
105
- validate_file(context.registers[:site].source, path, context.registers[:site].safe)
104
+ validate_path(path, dir, context.registers[:site].safe)
106
105
 
107
106
  begin
108
107
  partial = Liquid::Template.parse(source(path, context))
@@ -116,19 +115,20 @@ eos
116
115
  end
117
116
  end
118
117
 
119
- def validate_dir(dir, safe)
120
- if File.symlink?(dir) && safe
121
- raise IOError.new "Includes directory '#{dir}' cannot be a symlink"
118
+ def validate_path(path, dir, safe)
119
+ if safe && !realpath_prefixed_with?(path, dir)
120
+ raise IOError.new "The included file '#{path}' should exist and should not be a symlink"
121
+ elsif !File.exist?(path)
122
+ raise IOError.new "Included file '#{path_relative_to_source(dir, path)}' not found"
122
123
  end
123
124
  end
124
125
 
125
- def validate_file(sourcedir, file, safe)
126
- relative_file = Pathname.new(file).relative_path_from(Pathname.new(sourcedir))
127
- if !File.exists?(file)
128
- raise IOError.new "Included file '#{relative_file}' not found"
129
- elsif File.symlink?(file) && safe
130
- raise IOError.new "The included file '#{relative_file}' should not be a symlink"
131
- end
126
+ def path_relative_to_source(dir, path)
127
+ File.join(INCLUDES_DIR, path.sub(Regexp.new("^#{dir}"), ""))
128
+ end
129
+
130
+ def realpath_prefixed_with?(path, dir)
131
+ File.exist?(path) && File.realpath(path).start_with?(dir)
132
132
  end
133
133
 
134
134
  def blank?
@@ -50,6 +50,7 @@ module Jekyll
50
50
 
51
51
  # Returns a sanitized String URL
52
52
  def sanitize_url(in_url)
53
+
53
54
  # Remove all double slashes
54
55
  url = in_url.gsub(/\/\//, "/")
55
56
 
@@ -61,6 +62,7 @@ module Jekyll
61
62
 
62
63
  # Always add a leading slash
63
64
  url.gsub!(/\A([^\/])/, '/\1')
65
+
64
66
  url
65
67
  end
66
68
  end
@@ -0,0 +1,79 @@
1
+ module Jekyll
2
+ module Utils
3
+ class << self
4
+
5
+ # Merges a master hash with another hash, recursively.
6
+ #
7
+ # master_hash - the "parent" hash whose values will be overridden
8
+ # other_hash - the other hash whose values will be persisted after the merge
9
+ #
10
+ # This code was lovingly stolen from some random gem:
11
+ # http://gemjack.com/gems/tartan-0.1.1/classes/Hash.html
12
+ #
13
+ # Thanks to whoever made it.
14
+ def deep_merge_hashes(master_hash, other_hash)
15
+ target = master_hash.dup
16
+
17
+ other_hash.keys.each do |key|
18
+ if other_hash[key].is_a? Hash and target[key].is_a? Hash
19
+ target[key] = Utils.deep_merge_hashes(target[key], other_hash[key])
20
+ next
21
+ end
22
+
23
+ target[key] = other_hash[key]
24
+ end
25
+
26
+ target
27
+ end
28
+
29
+ # Read array from the supplied hash favouring the singular key
30
+ # and then the plural key, and handling any nil entries.
31
+ #
32
+ # hash - the hash to read from
33
+ # singular_key - the singular key
34
+ # plural_key - the plural key
35
+ #
36
+ # Returns an array
37
+ def pluralized_array_from_hash(hash, singular_key, plural_key)
38
+ if hash.has_key?(singular_key)
39
+ array = [hash[singular_key]] if hash[singular_key]
40
+ elsif hash.has_key?(plural_key)
41
+ case hash[plural_key]
42
+ when String
43
+ array = hash[plural_key].split
44
+ when Array
45
+ array = hash[plural_key].compact
46
+ end
47
+ end
48
+ array || []
49
+ end
50
+
51
+ # Apply #to_sym to all keys in the hash
52
+ #
53
+ # hash - the hash to which to apply this transformation
54
+ #
55
+ # Returns a new hash with symbolized keys
56
+ def symbolize_hash_keys(hash)
57
+ target = hash.dup
58
+ target.keys.each do |key|
59
+ target[(key.to_sym rescue key) || key] = target.delete(key)
60
+ end
61
+ target
62
+ end
63
+
64
+ # Apply #to_s to all keys in the Hash
65
+ #
66
+ # hash - the hash to which to apply this transformation
67
+ #
68
+ # Returns a new hash with stringified keys
69
+ def stringify_hash_keys(hash)
70
+ target = hash.dup
71
+ target.keys.each do |key|
72
+ target[(key.to_s rescue key) || key] = target.delete(key)
73
+ end
74
+ target
75
+ end
76
+
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,3 @@
1
+ module Jekyll
2
+ VERSION = '2.0.0.alpha.2'
3
+ end
@@ -1,3 +1,5 @@
1
- name: Your New Jekyll Site
1
+ name: Dat site title tho
2
2
  markdown: redcarpet
3
3
  highlighter: pygments
4
+ description: "Write an awesome description for your new site here. It will appear in your document head meta (for Google search results) and in your feed.xml site description."
5
+ url: "http://yourdomain.com"
@@ -0,0 +1,61 @@
1
+ <footer class="site-footer">
2
+
3
+ <div class="wrap">
4
+
5
+ <h2 class="footer-heading">Bart Simpson</h2>
6
+
7
+ <div class="footer-col-1 column">
8
+ <ul>
9
+ <li>Chief Flatulence Officer</li>
10
+ <li><a href="mailto:bsimpson@flatulencehub.com">bsimpson@flatulencehub.com</a></li>
11
+ </ul>
12
+ </div>
13
+
14
+ <div class="footer-col-2 column">
15
+ <ul>
16
+ <li>
17
+ <a href="https://github.com/yourusername">
18
+ <span class="icon github">
19
+ <svg version="1.1" class="github-icon-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
20
+ viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
21
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="#C2C2C2" d="M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761
22
+ 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
23
+ 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
24
+ 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
25
+ 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
26
+ 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
27
+ 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
28
+ 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
29
+ 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"/>
30
+ </svg>
31
+ </span>
32
+ <span class="username">bartrulez</span>
33
+ </a>
34
+ </li>
35
+ <li>
36
+ <a href="https://twitter.com/yourusername">
37
+ <span class="icon twitter">
38
+ <svg version="1.1" class="twitter-icon-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
39
+ viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
40
+ <path fill="#C2C2C2" 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
41
+ 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
42
+ 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
43
+ 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
44
+ 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
45
+ 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
46
+ 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"/>
47
+ </svg>
48
+ </span>
49
+ <span class="username">bartrulez</span>
50
+ </a>
51
+ </li>
52
+ </ul>
53
+ </div>
54
+
55
+ <div class="footer-col-3 column">
56
+ <p class="text">Any additional text you want to have here is totally cool for you to haz, yo.</p>
57
+ </div>
58
+
59
+ </div>
60
+
61
+ </footer>
@@ -0,0 +1,12 @@
1
+ <head>
2
+ <meta charset="utf-8">
3
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
4
+ <title>{% if page.title %}{{ page.title }}{% else %}{{ site.name }}{% endif %}</title>
5
+ <meta name="viewport" content="width=device-width">
6
+ <meta name="description" content="{{ site.description }}" />
7
+ <link rel="canonical" href="{{ site.url }}{{ page.url | replace:'index.html','' }}/" />
8
+
9
+ <!-- Custom CSS -->
10
+ <link rel="stylesheet" href="/css/main.css">
11
+
12
+ </head>
@@ -0,0 +1,27 @@
1
+ <header class="site-header">
2
+
3
+ <div class="wrap">
4
+
5
+ <a class="site-title" href="/">{{ site.name }}</a>
6
+
7
+ <nav class="site-nav">
8
+ <a href="#" class="menu-icon">
9
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
10
+ viewBox="0 0 18 15" enable-background="new 0 0 18 15" xml:space="preserve">
11
+ <path fill="#505050" 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
12
+ h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
13
+ <path fill="#505050" 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
14
+ h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
15
+ <path fill="#505050" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0
16
+ c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
17
+ </svg>
18
+ </a>
19
+ <div class="trigger">
20
+ <a class="page-link" href="/about">About</a>
21
+ <a class="page-link" href="/projects">Projects</a>
22
+ </div>
23
+ </nav>
24
+
25
+ </div>
26
+
27
+ </header>
@@ -1,44 +1,19 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6
- <title>{{ page.title }}</title>
7
- <meta name="viewport" content="width=device-width">
8
3
 
9
- <!-- syntax highlighting CSS -->
10
- <link rel="stylesheet" href="/css/syntax.css">
4
+ {% include head.html %}
11
5
 
12
- <!-- Custom CSS -->
13
- <link rel="stylesheet" href="/css/main.css">
14
-
15
- </head>
16
6
  <body>
17
7
 
18
- <div class="site">
19
- <div class="header">
20
- <h1 class="title"><a href="/">{{ site.name }}</a></h1>
21
- <a class="extra" href="/">home</a>
22
- </div>
8
+ {% include header.html %}
23
9
 
24
- {{ content }}
10
+ <div class="page-content">
11
+ <div class="wrap">
12
+ {{ content }}
13
+ </div>
14
+ </div>
25
15
 
26
- <div class="footer">
27
- <div class="contact">
28
- <p>
29
- Your Name<br />
30
- What You Are<br />
31
- you@example.com
32
- </p>
33
- </div>
34
- <div class="contact">
35
- <p>
36
- <a href="https://github.com/yourusername">github.com/yourusername</a><br />
37
- <a href="https://twitter.com/yourusername">twitter.com/yourusername</a><br />
38
- </p>
39
- </div>
40
- </div>
41
- </div>
16
+ {% include footer.html %}
42
17
 
43
18
  </body>
44
- </html>
19
+ </html>
@@ -0,0 +1,14 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <div class="post">
5
+
6
+ <header class="post-header">
7
+ <h1>{{ page.title }}</h1>
8
+ </header>
9
+
10
+ <article class="post-content">
11
+ {{ content }}
12
+ </article>
13
+
14
+ </div>
@@ -1,9 +1,15 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
- <h2>{{ page.title }}</h2>
5
- <p class="meta">{{ page.date | date_to_string }}</p>
6
-
7
4
  <div class="post">
8
- {{ content }}
9
- </div>
5
+
6
+ <header class="post-header">
7
+ <h1>{{ page.title }}</h1>
8
+ <p class="meta">{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>
9
+ </header>
10
+
11
+ <article class="post-content">
12
+ {{ content }}
13
+ </article>
14
+
15
+ </div>
@@ -0,0 +1,88 @@
1
+ ---
2
+ layout: post
3
+ title: "This post demonstrates post content styles"
4
+ categories: sample
5
+ author: "Bart Simpson"
6
+ meta: "Springfield"
7
+ ---
8
+
9
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt. Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit.
10
+
11
+ ## Some great heading (h2)
12
+
13
+ Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum. In arcu magna, aliquet vel pretium et, molestie et arcu.
14
+
15
+ Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris. Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc. Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est.
16
+
17
+ ## Another great heading (h2)
18
+
19
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt. Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit.
20
+
21
+ ### Some great subheading (h3)
22
+
23
+ Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum. In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum.
24
+
25
+ Phasellus et hendrerit mauris. Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc.
26
+
27
+ ### Some great subheading (h3)
28
+
29
+ Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est.
30
+
31
+ > This quote will change your life. It will reveal the secrets of the universe, and all the wonders of humanity. Don't misuse it.
32
+
33
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt.
34
+
35
+ ### Some great subheading (h3)
36
+
37
+ Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit. Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum.
38
+
39
+ ```html
40
+ <html>
41
+ <head>
42
+ </head>
43
+ <body>
44
+ <p>Hello, World!</p>
45
+ </body>
46
+ </html>
47
+ ```
48
+
49
+
50
+ In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
51
+
52
+ #### You might want a sub-subheading (h4)
53
+
54
+ In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
55
+
56
+ In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
57
+
58
+ #### But it's probably overkill (h4)
59
+
60
+ In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
61
+
62
+ ### Oh hai, an unordered list!!
63
+
64
+ In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
65
+
66
+ - First item, yo
67
+ - Second item, dawg
68
+ - Third item, what what?!
69
+ - Fourth item, fo sheezy my neezy
70
+
71
+ ### Oh hai, an ordered list!!
72
+
73
+ In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
74
+
75
+ 1. First item, yo
76
+ 2. Second item, dawg
77
+ 3. Third item, what what?!
78
+ 4. Fourth item, fo sheezy my neezy
79
+
80
+
81
+
82
+ ## Headings are cool! (h2)
83
+
84
+ Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc. Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est.
85
+
86
+ Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est.
87
+
88
+ Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc.