Adds a stripDatePrefix configuration option that removes YYYY-MM-DD- prefixes from filenames when deriving slugs.
{
"siteUrl": "https://example.com",
"contentDir": "./_posts",
"stripDatePrefix": true
}
``
- Changes
- Add stripDatePrefix?: boolean to PublisherConfig in types.ts
- Add date stripping logic in getSlugFromOptions() in markdown.ts
- Pass option from publish and sync commands
- Add to generateConfigTemplate() in config.ts
- Motivation
Jekyll uses dated filenames (YYYY-MM-DD-title.md) where the date is metadata and the slug is just the title portion. Without this option, users must preprocess files or add explicit slug fields to frontmatter. This option follows the existing pattern of removeIndexFromSlug.
This is awesome!! Thanks for adding this ๐