Class: Bridgetown::Configuration::SourceManifest

Inherits:
Struct
  • Object
show all
Defined in:
bridgetown-core/lib/bridgetown-core/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**kwargs) ⇒ SourceManifest

Returns a new instance of SourceManifest.



20
21
22
23
24
25
26
27
28
29
# File 'bridgetown-core/lib/bridgetown-core/configuration.rb', line 20

def initialize(**kwargs)
  # for backwards compatibility, we need to support plugin code which sets `content`
  # directly, rather than uses the new multi-collections `contents` hash
  if kwargs[:content]
    kwargs[:contents] = { pages: kwargs[:content] }
    kwargs.delete :content
  end

  super
end

Instance Attribute Details

#bare_textObject

Returns the value of attribute bare_text

Returns:

  • (Object)

    the current value of bare_text



17
18
19
# File 'bridgetown-core/lib/bridgetown-core/configuration.rb', line 17

def bare_text
  @bare_text
end

#componentsObject

Returns the value of attribute components

Returns:

  • (Object)

    the current value of components



17
18
19
# File 'bridgetown-core/lib/bridgetown-core/configuration.rb', line 17

def components
  @components
end

#contentsObject

Returns the value of attribute contents

Returns:

  • (Object)

    the current value of contents



17
18
19
# File 'bridgetown-core/lib/bridgetown-core/configuration.rb', line 17

def contents
  @contents
end

#layoutsObject

Returns the value of attribute layouts

Returns:

  • (Object)

    the current value of layouts



17
18
19
# File 'bridgetown-core/lib/bridgetown-core/configuration.rb', line 17

def layouts
  @layouts
end

#originObject

Returns the value of attribute origin

Returns:

  • (Object)

    the current value of origin



17
18
19
# File 'bridgetown-core/lib/bridgetown-core/configuration.rb', line 17

def origin
  @origin
end

Instance Method Details

#contentObject



31
32
33
34
35
36
37
# File 'bridgetown-core/lib/bridgetown-core/configuration.rb', line 31

def content
  Bridgetown::Deprecator.deprecation_message(
    "source_manifest.content is deprecated, use " \
    "source_manifest.contents instead"
  )
  contents.values.first
end