lonekorean / wordpress-export-to-markdown

Converts a WordPress export XML file into Markdown files.
MIT License
1.07k stars 216 forks source link

Preserve WordPress post ids as frontmatter metadata #95

Closed LeaVerou closed 5 months ago

LeaVerou commented 1 year ago

Please consider preserving WordPress’s post ids as frontmatter metadata. Disqus (and potentially other systems) uses them to create unique identifiers to associate its threads with WP posts, so it would make preserving Disqus comments trivial.

It could be a key like wp_id to make the purpose clear. Perhaps it could be opt-in?

wanghaisheng commented 1 year ago

@LeaVerou did you fix this

LeaVerou commented 1 year ago

Νο, I extracted the post ids as a separate 11ty data file and add the post id on runtime, see: https://lea.verou.me/blog/2023/preserve-disqus/

lonekorean commented 5 months ago

Frontmatter handling has been rearchitected, you can now customize which frontmatter fields are included by editing frontmatter_fields in settings.js.

Additionally, a frontmatter getter for ID was added in v2.3.1 so it's ready to use out of the box.