From 5d8d12c133b7d456c364252dc3112bc49515f57c Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 17 Nov 2024 14:26:04 +0100 Subject: [PATCH] Fix Docs.aliases --- lib/docs.rb | 2 +- lib/docs/core/manifest.rb | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/docs.rb b/lib/docs.rb index f8ab6a03..6607bc6d 100644 --- a/lib/docs.rb +++ b/lib/docs.rb @@ -101,7 +101,7 @@ module Docs end def self.generate_manifest - Manifest.new(store, all_versions).store + Manifest.new(store, all_versions, aliases).store end def self.store diff --git a/lib/docs/core/manifest.rb b/lib/docs/core/manifest.rb index b9744ca2..7d90e1f8 100644 --- a/lib/docs/core/manifest.rb +++ b/lib/docs/core/manifest.rb @@ -4,9 +4,10 @@ module Docs class Manifest FILENAME = 'docs.json' - def initialize(store, docs) + def initialize(store, docs, aliases) @store = store @docs = docs + @aliases = aliases end def store @@ -20,7 +21,7 @@ module Docs if doc.options[:attribution].is_a?(String) json[:attribution] = doc.options[:attribution].strip end - json[:alias] = Docs.aliases[json["slug"].try(:to_sym)] + json[:alias] = @aliases[doc.slug] result << json end end