Releases: sillsdev/docu-notion
Releases · sillsdev/docu-notion
v0.16.1
v0.14.0-alpha.17
v0.14.0-alpha.16
0.14.0-alpha.16 (2024-05-01)
Bug Fixes
v0.16.0
0.16.0 (2024-04-09)
Bug Fixes
- Download images using axios instead of node-fetch (5d00de3)
- fallback to getting image file extension from url (7f1fd40)
- update readme to reflect change of css name (55ba105)
Features
- Add --require-slugs option (bff12fd)
- copy the latest docu-notion-styles.css to output (28645e8)
- Modify image file names (36da64a)
- If desired instead, users can specify
--image-file-name-format content-hash
to use a hash of the image content as the file name. (#76)
Breaking Changes
- Previously, image files names were a hash of all or part of the image url.
To provide more stability and future-proofing, the default format is now{page-slug}.{notion-block-id}
. (#82)
Users can opt in to the old format with--image-file-name-format legacy
.
Potential breaking change for plugins:
The exported type IDocuNotionContext changed from
export type IDocuNotionContext = {
layoutStrategy: LayoutStrategy;
options: DocuNotionOptions;
getBlockChildren: IGetBlockChildrenFn;
notionToMarkdown: NotionToMarkdown;
directoryContainingMarkdown: string;
relativeFilePathToFolderContainingPage: string;
convertNotionLinkToLocalDocusaurusLink: (url: string) => string | undefined;
pages: NotionPage[];
counts: ICounts;
imports: string[];
};
to
export type IDocuNotionContext = {
layoutStrategy: LayoutStrategy;
options: DocuNotionOptions;
getBlockChildren: IGetBlockChildrenFn;
notionToMarkdown: NotionToMarkdown;
pageInfo: IDocuNotionContextPageInfo;
convertNotionLinkToLocalDocusaurusLink: (url: string) => string | undefined;
pages: NotionPage[];
counts: ICounts;
imports: string[];
};
where IDocuNotionContextPageInfo
is
export type IDocuNotionContextPageInfo = {
directoryContainingMarkdown: string;
relativeFilePathToFolderContainingPage: string;
slug: string;
};