diff --git a/lib/docs/core/manifest.rb b/lib/docs/core/manifest.rb index b7c2e00d..a043cb5d 100644 --- a/lib/docs/core/manifest.rb +++ b/lib/docs/core/manifest.rb @@ -20,6 +20,15 @@ module Docs if doc.options[:attribution].is_a?(String) json[:attribution] = doc.options[:attribution].strip 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 end end