Skip to content

Commit ceacb38

Browse files
committed
fix: get admonition label order correct
1 parent d01995a commit ceacb38

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"lib/**/*"
99
],
1010
"scripts": {
11-
"write-version": "cross-var echo {\\\"version\\\":\\\"$npm_package_version\\\"} > version.json",
1211
"build": "npm run write-version && tsc",
1312
"clean": "rm -rf ./lib/",
1413
"semantic-release": "semantic-release",

src/DocusaurusTweaks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function tweakForDocusaurus(input: string): string {
1919
if (docusaurusAdmonition) {
2020
output = output.replace(
2121
string,
22-
`${docusaurusAdmonition}:::\n\n${content}\n\n:::\n\n`
22+
`:::${docusaurusAdmonition}\n\n${content}\n\n:::\n\n`
2323
);
2424
}
2525
}

src/index.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@
33
import { program } from "commander";
44

55
import { notionPull } from "./pull";
6-
// note: just getting process.en.npm_package_version will return the version of the client package!
7-
// So in our npm scripts we write out this version info and then pull it in here (tsc can
8-
// handle json more readily than just txt)
9-
//const version = require("./version.json");
10-
11-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
12-
//console.log(`notion-pull version ${version.version}`);
136
const pkg = require("../package.json");
147
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
158
console.log(`notion-pull version ${pkg.version}`);
@@ -23,7 +16,7 @@ program
2316
)
2417
.requiredOption(
2518
"-m, --markdown-output-path <string>",
26-
"root of the hierarchy for md files. WARNING: node-pull will delete this directory."
19+
"root of the hierarchy for md files. WARNING: node-pull will delete files from this directory."
2720
)
2821
.requiredOption(
2922
"-i, --img-output-path <string>",

src/pull.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ export async function notionPull(options: any): Promise<void> {
4646
layoutStrategy = new HierarchicalNamedLayoutStrategy();
4747
//layoutStrategy = new FlatGuidLayoutStrategy();
4848

49-
layoutStrategy.setRootDirectoryForMarkdown(markdownOutputPath);
5049
await fs.mkdir(markdownOutputPath, { recursive: true });
50+
layoutStrategy.setRootDirectoryForMarkdown(markdownOutputPath);
51+
5152
console.log("Connecting to Notion...");
5253
// About the complication here of getting all the pages first and then output
5354
// them all. It would be simpler to just do it all in one pass, however the

0 commit comments

Comments
 (0)