|
@@ -20,6 +20,15 @@ module Docs
|
|
|
if doc.options[:attribution].is_a?(String)
|
|
if doc.options[:attribution].is_a?(String)
|
|
|
json[:attribution] = doc.options[:attribution].strip
|
|
json[:attribution] = doc.options[:attribution].strip
|
|
|
end
|
|
end
|
|
|
|
|
+
|
|
|
|
|
+ # parse doc aliases from JS file as Ruby hash
|
|
|
|
|
+ entry_file = File.open("assets/javascripts/models/entry.js")
|
|
|
|
|
+ data = entry_file.read
|
|
|
|
|
+ aliases = eval data.split("ALIASES = ").last.split(";").first
|
|
|
|
|
+
|
|
|
|
|
+ # set alias value
|
|
|
|
|
+ json["alias"] = aliases[json["slug"].to_sym]
|
|
|
|
|
+
|
|
|
result << json
|
|
result << json
|
|
|
end
|
|
end
|
|
|
end
|
|
end
|