mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-05-05 04:52:28 +02:00
Feat: update changelog and add support for {{slugifiedFileName}} in slug generation #922
This commit is contained in:
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,5 +1,17 @@
|
||||
# Change Log
|
||||
|
||||
## [10.9.0] - 2025-xx-xx
|
||||
|
||||
### ✨ New features
|
||||
|
||||
### 🎨 Enhancements
|
||||
|
||||
### ⚡️ Optimizations
|
||||
|
||||
- [#922](https://github.com/estruyf/vscode-front-matter/issues/922): Added the `{{slugifiedFileName}}` for better naming
|
||||
|
||||
### 🐞 Fixes
|
||||
|
||||
## [10.8.0] - 2025-02-27 - [Release notes](https://beta.frontmatter.codes/updates/v10.8.0)
|
||||
|
||||
### 🎨 Enhancements
|
||||
|
||||
@@ -40,6 +40,11 @@ export class SlugHelper {
|
||||
const fileName = SlugHelper.slugify(file.name);
|
||||
const regex = new RegExp('{{sluggedFileName}}', 'g');
|
||||
slugTemplate = slugTemplate.replace(regex, fileName);
|
||||
} else if (slugTemplate.includes(`{{slugifiedFileName}}`)) {
|
||||
const file = parse(filePath || '');
|
||||
const fileName = SlugHelper.slugify(file.name);
|
||||
const regex = new RegExp('{{slugifiedFileName}}', 'g');
|
||||
slugTemplate = slugTemplate.replace(regex, fileName);
|
||||
}
|
||||
|
||||
const dateFormat = Settings.get(SETTING_DATE_FORMAT) as string;
|
||||
|
||||
Reference in New Issue
Block a user