aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-06-06 14:00:17 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-06-06 14:00:17 +0200
commit6187aec3443652aed630e9b6a98f1a056847ab5a (patch)
tree6b0cdd63ed8ce7ed606b321e7ab0c79d72228483
parent399e916fe15b08a6b0c3ca155d92e874f936193a (diff)
downloadhmnoweb-6187aec3443652aed630e9b6a98f1a056847ab5a.tar.gz
hmnoweb-6187aec3443652aed630e9b6a98f1a056847ab5a.tar.bz2
hmnoweb-6187aec3443652aed630e9b6a98f1a056847ab5a.zip
Fix export of category title and slug.HEADmaster
For some reason these are not exported by the default implementation.
-rw-r--r--script/export.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/export.rb b/script/export.rb
index f18263e..0e4b8d7 100644
--- a/script/export.rb
+++ b/script/export.rb
@@ -32,7 +32,7 @@ IO.write(File.join(output_dir, '_users.yml'), users.to_yaml)
puts "Exporting categories..."
categories = Refinery::Blog::Category.all.reduce({}) do |m, cat|
- m.merge({ cat.slug => cat.attributes })
+ m.merge({ cat.slug => cat.attributes.merge({ 'title' => cat.title, 'slug' => cat.slug }) })
end
IO.write(File.join(output_dir, '_categories.yml'), categories.to_yaml)