Module: IIIFManifest

Extended by:
ActiveSupport::Autoload
Defined in:
lib/iiif_manifest.rb,
lib/iiif_manifest/v3.rb,
lib/iiif_manifest/version.rb,
lib/iiif_manifest/configuration.rb,
lib/iiif_manifest/display_image.rb,
lib/iiif_manifest/iiif_endpoint.rb,
lib/iiif_manifest/iiif_collection.rb,
lib/iiif_manifest/manifest_builder.rb,
lib/iiif_manifest/manifest_factory.rb,
lib/iiif_manifest/v3/display_content.rb,
lib/iiif_manifest/v3/manifest_builder.rb,
lib/iiif_manifest/v3/manifest_factory.rb,
lib/iiif_manifest/v3/annotation_content.rb,
lib/iiif_manifest/manifest_service_locator.rb,
lib/iiif_manifest/v3/manifest_service_locator.rb,
lib/iiif_manifest/manifest_builder/iiif_service.rb,
lib/iiif_manifest/manifest_builder/image_builder.rb,
lib/iiif_manifest/manifest_builder/canvas_builder.rb,
lib/iiif_manifest/v3/manifest_builder/body_builder.rb,
lib/iiif_manifest/v3/manifest_builder/iiif_service.rb,
lib/iiif_manifest/manifest_builder/resource_builder.rb,
lib/iiif_manifest/manifest_builder/sequence_builder.rb,
lib/iiif_manifest/manifest_builder/composite_builder.rb,
lib/iiif_manifest/manifest_builder/structure_builder.rb,
lib/iiif_manifest/v3/manifest_builder/canvas_builder.rb,
lib/iiif_manifest/v3/manifest_builder/choice_builder.rb,
lib/iiif_manifest/v3/manifest_builder/content_builder.rb,
lib/iiif_manifest/v3/manifest_builder/structure_builder.rb,
lib/iiif_manifest/v3/manifest_builder/thumbnail_builder.rb,
lib/iiif_manifest/manifest_builder/image_service_builder.rb,
lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb,
lib/iiif_manifest/manifest_builder/record_property_builder.rb,
lib/iiif_manifest/v3/manifest_builder/image_service_builder.rb,
lib/iiif_manifest/manifest_builder/composite_builder_factory.rb,
lib/iiif_manifest/v3/manifest_builder/record_property_builder.rb,
lib/iiif_manifest/manifest_builder/deep_canvas_builder_factory.rb,
lib/iiif_manifest/v3/manifest_builder/placeholdercanvas_builder.rb,
lib/iiif_manifest/v3/manifest_builder/annotation_content_builder.rb,
lib/iiif_manifest/manifest_builder/child_manifest_builder_factory.rb

Defined Under Namespace

Modules: V3 Classes: Configuration, DisplayImage, IIIFCollection, IIIFEndpoint, ManifestBuilder, ManifestFactory, ManifestServiceLocator

Constant Summary collapse

VERSION =
'1.6.0'.freeze

Class Method Summary collapse

Class Method Details

.config {|IIIFManifest::Configuration| ... } ⇒ IIIFManifest::Configuration

Exposes the IIIFManifest configuration.

In the below examples, you would add the code to a ‘config/initializers/iiif_manifest_config.rb` file in your application.

Examples:

# obliterate the default configuration and only use the one we gave
IIIFManifest.config do |config|
  config.manifest_property_to_record_method_name_map = { summary: :abstract }
end

# use the default configuration but amend the summary property
IIIFManifest.config do |config|
  config.manifest_property_to_record_method_name_map.merge!(summary: :abstract)
end

# set max edge length for thumbnail images
# the below example will set the max edge to 100px
IIIFManifest.confg do |config|
  config.max_edge_for_thumbnail = 100
end

# disable the thumbnail property on the manifest level
# since it will be shown by default
IIIFManifest.confg do |config|
  config.manifest_thumbnail = false
end

Yields:

Returns:

See Also:



51
52
53
54
55
56
57
# File 'lib/iiif_manifest.rb', line 51

def self.config(&block)
  @config ||= IIIFManifest::Configuration.new

  yield @config if block

  @config
end