Commit graph

208 commits

Author SHA1 Message Date
Thomas Reynolds
3fca2c6961 Add relative argument to stylesheet and javascript helpers. Closes #1539 2015-06-22 10:37:17 -07:00
Thomas Reynolds
1efe6a27c5 Add tests for Slim inline filters. Refactor similar feature in Haml filters. Closes #1542 2015-06-16 16:47:42 -07:00
Thomas Reynolds
7383f67874 Implement yaml data postscript 2015-06-16 15:30:37 -07:00
Thomas Reynolds
915b059e4a Merge pull request #1535 from maxmeyer/feature/capybara
Use capybara to make javascript testing possible
2015-06-09 09:39:01 -07:00
Max Meyer
3935a7cf5f Use capybara to make javascript testing possible 2015-06-09 06:57:15 +02:00
François Vantomme
d7d37e4ae0 fix #1496 : Asset hashes on WOFF vs WOFF2 fonts get confused
reverse sorting the extensions regex solves this issue
2015-05-28 16:21:50 +02:00
yterajima
c444b3f232 fixed 'after_render' hook is not work.
- 'before_render' hook is called twice.
- add simple cucumber test about some hooks.
2015-05-06 16:28:01 +09:00
Thomas Reynolds
2b1a4ed1b8 Merge pull request #1393 from AndrewKvalheim/minify-proxied
CSS/JS isn't minified when a proxy has removed the file extension.
2015-05-02 14:28:00 -07:00
Thomas Reynolds
33cb9b3ba9 Expand collection laziness to data 2015-04-26 13:22:58 -07:00
Thomas Reynolds
b127283040 Fix up inline url confusion 2015-04-26 13:01:19 -07:00
Thomas Reynolds
2403fa2d81 Merge stable 2015-04-26 11:32:47 -07:00
Thomas Reynolds
a43fa14f34 More tests WRT #1503 2015-04-26 09:43:20 -07:00
Thomas Reynolds
4bdf5a9005 Refactor srcset a little 2015-04-26 09:41:50 -07:00
Thomas Reynolds
45ba4bb0d4 Add slim test to asset_hash. WRT #1503 2015-04-26 09:31:39 -07:00
Thomas Reynolds
22ce56492f Experiment with Hamster 2015-04-24 10:28:03 -07:00
David Morrow
580431ca43 Resolves issue #1396 supporting srcset
allows you to use image_tag helper and have it build the asset urls for
your srcset images, just like it does for your main src. Leaves absolute
urls alone, (having // in the path)

```
<%= image_tage 'pic_1980.jpg', srcset: 'pic_640.jpg 2x, pic_1024.jpg 3x' %>
=> <img src="/images/pic_1980.jpg" srcset="/images/pic_640.jpg 2x, /images/pic_1024.jpg 3x">
```
2015-04-23 17:28:49 -07:00
Thomas Reynolds
4740159a3a Use Addressable to improve inline url detection and rewriting. Only rewrite relative paths. Closes #1499 2015-04-22 09:41:24 -07:00
Steven Sloan
3b1a00cf47 allow setting a destination_dir for SourceWatchers
This change lets a source be defined with a destination directory. That way we can mount a source (say a gem’s ‘doc’ directory) in a namespace and worry less about name collisions with  files in other sources.
2015-04-17 16:46:39 -04:00
Thomas Reynolds
a71589becd Make preview host and port configurable in config.rb and also expose those variables to extensions which are curious. Closes #1477 2015-03-01 18:17:22 -08:00
Andrew Kvalheim
049dabbf15 Use configurable content type for detection of minifiable content.
Squashed changes:

  - Prevent side effects of content type testing.
  - Test for inline minification in PHP files.
2015-02-25 16:08:26 -08:00
Thomas Reynolds
c94e5d0f4d Merge from stable 2015-02-24 11:16:16 -08:00
Thomas Ritz
262e976790 Fixes computation of parent.
If there is a file without a basename in root, e.g. `.htaccess`,
`#parent` of another file in root finds `.htaccess` instead of
`index.html`.

Adding the `.htaccess` to the traversal-app fixture exposes this error.
The fix is to no longer scan for possible files if we know the parent
must be root.
2015-02-21 19:07:17 +01:00
Steven Sloan
85fa3fac02 add support for “sidecar” frontmatter at the destination url of proxied resources
a “cheap” way to support adding data to pages created through `proxy` or `page` by adding frontmatter at the expected destination url.

for example proxying a page to `/proxied.html`, by adding a sidecar frontmatter file at `source/proxied.html.frontmatter` (or source/proxied.frontmatter if directory indexes is activated) the frontmatter will be merged with the proxy source and available to `current_resource` at the destination.
2014-12-22 13:59:27 -05:00
Thomas Reynolds
29693e4533 More URI encoding and decoding. Addresses #1406 2014-11-19 10:39:48 -08:00
Thomas Reynolds
d8e8b06cb6 merge v3 2014-11-19 09:04:56 -08:00
Dennis Reimann
e28ed20c63 Asset hashing for image references in srcset
Fixes #1287
2014-11-16 21:25:28 +01:00
Thomas Reynolds
7c37d4ba51 Merge pull request #1338 from dg-ratiodata/feature/chained_templates_partials
Chained template parsing failed if parent is "html.erb" and child is "html.md.erb"
2014-10-23 15:25:10 -07:00
Thomas Reynolds
a95dbb6367 Collections 2014-10-15 14:34:53 -05:00
minusfive
17cddce675 Parse asset-hashes on JSON files 2014-09-28 16:39:46 -04:00
Thomas Reynolds
f73e89370d execute modes as configure blocks 2014-09-11 09:40:10 -07:00
Thomas Reynolds
84acb50b02 Optimize globbed file lookups, fixes nasty performance regression 2014-08-24 17:10:25 -07:00
Thomas Reynolds
07ac578a31 merge 2014-08-24 11:36:42 -07:00
Christian Höltje
6895f30ff3 Accept pandoc-style YAML frontmatter
Pandoc (and some other tools) have decided to end their YAML frontmatter
with `...` instead of `---`.  In the name of flexibility, this patch
allows either to mark the end of YAML frontmatter.

Example:

```
---
title: No place like home
...
```
2014-08-15 13:21:30 -04:00
Thomas Reynolds
0f785a448a updated from stable 2014-08-14 10:14:26 -07:00
Thomas Reynolds
05aa396399 more slim tests. Targets #1327 2014-08-04 14:41:22 -07:00
Thomas Reynolds
724eab3ac9 fix alt tags and add test. Closes #1341 2014-08-03 08:29:29 -07:00
Dennis Günnewig
98a36d68f0 Merge branch 'v3-stable' into feature/chained_templates_partials
Conflicts:
	middleman-core/lib/middleman-core/core_extensions/rendering.rb
2014-07-31 13:00:19 +02:00
Dennis Günnewig
856f05709c Support template chaining for partials 2014-07-31 11:39:02 +02:00
Thomas Reynolds
2f545cefbe Attempt to allow i18n to override partial lookup. #1333 2014-07-24 11:11:27 -07:00
Thomas Reynolds
feef2bf71c Add external command support 2014-07-22 18:38:57 -07:00
Thomas Reynolds
bedf235ff6 Multiple Source watchers 2014-07-20 18:57:22 -07:00
Thomas Reynolds
9087da05d5 Merge branch 'v3-stable' 2014-07-20 13:54:45 -07:00
Thomas Reynolds
15d6210df8 Use the resource instead of the request path for auto asset helpers. Fixes #1326 2014-07-20 13:53:05 -07:00
Thomas Reynolds
6678ea1ae3 merge static partial change 2014-07-18 12:54:27 -07:00
Thomas Reynolds
f0603ddf2f work with static partials. Closes #1206 2014-07-18 10:54:48 -07:00
Thomas Reynolds
3ae16111ef Separate Build from Thor 2014-07-11 09:22:53 -07:00
Thomas Reynolds
52dcf37f24 Merge pull request #1318 from bhollis/partials_dir
Remove partials_dir functionality
2014-07-08 09:19:36 -07:00
Ben Hollis
004ba36741 Remove partials_dir functionality 2014-07-07 23:48:49 -07:00
Ben Hollis
a1fe810a50 Fixup after rebase 2014-07-07 22:12:44 -07:00
Ben Hollis
0cbc232dac Remove neighbor frontmatter support 2014-07-06 16:15:43 -07:00
Eliott Appleford
e2e3c1e3fb fix specs on windows 2014-07-03 21:09:32 +01:00
Ben Hollis
dfecfebc69 Remove options to proxy or ignore through page, and use Middleman::Util#path_match for matchers to allow a wider set of matchers. 2014-06-28 21:01:26 -07:00
Thomas Reynolds
a21dca025e Separate Environments from Modes 2014-06-11 10:28:30 -07:00
Thomas Reynolds
29bf25ace6 Extract compass support into extension, rewrite all features that rely on it to be pure Ruby 2014-06-03 09:01:46 -07:00
Thomas Reynolds
c2512e9093 update more files to non-hashrocket syntax 2014-05-26 17:58:35 -07:00
Thomas Reynolds
f89a76747e Removed wrap_layout 2014-05-25 12:23:00 +09:00
Thomas Reynolds
1c37cc6a34 Merge pull request #1238 from bhollis/asciidoc
Remove Asciidoc support in favor of a middleman-asciidoc extension
2014-03-30 10:52:40 -07:00
Ben Hollis
5ce8549f03 Remove Asciidoc support in favor of a middleman-asciidoc extension. 2014-03-29 19:24:51 -07:00
Ben Hollis
a6c37f3dd3 Clean up extensions a bit. Removes newest form of registering extensions, more consistently sets and uses an extension's ext_name, and makes a lot of things errors instead of just log messages in hopes that people can't get too far with a messed-up config. 2014-03-29 14:29:42 -07:00
Thomas Reynolds
8bc2fddb9d Remove static serving of non-Middleman folders 2014-03-25 16:57:57 -07:00
Thomas Reynolds
ce7636ad18 remove Implied Extensions feature. Closes #1211 2014-03-20 17:12:41 -07:00
Ben Hollis
7b46fd6524 Merge remote-tracking branch 'origin/v3-stable'
Conflicts:
	CHANGELOG.md
	middleman-core/lib/middleman-core/core_extensions/rendering.rb
	middleman-core/lib/middleman-core/extensions.rb
	middleman-core/lib/middleman-core/version.rb
	middleman-core/lib/middleman-more/core_extensions/compass.rb
	middleman-core/lib/middleman-more/core_extensions/default_helpers.rb
	middleman-core/middleman-core.gemspec
2014-02-22 18:11:37 -08:00
Ben Hollis
477f87e98a Prefer loading layouts from layouts_dir over layouts with the same name in the source root. This also includes a bunch of refactoring/cleanup of rendering.rb. Fixes #1176. 2014-02-20 08:50:07 -08:00
Thomas Reynolds
3995ad850c update padrino. 2014-02-18 18:30:29 -08:00
Thomas Reynolds
504a1c2eba remove confusing and broken data.page variable 2014-01-03 16:18:16 -08:00
Thomas Reynolds
98e3c8aa79 remove instance variable and page block support 2014-01-03 15:49:54 -08:00
Thomas Reynolds
95eaeba960 Start cleaning up Rack internals 2014-01-01 19:09:47 -08:00
Thomas Reynolds
c95c924d53 build a config file jail 2013-12-31 18:21:30 -08:00
Paul C Pederson
56343c84ed localization by filename extension 2013-11-18 10:20:42 -08:00
Thomas Reynolds
22c977d426 Merge branch 'master' of github.com:middleman/middleman 2013-10-29 09:44:22 -07:00
Thomas Reynolds
ca4935361b drop Ruby 1.8, add some extra tests 2013-10-29 09:43:56 -07:00
Thomas Reynolds
19c155349d Merge pull request #1044 from mojavelinux/asciidoc-renderer
resolves #1043 added a renderer for AsciiDoc files
2013-10-29 09:37:36 -07:00
Ben Hollis
441ec95065 Gracefully handle syntax (and other) errors when reloading config.rb.
With this change, config.rb modifications that result in an error will print the error to the logs but will not kill the server - the previous version of the application will still be running just fine, so that you can try and fix your config.rb without having to restart. The server no longer simply hangs with no message, which was the previous behavior. This fixes #702.
2013-10-19 19:39:10 -07:00
Dan Allen
5439139b76 added cucumber tests for #1043, AsciiDoc support 2013-10-19 14:41:52 -06:00
Ali Bosworth
2738e8ea69 Add test against URL fragments for asset hashes 2013-09-26 14:33:56 -07:00
Nicholas Hutchinson
dcd760d4f8 Demonstrate issue with directory indexes and spaces in paths
References #961
2013-09-16 21:07:56 -07:00
Steven Sloan
ee7c9e6a6e Add support/tests for Redcarpet 3.0.0 features
- :underline
- :highlight
- :disable_indented_code_blocks

Fix support for
- :link_attributes
- :filter_html

separate Redcarpet extensions from renderer options, add specs for missing renderer options

add specs for the missing/new redcarpet extensions, [ :lax_spacing, :underline, :highlight, :quote, :disable_indented_code_blocks, :footnotes ]

fix link_attributes option for Redcarpet

patch Tilt's reverse option aliases (they were there for RC1)

adjust test data for Redcarpet toc_data to match the current way it renders in 3.0

revert tests that aren't in redcarpet 3.0.0

add a cucumber exempt tag for mri-1.8.x

move redcarpet 3 specific extensions to a separate scenario filtered by the no18 tag
2013-08-27 11:37:37 -04:00
Jason Webster
dd08ea2f6d Fix wrong http pathing/prefixing example in generated config 2013-08-15 15:24:44 -07:00
Thomas Reynolds
8b970f9d92 support redcarpet's no_ flags which need to be re-implemented in our overrides. Fixes #951 2013-07-08 14:21:36 -07:00
Arron Mabrey
0d4dd71ae2 Add .nojekyll file to indexable-app fixture 2013-06-30 18:44:34 -04:00
Thomas Reynolds
c7d3e7d601 Fix regex which was allowing i18n to file yaml files in the data folder 2013-06-24 13:56:32 -07:00
Thomas Reynolds
37752dc291 fix layouts with implied extensions 2013-06-24 13:39:14 -07:00
Thomas Reynolds
efe52f7cca Check if set is redefining a param at the class level. Fixes #939 2013-06-17 00:47:10 +00:00
Thomas Reynolds
913d2b7049 Implement generic which is a simple way to build a file from Rack 2013-06-13 09:05:13 -07:00
Thomas Reynolds
7d7d5e683e Set current_engine on the context, not self, since we dup self and use that for each render loop. Closes #860 2013-06-12 15:21:31 -07:00
Thomas Reynolds
a52effc119 continue forcing Padrino to html_safe everything 2013-06-12 11:19:02 -07:00
Thomas Reynolds
efc0f9961b Merge pull request #927 from middleman/content_for_escaping
content_for is escaping .erb
2013-06-07 10:08:37 -07:00
Karl Freeman
ef46e4e6c3 add breaking test for escaped html using content_for 2013-06-07 09:59:59 +01:00
Karl Freeman
0b8c36cb8c capture_html helper tests 2013-06-07 09:58:37 +01:00
Thomas Reynolds
265f90e240 Add callback so v4 extensions can see when other extensions are activated 2013-06-04 15:51:03 -07:00
Thomas Reynolds
d0cd3e3cf9 layouts_dir is now configurable. Closes #899 2013-06-01 15:25:44 -07:00
Thomas Reynolds
149f6ffa5b fix builder not cleaning empty directories 2013-05-31 21:20:15 -04:00
Ben Hollis
7bdf28a421 Fix ignoring layouts from the sitemap when the source directory has been set to something other than 'source'. Fixes #896. 2013-05-30 20:17:58 -07:00
Jonathan Allard
56f16c2488 Fix #823-2 to allow only one extension on localized views
Make Sitemap::Store#strip_away_locale actually do something
2013-05-30 13:37:31 -04:00
Thomas Reynolds
31f238f881 Refactor some of i18n for better codeclimate scores. In the process, make nested i18n files work like rails 2013-05-29 14:00:37 -04:00
Thomas Reynolds
86cd626084 write some file change and deletion tests for better data coverage 2013-05-29 10:59:03 -04:00
Thomas Reynolds
fef8b8417d Add more nested data tests, actually get simplecov to run 2013-05-29 09:59:15 -04:00
Manuel Meurer
ed59260367 Replace all occurrences of data.page with current_page.data
see https://github.com/middleman/middleman/issues/912
2013-05-29 11:25:57 +02:00
Thomas Reynolds
9ebddeed1d merge more into core, use gem availability to autoload 2013-05-09 14:41:26 -07:00
Jonathan Allard
0211114ecb Change different-engine-layout from .str to Haml 2013-05-02 19:14:59 -07:00