Skip to content

Support for custom link transforms (overriding md.link) #146

Open
@jsakas

Description

@jsakas

In notion, if you use the @ to reference a page inside of a paragraph, it gets added as a mention inside of the paragraph rich_text object. The default link transformation is hard-coded to the notion.so/:page_id link. This makes it difficult to use this package for generating content for static sites that are outside of Notion. For example, we're using Notion to render static pages into our Astro site (think CMS)

Proposal: introduce NotionToMarkdown.linkTransformer and NotionToMarkdown.setLinkTransformer which wraps md.link.

I will add a PR for your review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions