View Source Conpipe.Converter.Netlify (conpipe v0.0.1-alpha.2)

This is an experimental converter, that post-processes HTML to rewrite image URLs to use Netlify.

See the Tableau issue https://github.com/elixir-tools/tableau/issues/107 for more background.

This use case derives from @paradox460's Netlify processor at https://github.com/elixir-tools/tableau/issues/107

To use, put this converter LAST in the Pipeline, after HTML conversion.

Summary

Functions

Perform HTML post-processing for Netlify image links

The convert/4 function can be called directly from Tableau.

Functions

Link to this function

convert(arg, converter_opts \\ [])

View Source
@spec convert({String.t(), map()}, keyword()) :: {String.t(), map()}

Perform HTML post-processing for Netlify image links

Link to this function

convert(filepath, front_matter, body, opts)

View Source
@spec convert(
  filepath :: String.t(),
  front_matter :: map(),
  body :: String.t(),
  opts :: map()
) ::
  output :: String.t()

The convert/4 function can be called directly from Tableau.

# config/config.exs
config :tableau, :config,
  url: "http://localhost:4999",
  converters: [
    md: Conpipe.Converter.Netlify
  ]

The convert/4 function returns just the converted text. It should not be used in a pipeline.