jekyll_patternbot 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8bacb09e49ced1e79a2e942d5e001a4ac14ed26f014f87b8f2f7d7d5a646fb93
4
- data.tar.gz: 7bf0a9fe0590abe1f6942a015e668b60f4f0e255868cfea4df84774e8a63abce
3
+ metadata.gz: 4f68472848b7cf670739fe8f37292241cbac4be69f9d5bd28c6dc8c57120046f
4
+ data.tar.gz: bff3006c2cdc439afbcad0cdfaa5ecc821e02cd32d061f2d04027d37f93bf27c
5
5
  SHA512:
6
- metadata.gz: f2ab3f9d9a4522dc9b084db6b9f89bd48d3bc3c5b7046136a5bfdcd41636d6a95f933ca686624494a18b00326f4d08f1cc46009288813c6c76a3455fb626751a
7
- data.tar.gz: 66308d09a05a916a719a53cd11a318e0de0dded0b177a351fdef4b1082461604797ebcdf33b83a90d907827f928199f485b72ce390a90bdab9e76a8f5b11c07b
6
+ metadata.gz: 986326fd6a2bd735143296fce311a1793318fa5a8c1dc57f814855bdbdf62a7ca208353f1f08fdfc9eb2335cb11faf5ca4137ee75e8b7137ffba1ee411a991f9
7
+ data.tar.gz: 061ebbfbce1f7df69de51cee6f72570223eb92741c50b0947ae757fe7821a31030b982f337404a9c68dcdaa96e11c89106a894da452d6e7e88a4c19c9e9ebf5f
data/CHANGELOG.md CHANGED
@@ -5,9 +5,35 @@ Jekyll Patternbot adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
6
  ---
7
7
 
8
+ ## [1.2.0] — 2019-01-28
9
+
10
+ ### Added
11
+
12
+ - Added a comment denoting where user’s pattern code start & ends.
13
+ - Add the ability to label a tertiary colour & typeface.
14
+
15
+ ### Changed
16
+
17
+ - Removed some CSS injection via JavaScript and just wrote it right into the layouts.
18
+ - The pattern `width` property is now a `max-width` inside the pattern itself: makes for better media query testing.
19
+ - Cleaned up the whitespace in pattern output files.
20
+ - Patterns & sample pages are now listed in alphabetical order in the navigation.
21
+
22
+ ### Fixed
23
+
24
+ - Fixed a bug where list bullets were being displayed because of user CSS.
25
+ - Fixed a bug where internal patterns relied on specific Modulifier features, but user modules didn’t include the feature.
26
+ - Made the filename output more reliable with different permalink settings.
27
+
28
+ ### Removed
29
+
30
+ - Removed the “Show all” button. It was useful previously but I found lots of students don’t really use it properly and it’s a poor user experience.
31
+
32
+ ---
33
+
8
34
  ## [1.1.2] — 2019-01-28
9
35
 
10
- ## Fixed
36
+ ### Fixed
11
37
 
12
38
  - User JS files were included using a `<link>` tag instead of a script tag.
13
39
 
@@ -160,9 +160,9 @@
160
160
 
161
161
  <div class="pattern-examples pad-t-1-2 pad-b-1-2">
162
162
  <div class="gutter{% if pattern_data._resizable != false %}-2{% endif %} pad-t-1-2 pad-b-1-2">
163
- <div class="resizeable-pattern relative" style="{% if pattern_data.width %}width:{{pattern_data.width}}px{% endif %}">
163
+ <div class="resizeable-pattern relative">
164
164
  <i class="icon i-32 patternbot-iframe-loading-gears absolute pin-c"><svg><use xlink:href="#patternbot-iframe-loading-gears"></use></svg></i>
165
- <iframe data-src="/{{page._PatternbotConfig.patternbot.destination}}/patterns/{{include.pattern.name}}/{{pattern_name | normalize_filename}}" scrolling="no" data-inject-css="{% if pattern_data.padding %}body { padding:{{pattern_data.padding}}; }{% endif %}" {% if pattern_data.height %}data-min-height="{{pattern_data.height}}"{% endif %}></iframe>
165
+ <iframe data-src="/{{page._PatternbotConfig.patternbot.destination}}/patterns/{{include.pattern.name}}/{{pattern_name | normalize_filename}}" scrolling="no" {% if pattern_data.height %}data-min-height="{{pattern_data.height}}"{% endif %}></iframe>
166
166
  {% if pattern_data._resizable != false %}
167
167
  <div class="resizeable-pattern-length">
168
168
  <div class="resize-handle resize-handle-left">
@@ -4,32 +4,32 @@
4
4
  <meta charset="utf-8">
5
5
  <title>{{page.title}}</title>
6
6
  <meta name="viewport" content="width=device-width,initial-scale=1">
7
- {% if page._pattern_data.config._user_modulifier %}
7
+ {%- if page._pattern_data.config._user_modulifier -%}
8
8
  <link href="{{site.baseurl}}/{{page._PatternbotConfig.patternbot.css.source}}/{{page._PatternbotConfig.patternbot.css.modulifier}}?v={{site.time | date:'%s'}}" rel="stylesheet">
9
- {% else %}
9
+ {%- else -%}
10
10
  <link href="{{site.baseurl}}/assets/_patternbot/common/modulifier.min.css?v={{page._PatternbotConfig.patternbot.version}}" rel="stylesheet">
11
- {% endif %}
12
- {% if page._pattern_data.config._user_gridifier %}
11
+ {%- endif -%}
12
+ {%- if page._pattern_data.config._user_gridifier -%}
13
13
  <link href="{{site.baseurl}}/{{page._PatternbotConfig.patternbot.css.source}}/{{page._PatternbotConfig.patternbot.css.gridifier}}?v={{site.time | date:'%s'}}" rel="stylesheet">
14
- {% else %}
14
+ {%- else -%}
15
15
  <link href="{{site.baseurl}}/assets/_patternbot/common/gridifier.min.css?v={{page._PatternbotConfig.patternbot.version}}" rel="stylesheet">
16
- {% endif %}
17
- {% if page._pattern_data.config._user_typografier %}
16
+ {%- endif -%}
17
+ {%- if page._pattern_data.config._user_typografier -%}
18
18
  <link href="{{site.baseurl}}/{{page._PatternbotConfig.patternbot.css.source}}/{{page._PatternbotConfig.patternbot.css.typografier}}?v={{site.time | date:'%s'}}" rel="stylesheet">
19
- {% else %}
19
+ {%- else -%}
20
20
  <link href="{{site.baseurl}}/assets/_patternbot/common/typografier.min.css?v={{page._PatternbotConfig.patternbot.version}}" rel="stylesheet">
21
- {% endif %}
22
- {% unless page._PatternbotData.css.theme == empty %}
21
+ {%- endif -%}
22
+ {%- unless page._PatternbotData.css.theme == empty -%}
23
23
  <link href="{{site.baseurl}}/{{page._PatternbotConfig.patternbot.css.source}}/{{page._PatternbotConfig.patternbot.css.theme}}?v={{site.time | date:'%s'}}" rel="stylesheet">
24
- {% endunless %}
24
+ {%- endunless -%}
25
25
  <link href="{{site.baseurl}}/assets/_patternbot/common/common.min.css?v={{page._PatternbotConfig.patternbot.version}}" rel="stylesheet">
26
- {% for css in page._pattern_data.config._extra_css %}
26
+ {%- for css in page._pattern_data.config._extra_css -%}
27
27
  <link href="{{site.baseurl}}/assets/_patternbot/patterns/{{css}}?v={{page._PatternbotConfig.patternbot.version}}" rel="stylesheet">
28
- {% endfor %}
28
+ {%- endfor -%}
29
29
  <link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700" rel="stylesheet">
30
30
  <style>
31
- {% assign has_bg = page._subpattern | has_pattern_background_color: page._pattern %}
32
- {% if has_bg %}
31
+ {%- assign has_bg = page._subpattern | has_pattern_background_color: page._pattern -%}
32
+ {%- if has_bg -%}
33
33
  :root {
34
34
  --color-patternbot-interface: {{page._subpattern | get_pattern_interface_color: page._pattern | as_rgb_digit}};
35
35
  --color-patternbot-interface-opposite: {{page._subpattern | get_pattern_interface_color_opposite: page._pattern | as_rgb_digit}};
@@ -39,56 +39,56 @@
39
39
  html {
40
40
  color: {{page._subpattern | get_pattern_interface_color: page._pattern}};
41
41
  }
42
- {% else %}
42
+ {%- else -%}
43
43
  :root {
44
44
  --color-patternbot-interface: {{page._PatternbotConfig.patternbot.colors.background | get_interface_color | as_rgb_digit}};
45
45
  --color-patternbot-interface-opposite: {{page._PatternbotConfig.patternbot.colors.background | get_interface_color_opposite | as_rgb_digit}};
46
46
  --color-patternbot-interface-background: {{page._PatternbotConfig.patternbot.colors.background | as_hex}};
47
- {% if page._PatternbotConfig.patternbot.colors.accent %}
47
+ {%- if page._PatternbotConfig.patternbot.colors.accent -%}
48
48
  --color-patternbot-interface-accent: {{page._PatternbotConfig.patternbot.colors.accent | as_hex}};
49
- {% else %}
50
- {% if page._PatternbotData.css.theme.colors.primary %}
49
+ {%- else -%}
50
+ {%- if page._PatternbotData.css.theme.colors.primary -%}
51
51
  --color-patternbot-interface-accent: {{page._PatternbotData.css.theme.colors.primary[0].hex}};
52
- {% else %}
52
+ {%- else -%}
53
53
  --color-patternbot-interface-accent: {{page._PatternbotConfig.patternbot.colors.background | get_interface_color | as_hex}};
54
- {% endif %}
55
- {% endif %}
54
+ {%- endif -%}
55
+ {%- endif -%}
56
56
  }
57
57
  html {
58
58
  color: {{page._PatternbotConfig.patternbot.colors.background | get_interface_color}};
59
59
  }
60
- {% endif %}
61
- {% if page._PatternbotData.css.theme.fonts.primary.css_name %}
60
+ {%- endif -%}
61
+ {%- if page._PatternbotData.css.theme.fonts.primary.css_name -%}
62
62
  :root {
63
63
  --font-patternbot-primary: {{page._PatternbotData.css.theme.fonts.primary.css_name}}, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
64
64
  }
65
65
  html {
66
66
  font-family: {{page._PatternbotData.css.theme.fonts.primary.css_name}}, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
67
67
  }
68
- {% endif %}
69
- {% if page._PatternbotData.css.theme.fonts.secondary.css_name %}
68
+ {%- endif -%}
69
+ {%- if page._PatternbotData.css.theme.fonts.secondary.css_name -%}
70
70
  :root {
71
71
  --font-patternbot-secondary: {{page._PatternbotData.css.theme.fonts.secondary.css_name}}, var(--font-patternbot-primary), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
72
72
  }
73
- {% endif %}
73
+ {%- endif -%}
74
74
  </style>
75
75
 
76
76
 
77
- {% if page._PatternbotConfig.patternbot.font_url %}
77
+ {%- if page._PatternbotConfig.patternbot.font_url -%}
78
78
  <link href="{{page._PatternbotConfig.patternbot.font_url}}" rel="stylesheet">
79
- {% endif %}
79
+ {%- endif -%}
80
80
  </head>
81
- <body>
81
+ <body{% if page._subpattern_data.padding %} style="padding: {{page._subpattern_data.padding}};"{% endif %}>
82
82
 
83
- {% include patternbot_icons.html %}
83
+ {%- include patternbot_icons.html -%}
84
84
 
85
- <div id="patternbot-pattern-include">
85
+ <div id="patternbot-pattern-include"{% if page._subpattern_data.width %} style="max-width: {{page._subpattern_data.width}}; margin: 0 auto;"{% endif %}>
86
86
  {{content}}
87
87
  </div>
88
88
 
89
89
  <script src="{{site.baseurl}}/assets/_patternbot/vendor/iframe-resizer-content-window.min.js?v={{page._PatternbotConfig.patternbot.version}}"></script>
90
90
  <script src="{{site.baseurl}}/assets/_patternbot/vendor/clipboard.min.js?v={{page._PatternbotConfig.patternbot.version}}"></script>
91
- {% include patternbot_pattern_copy_script.html %}
91
+ {%- include patternbot_pattern_copy_script.html -%}
92
92
 
93
93
  </body>
94
94
  </html>
@@ -168,26 +168,19 @@
168
168
  </a>
169
169
  </li>
170
170
  {% endunless %}
171
- {% for pattern in page._PatternbotData.patterns.user %}
172
- {% assign pattern_data = pattern[1] %}
173
- {% unless pattern.config.hide_nav %}
174
- <li role="presentation">
175
- <a class="gutter pad-t-1-4 pad-b-1-4 block" role="tab" aria-controls="{{pattern_data.name}}" href="#{{pattern_data.name}}">
176
- <div class="relative">
177
- <span>{% if pattern_data.config.title %}{{pattern_data.config.title}}{% else %}{{pattern[0] | as_title}}{% endif %}</span>
178
- <i class="icon i-18 absolute pin-cr">
179
- <svg><use xlink:href="#icon-active"></use></svg>
180
- </i>
181
- </div>
182
- </a>
183
- </li>
184
- {% endunless %}
171
+ {% for pattern_name in page._PatternbotData.patterns_order %}
172
+ {% assign pattern_data = page._PatternbotData.patterns.user[pattern_name] %}
173
+ <li role="presentation">
174
+ <a class="gutter pad-t-1-4 pad-b-1-4 block" role="tab" aria-controls="{{pattern_data.name}}" href="#{{pattern_data.name}}">
175
+ <div class="relative">
176
+ <span>{% if pattern_data.config.title %}{{pattern_data.config.title}}{% else %}{{pattern_name | as_title}}{% endif %}</span>
177
+ <i class="icon i-18 absolute pin-cr">
178
+ <svg><use xlink:href="#icon-active"></use></svg>
179
+ </i>
180
+ </div>
181
+ </a>
182
+ </li>
185
183
  {% endfor %}
186
- <li class="pad-t-1-2" role="presentation">
187
- <button class="nav-show-all gutter pad-t-1-4 pad-b-1-4 block kilo" id="patternbot-nav-show-all" aria-pressed="false" title="Show all patterns" aria-label="Show all patterns">
188
- <span class="nav-show-all-wrap relative block">Show all</span>
189
- </button>
190
- </li>
191
184
  </ul>
192
185
  </nav>
193
186
  {% if page._PatternbotData.pages %}
@@ -1,36 +1,44 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en-ca">
3
3
  <head>
4
- <meta charset="utf-8">
5
- <title>{{page.title}}</title>
6
- <meta name="viewport" content="width=device-width,initial-scale=1">
7
- {% if page._PatternbotData.css.main %}
8
- <link href="{{site.baseurl}}/{{page._PatternbotConfig.patternbot.css.source}}/{{page._PatternbotConfig.patternbot.css.main}}?v={{site.time | date:'%s'}}" rel="stylesheet">
9
- {% endif %}
10
- {% if page._PatternbotConfig.patternbot.font_url %}
11
- <link href="{{page._PatternbotConfig.patternbot.font_url}}" rel="stylesheet">
12
- {% endif %}
13
- {% if page._subpattern_data.background %}
14
- <style>
15
- html {
16
- background-color: {{page._subpattern_data.background | as_hex}};
17
- }
18
- </style>
19
- {% endif %}
4
+ <meta charset="utf-8">
5
+ <title>{{page.title}}</title>
6
+ <meta name="viewport" content="width=device-width,initial-scale=1">
7
+ {%- if page._PatternbotData.css.main -%}
8
+ <link href="{{site.baseurl}}/{{page._PatternbotConfig.patternbot.css.source}}/{{page._PatternbotConfig.patternbot.css.main}}?v={{site.time | date:'%s'}}" rel="stylesheet">
9
+ {% endif %}
10
+ {%- if page._PatternbotConfig.patternbot.font_url -%}
11
+ <link href="{{page._PatternbotConfig.patternbot.font_url}}" rel="stylesheet">
12
+ {% endif %}
13
+ {%- if page._subpattern_data.background -%}
14
+ <style>
15
+ html {
16
+ background-color: {{page._subpattern_data.background | as_hex}};
17
+ }
18
+ </style>
19
+ {% endif %}
20
20
  </head>
21
- <body>
21
+ <body{% if page._subpattern_data.padding %} style="padding: {{page._subpattern_data.padding}};"{% endif %}>
22
22
 
23
- <div id="patternbot-pattern-include">
24
- {{content}}
25
- </div>
23
+ <div id="patternbot-pattern-include"{% if page._subpattern_data.width %} style="max-width: {{page._subpattern_data.width}}; margin: 0 auto;"{% endif %}>
24
+ <!--
25
+ YOUR CODE STARTS HERE
26
+ #####################
27
+ -->
26
28
 
27
- <script src="{{site.baseurl}}/assets/_patternbot/vendor/iframe-resizer-content-window.min.js?v={{page._PatternbotConfig.patternbot.version}}"></script>
28
- <script src="{{site.baseurl}}/assets/_patternbot/vendor/clipboard.min.js?v={{page._PatternbotConfig.patternbot.version}}"></script>
29
- {% include patternbot_pattern_copy_script.html %}
29
+ {{content}}
30
30
 
31
- {% if page._PatternbotData.js.main %}
32
- <script src="{{site.baseurl}}/{{page._PatternbotConfig.patternbot.js.source}}/{{page._PatternbotConfig.patternbot.js.main}}?v={{site.time | date:'%s'}}"></script>
33
- {% endif %}
31
+ <!--
32
+ #####################
33
+ END OF YOUR CODE
34
+ -->
35
+ </div>
36
+
37
+ <script src="{{site.baseurl}}/assets/_patternbot/vendor/iframe-resizer-content-window.min.js?v={{page._PatternbotConfig.patternbot.version}}"></script>
38
+
39
+ {%- if page._PatternbotData.js.main %}
40
+ <script src="{{site.baseurl}}/{{page._PatternbotConfig.patternbot.js.source}}/{{page._PatternbotConfig.patternbot.js.main}}?v={{site.time | date:'%s'}}"></script>
41
+ {%- endif %}
34
42
 
35
43
  </body>
36
44
  </html>
@@ -11,6 +11,11 @@
11
11
  {% include patternbot_pattern_brand_color_swatches.html style="large" title="Secondary" key="secondary" colors=page._PatternbotData.css.theme.colors.secondary extra_class="patternbot-color-swatches-secondary" show_hr=show_hr %}
12
12
  {% endunless %}
13
13
 
14
+ {% unless page._PatternbotData.css.theme.colors.tertiary == empty %}
15
+ {% assign show_hr = true %}
16
+ {% include patternbot_pattern_brand_color_swatches.html style="small" title="Tertiary" key="tertiary" colors=page._PatternbotData.css.theme.colors.tertiary show_hr=show_hr %}
17
+ {% endunless %}
18
+
14
19
  {% unless page._PatternbotData.css.theme.colors.accent == empty %}
15
20
  {% assign show_hr = true %}
16
21
  {% include patternbot_pattern_brand_color_swatches.html style="small" title="Accent" key="accent" colors=page._PatternbotData.css.theme.colors.accent show_hr=show_hr %}
@@ -11,6 +11,11 @@
11
11
  {% include patternbot_pattern_brand_typeface.html title="Secondary" key="secondary" font=page._PatternbotData.css.theme.fonts.secondary preposition="the" show_hr=show_hr %}
12
12
  {% endif %}
13
13
 
14
+ {% if page._PatternbotData.css.theme.fonts.tertiary %}
15
+ {% assign show_hr = true %}
16
+ {% include patternbot_pattern_brand_typeface.html title="Tertiary" key="tertiary" font=page._PatternbotData.css.theme.fonts.tertiary preposition="the" show_hr=show_hr %}
17
+ {% endif %}
18
+
14
19
  {% for font in page._PatternbotData.css.theme.fonts.accent %}
15
20
  {% assign show_hr = true %}
16
21
  {% include patternbot_pattern_brand_typeface.html title="Accent" key="accent" font=font desc=page._PatternbotConfig.patternbot.fonts.accent preposition="an" show_hr=show_hr %}
@@ -10,10 +10,12 @@ description: |
10
10
 
11
11
  patterns:
12
12
  grid-sizes:
13
+ title: "Grid sizes"
13
14
  _popout_button: false
14
15
  _resizable: false
15
16
  _code: false
16
17
  utility-classes:
18
+ title: "Utility classes"
17
19
  description: |
18
20
  Mix & match classes for grids and units to make any responsive layout necessary for templates.
19
21
  _popout_button: false
@@ -13,7 +13,7 @@ patterns:
13
13
  _code: false
14
14
  _resizable: false
15
15
  icons-with-labels:
16
- title: "Icons with Labels"
16
+ title: "Icons with labels"
17
17
  description: |
18
18
  Sample code for using SVG icon spritesheets mixed with a text label, using the below classes.
19
19
  width: 320
@@ -25,12 +25,14 @@ patterns:
25
25
  <span class="icon-label">Icon label</span>
26
26
  </a>
27
27
  icon-classes:
28
+ title: "Icon classes"
28
29
  description: |
29
30
  Classes that can be used on elements & combined to make nicely aligned icons and labels.
30
31
  _popout_button: false
31
32
  _resizable: false
32
33
  _code: false
33
34
  icon-sizes:
35
+ title: "Icon sizes"
34
36
  description: |
35
37
  Icons sizes available from [Modulifier](https://modulifier.web-dev.tools) & [Typografier](https://typografier.web-dev.tools).
36
38
  _popout_button: false
@@ -1,5 +1,4 @@
1
1
  _layout: "patternbot_pattern_internal"
2
- _user_modulifier: true
3
2
  _extra_css:
4
3
  - 'modules/modules.min.css'
5
4
  - 'utilities/utilities.min.css'
@@ -35,6 +34,7 @@ patterns:
35
34
  </div>
36
35
  </div>
37
36
  skip-links:
37
+ title: "Skip links"
38
38
  description: |
39
39
  A helpful accessibility feature that should be included immediately within the `<body>` tag on the top of most pages.
40
40
  _popout_button: false
@@ -46,6 +46,7 @@ patterns:
46
46
  <li><a href="#pause">Pause all animations</a></li>
47
47
  </ul>
48
48
  utility-classes:
49
+ title: "Utility classes"
49
50
  description: |
50
51
  All the different utility classes available from within [Modulifier](++modulifier-settings-url++).
51
52
  _popout_button: false
@@ -55,6 +55,7 @@ patterns:
55
55
  title: "Typesetting"
56
56
  _code: false
57
57
  utility-classes:
58
+ title: "Utility classes"
58
59
  _popout_button: false
59
60
  _resizable: false
60
61
  _code: false
@@ -38,6 +38,7 @@ module JekyllPatternbot
38
38
  require 'jekyll_patternbot/finders/patterns'
39
39
  require 'jekyll_patternbot/finders/sample_pages'
40
40
 
41
+ require 'jekyll_patternbot/processors/patterns_order'
41
42
  require 'jekyll_patternbot/processors/brand'
42
43
  require 'jekyll_patternbot/processors/modules'
43
44
  require 'jekyll_patternbot/processors/icons'
@@ -33,13 +33,25 @@ module JekyllPatternbot
33
33
  files
34
34
  end
35
35
 
36
+ def normalize_config(config)
37
+ if config.key? 'patterns'
38
+ for key, pattern in config['patterns']
39
+ # puts pattern.inspect
40
+ if pattern.is_a? Hash and pattern.key? 'width' and pattern['width'].is_a? Numeric
41
+ pattern['width'] = pattern['width'].to_s + 'px'
42
+ end
43
+ end
44
+ end
45
+ config
46
+ end
47
+
36
48
  def pattern_config(patternpath)
37
49
  config_data = user_config(patternpath)
38
50
  files_config = {
39
51
  'patterns' => html_files(patternpath)
40
52
  }
41
53
  config_data.deep_merge! files_config
42
- config_data
54
+ normalize_config config_data
43
55
  end
44
56
 
45
57
  def patterns_info(source, patterns_names)
@@ -7,7 +7,11 @@ module JekyllPatternbot
7
7
 
8
8
  def self.normalize_filename(filename)
9
9
  return filename unless filename
10
- if Config['permalink'].match? /pretty/ or not Config['permalink'].match? /\:output_ext/
10
+ output_ext = false
11
+ if Config['permalink'].match? /\:output_ext/ or Config['permalink'].match? /^(date|ordinal|none)$/
12
+ output_ext = true
13
+ end
14
+ unless output_ext
11
15
  if filename.match? /^index/
12
16
  if filename.match? /\.html/
13
17
  return filename
@@ -18,7 +22,7 @@ module JekyllPatternbot
18
22
  return "#{filename.sub(/\.html/, '')}/index.html"
19
23
  end
20
24
  end
21
- unless filename.match? /\.html/
25
+ unless filename.match? /\.html$/
22
26
  return "#{filename}.html"
23
27
  end
24
28
  filename