-
AuthorPosts
-
June 4, 2025 at 12:28 pm #15934
lunctoken
ParticipantHi,
First of all, thank you again for your work on Git It Write — it’s a fantastic plugin for Git-based content management in WordPress.
I’m encountering a specific issue related to files named README.md.
In my GitHub repo, I use README.md inside each folder to provide an overview of the content (as commonly done on GitHub). For example:
• /develop/dapp/README.md
• /develop/dapp/quick-start/README.mdWhen syncing with Git It Write, both of these files are imported as separate posts. However, since the default post_name is derived from the filename (without the path), both posts attempt to use the same slug readme, which leads to WordPress automatically renaming one of them to readme-2.
The main problem is that Git It Write does not associate the original file path with the post, and thus fails to recognize /develop/dapp/quick-start/README.md as already imported. As a result, a new duplicate post is created every time I sync, even if the content hasn’t changed.
Even adding a slug: field to the front matter does not help, since Git It Write uses the file name (not the front matter) to generate and track the post slug.
Suggestion
It would be helpful if Git It Write could:
1. Track the full file path (relative to the configured folder) as the post identifier, not just the filename.
2. Allow for an override of the slug using the front matter slug: field, to enforce consistency.
3. Or at least offer a warning when duplicate filenames (like README.md) exist under different paths that would map to the same post slug.
Let me know if this is something that can be addressed in a future release. I’m happy to help test or clarify the behavior further.
Thanks again for the great plugin!
Best regards,
Webjojo
June 5, 2025 at 2:31 am #15940
AakashKeymasterHi Webjojo,
Thanks for GIW plugin. I’m happy that you like it.
Regarding the issue, this is not expected. May I know what is your WordPress permalink URL format?
The format on my website is
https://www.aakashweb.com/%category%/%postname%/I myself use GIW for my plugin documentation, but never hit this issue.
Please see the docs below. Both have the same slug “FAQ”.
Github repo link:
https://github.com/vaakash/aakash-web/blob/master/docs/super-rss-reader/faq.md
https://github.com/vaakash/aakash-web/blob/master/docs/super-rss-reader/pro/faq.mdCan you please compare this with yours and see if there are any differences?
Thanks,
Aakash -
AuthorPosts
- You must be logged in to reply to this topic.
