✨ (title) use title notes for HTML title
This commit is contained in:
@@ -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('-', ' ')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user