getContentSourceType

The getContentSourceType method returns the unique type of the content source module.

Return Value

The getContentSourceType method should return the unique type of the content source module, which should be different from any other content source types used in the same project.

The value returned by this method, in combination with the getProjectId() method, should be unique among other content source instances in the same project.

Example

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
import type { ContentSourceInterface } from '@stackbit/types'

export class MyContentSource implements ContentSourceInterface {
  getContentSourceType(): string {
    return 'my_content_source'
  }

  // other methods ...
}