Fix Docs.aliases

pull/2361/head
Simon Legner 2 months ago
parent 2b8d9b6c33
commit 5d8d12c133

@ -101,7 +101,7 @@ module Docs
end end
def self.generate_manifest def self.generate_manifest
Manifest.new(store, all_versions).store Manifest.new(store, all_versions, aliases).store
end end
def self.store def self.store

@ -4,9 +4,10 @@ module Docs
class Manifest class Manifest
FILENAME = 'docs.json' FILENAME = 'docs.json'
def initialize(store, docs) def initialize(store, docs, aliases)
@store = store @store = store
@docs = docs @docs = docs
@aliases = aliases
end end
def store def store
@ -20,7 +21,7 @@ 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
json[:alias] = Docs.aliases[json["slug"].try(:to_sym)] json[:alias] = @aliases[doc.slug]
result << json result << json
end end
end end

Loading…
Cancel
Save