Ben Hollis
16b3a729cd
Serve extensionless files or dotfiles with text/plain MIME type, and remove Sitemap::Resource#mime_type.
2013-01-17 19:40:39 -08:00
Thomas Reynolds
a76b02a55b
Don't look for frontmatter on binary files. Fixes #728
2013-01-11 17:25:45 -08:00
Thomas Reynolds
fbb2a355d7
Copy binary files instead of rendering through MM. Closes #643 . Closes #699
2012-12-30 20:44:29 -08:00
Thomas Reynolds
6253c91610
Allow non-templates to have frontmatter. Closes #698
2012-12-30 20:40:20 -08:00
Thomas Reynolds
45ddc0c344
Make Sitemap metadata queryable with arel-style API
2012-12-25 16:05:54 -08:00
Ben Hollis
c40102cf53
Make Sitemap::Store more thread-safe.
2012-10-20 21:19:13 -07:00
Thomas Reynolds
af81b588d5
Merge pull request #620 from bhollis/config
...
Move config settings into a separate object
2012-10-14 12:52:19 -07:00
Ben Hollis
4fe22e3fb5
Move more things over to new configs. Don't let root be configured
2012-10-13 22:37:24 -07:00
Ben Hollis
1ee89ac6bf
Upgrade proxy to be able to take :locals and understand :ignore, and store proxy options and metadata with the proxy list.
...
This allows users to use proxy directly instead of page to create dynamic pages, and improves performance of dynamic pages for sites that create many proxies. It also allows people to use locals instead of instance variables, which are better for partials and reduce the risk of overwriting Middleman settings.
2012-10-12 19:46:11 -07:00
Ben Hollis
6c241603ac
Delay recalculating sitemap until absolutely necessary, avoiding redundant recalculations.
2012-09-16 19:36:47 -07:00
Thomas Reynolds
446aa6a4ba
Clean up whitespace, play with cane for testing style quality and code complexity
2012-08-13 15:41:07 -07:00
Thomas Reynolds
80e36b7c53
Given file-based metadata precedence over config/path metadata. Fixes #552
2012-07-29 10:22:57 -07:00
Tim Bates
99a8723ea6
Fix instance variables in dynamic pages
2012-07-24 23:02:27 +09:30
Ben Hollis
62fa17cf1a
Reduce work converting paths from relative to absolute and back again
2012-07-19 01:18:55 -07:00
Thomas Reynolds
de6d7980ac
Use centralized Logger and add instrument methods
2012-07-18 09:30:39 -07:00
Tim Bates
0fa1bfe675
Tests and a small bug fix to make them pass
2012-07-13 16:00:53 +09:30
Tim Bates
3cbda0ee36
Added strip_index_file option for configuring urls
2012-07-13 10:57:05 +09:30
Tim Bates
692aa10c8b
Add trailing_slash option for prettier urls
...
"set :trailing_slash, false" will cause resource urls that match the
index_file to have the trailing slash stripped off the directory URL,
e.g. instead of "/dir/index.html" becoming "/dir/" it will be "/dir"
2012-07-12 12:03:33 +09:30
Tim Bates
d30f883e48
Regenerate @_lookup_cache after each manipulation
...
Trying to call Resource#metadata from within
MyExtension#manipulate_resource_list generates an exception in
Proxies::ResourceInstanceMethods#get_source_file because @_lookup_cache
is empty. Moving the recalculation inside the loop means regenerating
the cache after each manipulation but allows extensions to examine the
page metadata when manipulating proxied resources.
2012-07-11 15:16:18 +09:30
Tim Bates
ffecc3e4cc
Optimisation, Hash#delete returns the deleted item
2012-07-11 15:14:08 +09:30
Ben Hollis
12c551228f
Don't allow people to proxy a path to itself, or to another proxy.
2012-07-08 15:30:02 -07:00
Ben Hollis
6ac263619a
Make :http_prefix work in link_to and asset helpers as long as the linked item is a sitemap resource. Fixes #484 .
2012-06-23 17:19:24 -07:00
Thomas Reynolds
c3796a9161
:automatic_directory_matcher optionally converts a character sequence in file names into a subdirectory. Closes #491
2012-06-19 20:07:50 -07:00
Thomas Reynolds
b02ee61639
Weird block scoping issue in old Ruby
2012-05-28 14:09:43 -07:00
Thomas Reynolds
8d483f882c
Move Sprockets into an extension
2012-05-26 13:43:27 -07:00
Thomas Reynolds
2c058ee3de
Couple of fixes, specifically an issue with frontmatter layout setting
2012-05-22 19:11:54 -07:00
Ben Hollis
c775a9973c
Handle relative path urls in link_to, and add an option to produce relative links as well. Or, set :relative_links in config.rb to turn on relative links for all link_to calls.
2012-05-19 19:24:37 -07:00
Thomas Reynolds
7929ed6c75
Refactor Frontmatter to use sitemap manipulators. Also fixes #422
2012-05-08 21:10:41 -07:00
Thomas Reynolds
d55fef62b4
Remove usage of autoload statement in favor of require
2012-05-07 14:41:39 -07:00
Thomas Reynolds
2965e3709d
Yard doc cleanup
2012-05-02 11:13:48 -07:00
Thomas Reynolds
3d129b8523
Merge pull request #409 from bhollis/metadata
...
Add Resource#add_metadata for attaching metadata directly to a resource
2012-04-29 23:08:28 -07:00
Ben Hollis
bc435cc2e2
Add Resource#add_metadata for attaching metadata directly to a resource
2012-04-29 22:32:52 -07:00
Ben Hollis
dee0e616ad
Index frontmatter off source_file, allowing us to get rid of Resource#relative_path
2012-04-29 18:51:00 -07:00
Thomas Reynolds
1d583caf40
Merge pull request #381 from bhollis/speedup
...
Two speedups
2012-04-24 09:57:19 -07:00
Ben Hollis
ecf56d8e55
Cache Resource#metadata
2012-04-24 00:22:19 -07:00
Ben Hollis
35037957a6
Get rid of some extraneous sitemap refreshes
2012-04-24 00:22:10 -07:00
Thomas Reynolds
83178031d2
Merge pull request #371 from bhollis/speedup
...
Speed up builds
2012-04-23 10:29:06 -07:00
Thomas Reynolds
5405af5e0f
Merge pull request #372 from bhollis/timing
...
Add timing info to render logging, and document why we use thin instead of webrick
2012-04-23 10:27:04 -07:00
Ben Hollis
c560a0d20e
Add timing info to render logging, and document why we use thin instead of webrick
2012-04-23 01:24:16 -07:00
Ben Hollis
ab77cb2f34
Add an "origin" parameter to provides_metadata to allow for replacing metadata callbacks rather than always appending
2012-04-23 01:17:24 -07:00
Ben Hollis
9be76da3cf
Simplify populating the sitemap lookup cache
2012-04-20 21:59:20 -07:00
Thomas Reynolds
b97f681ef1
Move file extension methods up a level
2012-04-19 15:47:47 -07:00
Ben Hollis
a0712224c6
Ignore unnecessary ignores and use destination_path in url
2012-04-17 23:55:28 -07:00
Ben Hollis
50b797e0be
Get asset_hash working after the sitemap refactor. Part of this required changing the behavior of the OnDisk Sitemap extension to rebuild the sitemap every time a file is touched, instead of just when files are added (even if the file being touched is ignored by the sitemap, like a partial!). This is because asset_hash needs to recalculate hashes whenever any file changes, since partials can affect the output of other files.
2012-04-17 01:05:28 -07:00
Thomas Reynolds
d2d40079cc
Rename Middleman::Base to Middleman::Application
2012-04-14 14:04:10 -07:00
Thomas Reynolds
0bc35db4a6
move util methods into their own namespace
2012-04-14 13:36:24 -07:00
Thomas Reynolds
d935aedd59
Sitemap refactor
2012-04-14 13:17:42 -07:00
Ben Hollis
fc79459e61
Fix the asset_hash extension to operate on the hash of the rendered output rather than just the source file. This prevents generating the same hash for a file when partials it uses change, or if a helper it uses produces different output. As part of this change I removed the caching from Sitemap::Page#destination_path and asset_hash since they were preventing recalculation of path/hash when partials changed, and I rewrote the Sprockets extension to expose the Sprockets environment to other extension, which included consolidating the JS and CSS Sprockets environments into one.
2012-04-04 00:00:33 -07:00
Ben Hollis
4a4454fcab
Introduce a cache tied to individual sitemap pages. This helps individual extensions avoid having to implement methods to clear the cache whenever a page changes.
2012-04-01 20:37:24 -07:00
Thomas Reynolds
183e9d68f3
Implied extensions. Closes #304
2012-03-29 18:34:25 +01:00