Documentation ¶
Overview ¶
Package tools provides visitors for external usage and will provide other tools one day.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LinkVisitor ¶
func LinkVisitor(ctx mycocontext.Context) ( visitor func(block blocks.Block), result func() []links.Link, )
LinkVisitor creates a visitor which extracts all the links from the document in context.
We consider inline link, rocket link, image gallery and transclusion targets to be links. Currently, there is a bug with image galleries that will
func OpenGraphVisitors ¶
func OpenGraphVisitors(ctx mycocontext.Context) ( resultHTML func() string, descVisitor func(blocks.Block), imgVisitor func(blocks.Block), )
OpenGraphVisitors returns visitors you should pass to BlockTree. They will figure out what should go to the final opengraph. Call resultHTML to get that result.
Description is the first root paragraph of the document. If there is no such paragraph, the description is empty string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.