jsonMartin / readwise-mirror

MIT License
53 stars 12 forks source link

feat: :sparkles: differentiate title from sanitized title #40

Open johannrichard opened 8 months ago

johannrichard commented 8 months ago

While the sanitized title is necessary for file names, one might want to use the real title in the contents. This change implements this and adds a new sanitized_title field to the metadata. I also update the default template to use sanitized_title in the Title WikiLink, for obvious reasons.

W.r.t. breaking changes, I considered the option to add a original_title and keeping title as sanitized in the metadate. However, I think despite the small annoyance this can pose if people use the title to link to the note itself, I think adding the sanitized_title is the better way.

BREAKING: The old default header template uses title which will create invalid links for titles with special characters if used with this update. Users are advised to update their templates before running a sync.