Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
songkg7 committed Jun 27, 2024
1 parent af43ebf commit 8fe8470
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/docusaurus/docusaurus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { convertWikiLink } from '../jekyll/WikiLinkConverter';
import { convertFootnotes } from '../jekyll/FootnotesConverter';
import { convertDocusaurusCallout } from '../jekyll/CalloutConverter';
import { convertComments } from '../jekyll/CommentsConverter';
import { convertDateFrontMatter } from '../jekyll/FrontMatterConverter';
import fs from 'fs';
import path from 'path';
import { Notice } from 'obsidian';
Expand All @@ -21,7 +20,7 @@ export const convertToDocusaurus = async (plugin: O2Plugin) => {

for (const file of markdownFiles) {
const contents: Contents = await plugin.app.vault.read(file);
const result = convertDateFrontMatter(true,
const result =
convertComments(
convertDocusaurusCallout(
convertFootnotes(
Expand All @@ -30,8 +29,7 @@ export const convertToDocusaurus = async (plugin: O2Plugin) => {
),
),
),
),
);
);

await plugin.app.vault.modify(file, result);
}
Expand Down
3 changes: 2 additions & 1 deletion src/jekyll/FrontMatterConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ function replaceDateFrontMatter(frontMatter: FrontMatter, isEnable: boolean): Fr
return frontMatter;
}

export const convertDateFrontMatter = (isEnable: boolean, contents: string) => {
// TODO: "tag: mise, something" -> "tag: [mise, something]"
const convertDateFrontMatter = (isEnable: boolean, contents: string) => {
if (!isEnable) {
return contents;
}
Expand Down

0 comments on commit 8fe8470

Please sign in to comment.