diff --git a/bridgetown-core/lib/bridgetown-core/collection.rb b/bridgetown-core/lib/bridgetown-core/collection.rb index 674c349c2..39c8dd002 100644 --- a/bridgetown-core/lib/bridgetown-core/collection.rb +++ b/bridgetown-core/lib/bridgetown-core/collection.rb @@ -54,6 +54,8 @@ def resources_by_relative_url # Iterate over Resources, support Enumerable def each(...) = resources.each(...) + def deconstruct = resources.deconstruct + # Fetch the static files in this collection. # Defaults to an empty array if no static files have been read in. # diff --git a/bridgetown-core/lib/bridgetown-core/resource/base.rb b/bridgetown-core/lib/bridgetown-core/resource/base.rb index 5344aa285..ea1ec1403 100644 --- a/bridgetown-core/lib/bridgetown-core/resource/base.rb +++ b/bridgetown-core/lib/bridgetown-core/resource/base.rb @@ -343,6 +343,10 @@ def previous_resource alias_method :previous_doc, :previous_resource alias_method :previous, :previous_resource + def deconstruct_keys(...) + @data.value.deconstruct_keys(...) + end + def mark_for_fast_refresh! @fast_refresh_order = site.fast_refresh_ordering site.fast_refresh_ordering += 1