(title) use title notes for HTML title

This commit is contained in:
2021-08-08 12:36:37 +02:00
parent 496c161266
commit 8f46bd4740
4 changed files with 39 additions and 9 deletions

View File

@@ -1,2 +1,14 @@
export const filenameToNoteTitle = (title: string) =>
title.replaceAll('/', ' / ').replaceAll('-', ' ')
export const pathToNoteTitle = (path: string) => {
const fileNames = path.split('.')
fileNames.pop()
return fileNames
.join('.')
.split('/')
.filter((path) => !path.includes('README'))
.join('/')
.replaceAll('-', ' ')
}