Skip to content

Commit

Permalink
Update post-process.js
Browse files Browse the repository at this point in the history
  • Loading branch information
joethei committed Feb 21, 2024
1 parent 65408c9 commit e828c63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/post-process.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ async function renameFiles(folderPath) {
// Step 2: add alias so links still work
const fileContent = await fs.readFile(newFilePath, 'utf-8');
let newFileContent = `---
aliases: "${newFileName}"
aliases: "${newFileName.slice(0, -3)}"
cssclasses: hide-title
---
`+ fileContent;

// Somehow we still get Plugin_2 even if `obsidian.d.ts` doesn't contain any reference to it
newFileContent = newFileContent.replaceAll('obsidian.', '').replaceAll('Plugin_2', 'Plugin').replaceAll('Plugin\_2', 'Plugin');
newFileContent = newFileContent.replaceAll('obsidian.', '').replaceAll('Plugin_2', 'Plugin').replaceAll('Plugin\_2', 'Plugin').replaceAll('Plugin\\_2', 'Plugin');
await fs.writeFile(newFilePath, newFileContent, 'utf-8');
} catch (err) {
console.error(`Error renaming file: ${err.message}`);
Expand Down

0 comments on commit e828c63

Please sign in to comment.