Commit graph

96 commits

Author SHA1 Message Date
Thomas Reynolds 441dc2faa6 Revert breaking resource source_file api. For #1595 2015-09-09 11:55:56 -07:00
Thomas Reynolds 7383f67874 Implement yaml data postscript 2015-06-16 15:30:37 -07:00
Thomas Reynolds 22ce56492f Experiment with Hamster 2015-04-24 10:28:03 -07:00
Thomas Reynolds c94e5d0f4d Merge from stable 2015-02-24 11:16:16 -08:00
Max Meyer e69704b540 Fixed whitespace offenses 2014-12-28 10:49:46 +01:00
Thomas Reynolds ee4c68b03c prep alpha, backwards compat 2014-12-23 14:54:21 -08: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 d8e8b06cb6 merge v3 2014-11-19 09:04:56 -08:00
Dennis Günnewig b78515ce91 Fixed rubocop offense 2014-09-09 09:02:50 +02:00
Thomas Reynolds 5a85d177c2 Catch File read exceptions in frontmatter 2014-08-29 10:24:45 -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 bedf235ff6 Multiple Source watchers 2014-07-20 18:57:22 -07:00
Thomas Reynolds 9ae8a3128b Refactor FileWatcher 2014-07-10 12:38:38 -07:00
Thomas Reynolds 0185d37473 Experiment with Contracts 2014-07-08 18:18:17 -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
Thomas Reynolds 0ca6c37e5d Remove App include in File Watcher 2014-07-05 16:44:04 -07:00
Thomas Reynolds 1bd7dab1a3 Make a ProxyResource which extends Resource, rather than injecting methods into Resource 2014-07-04 10:38:25 -07:00
Ben Hollis 85cebdb7e9 rubocop 2014-06-14 11:31:53 -07:00
Ben Hollis b0ea4e7608 Tweak resource manipulator order 2014-06-14 11:31:53 -07:00
Ben Hollis 5760d64ef9 More ignores 2014-06-14 11:31:53 -07:00
Ben Hollis 096f5ee356 Use source file, not path, to look up frontmatter data 2014-06-14 11:31:53 -07:00
Ben Hollis adfad92f8f Get rid of raw_data 2014-06-14 11:31:52 -07:00
Ben Hollis c285848866 Clean up i18n a bit, stake out some territory around routing and resource 2014-06-14 11:31:52 -07:00
Ben Hollis 69396d34c1 Start gutting the provides_metadata methods and move some of frontmatter over 2014-06-14 11:31:52 -07:00
Thomas Reynolds f513ab77b3 Rubocop'd 2014-04-29 11:43:05 -07:00
Thomas Reynolds 6760d855bc hashrocket killa 2014-04-29 10:50:21 -07:00
Thomas Reynolds 8eabe4d354 rubocop 2: the reckoning 2014-04-29 10:44:24 -07:00
Thomas Reynolds 04dc48f13d Great rubocop-ing 2014-04-28 16:02:18 -07:00
Ben Hollis c1f7299cfd Fix some references to extensions[:frontmatter] 2014-03-29 17:21:49 -07:00
Thomas Reynolds 504a1c2eba remove confusing and broken data.page variable 2014-01-03 16:18:16 -08:00
Thomas Reynolds bea2515a41 Move CLI into middleman-cli 2014-01-02 16:39:06 -08:00
Thomas Reynolds 305d2f99ed Put template rendering in a jail 2014-01-02 16:05:39 -08:00
Karl Freeman a31aa5d8be TrailingWhitespace 'cop' fix 2013-12-28 18:14:15 +00:00
Karl Freeman 03d6e6c990 Implemented Rubocop
- just took a stab at running the StringLiterals cop to get a taste.
2013-12-28 00:47:39 +00:00
Ben Hollis f92ae94728 Escape filenames in regexes. Fixes #942. 2013-08-15 22:04:18 -07:00
Ben Hollis 8979fe9f18 Print file where YAML/JSON errors occur. Fixes #954. 2013-07-08 22:16:03 -07:00
Thomas Reynolds 10f1d7ada2 break apart some methods to make code less complex 2013-05-31 20:46:12 -04:00
Ben Hollis f611a7185b Clean up frontmatter a bit 2013-05-28 22:29:58 -07:00
Thomas Reynolds 950aace674 Make Frontmatter a class-based extension to simplify file 2013-05-24 17:11:46 -07:00
Thomas Reynolds bcdaad6443 Merge pull request #906 from adamesque/master
Make sure Frontmatter data is actually cached
2013-05-23 13:35:01 -07:00
Thomas Reynolds 424fee0722 Cache frontmatter repeated calling of recursively_enhance 2013-05-23 13:31:52 -07:00
Adam Luikart c60cddc1ac Make sure Frontmatter data is actually cached. Fixes #903
(Can't return a value to early out of a begin…end expression in Ruby)
2013-05-23 14:50:46 -05:00
Ben Hollis dbbf84016f Fix c9d151ba66 for when files are outside the project 2013-05-22 23:39:56 -07:00
Thomas Reynolds c9d151ba66 The file watcher knows which files exist, so don't use slow File.exists?
Possible solution for #903
2013-05-22 17:38:01 -07:00
Thomas Reynolds ca333bb306 avoid warning with empty frontmatter 2013-04-14 09:29:34 -07:00
Thomas Reynolds 0574cc3d28 Support sideloading from .frontmatter files. Closes #855 2013-04-12 16:14:16 -07:00
Ben Hollis 7a4aa109a6 Overhaul content-type handling, making it configurable via page/proxy commands as well as frontmatter with the 'content_type' parameter.
Now, users can set content type explicitly for their files in a number of ways, or rely on automatic file-extension content types. Proxied files default to automatic file-extension content types, but then fall back to the content type of the resource they proxy to. There is also a bug fixed around correctly setting content type inside send_file. Fixes #821.
2013-04-06 15:11:25 -07:00
Ben Hollis 397ccd2c1e Fix a bunch of Ruby warnings, including a bug in the not_found method 2013-04-06 14:56:08 -07:00