add local TailwindCSS, fix side bar folder view, add more function to Markdown editor and allow .markdown files

This commit is contained in:
nahakubuilde
2025-08-28 07:29:51 +01:00
parent 090d491dd6
commit f364a4b6db
15 changed files with 714 additions and 79 deletions

View File

@@ -136,7 +136,15 @@ func GetFolderContents(folderPath string, cfg *config.Config) ([]models.FileInfo
// Set display name based on file type
if fileInfo.Type == models.FileTypeMarkdown {
fileInfo.DisplayName = strings.TrimSuffix(entry.Name(), ".md")
name := entry.Name()
lower := strings.ToLower(name)
if strings.HasSuffix(lower, ".markdown") {
fileInfo.DisplayName = name[:len(name)-len(".markdown")]
} else if strings.HasSuffix(lower, ".md") {
fileInfo.DisplayName = name[:len(name)-len(".md")]
} else {
fileInfo.DisplayName = strings.TrimSuffix(name, filepath.Ext(name))
}
} else {
fileInfo.DisplayName = entry.Name()
}