Documentation ¶
Index ¶
- type Converter
- func (c *Converter) ConvertUrlToAnf(url string, siteConfig *SiteConversionConfig) (*article.Article, error)
- func (c *Converter) HTMLToANF(url string, htmlBytes []byte, siteConfig *SiteConversionConfig) (*article.Article, error)
- func (c *Converter) HTMLToANFComponents(htmlBytes []byte, siteConfig *SiteConversionConfig) ([]components.Component, error)
- type CustomComponentHandler
- type DefaultLinkFormatter
- type LinkFormatter
- type SiteConversionConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Converter ¶
type Converter struct { LinkFormatter LinkFormatter CustomComponentHandlers []CustomComponentHandler }
func (*Converter) ConvertUrlToAnf ¶
func (*Converter) HTMLToANFComponents ¶
func (c *Converter) HTMLToANFComponents(htmlBytes []byte, siteConfig *SiteConversionConfig) ([]components.Component, error)
type CustomComponentHandler ¶
type DefaultLinkFormatter ¶
type DefaultLinkFormatter struct{}
func (*DefaultLinkFormatter) Format ¶
func (df *DefaultLinkFormatter) Format(inHREF string) string
type LinkFormatter ¶
type SiteConversionConfig ¶
type SiteConversionConfig struct { SectionConversionSelectors []string `json:"sectionConversionSelectors,omitempty"` TitleSelector string `json:"titleSelector"` }
func GetSiteConfig ¶
func GetSiteConfig(conversionConfigFilePath string) (*SiteConversionConfig, error)
Click to show internal directories.
Click to hide internal directories.