• Resolved robertomano24

    (@robertomano24)


    Hello,

    I have successfully started using this tool, which is excellent. I exported all my current posts to GitHub as .md files and then pulled from GitHub hoping it would auto match the posts. However, it just created duplicates of all the original posts. Is there an easy way to either merge these or start over so my current posts can be converted to this method without starting stats over?

    Thanks!
    Robert

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author vaakash

    (@vaakash)

    Hi @robertomano24,

    Thanks for using Git it write plugin. Happy that you liked it.

    The plugin will look at existing post’s slug to decide whether to update or add new.

    The post’s slug should be same as the file name. If yes, then the posts will be updated, else the plugin will try to create new.

    To know slug of your post, select the “slug” metabox from the post edit page screen options. Make sure you name your markdown files the same.

    Please let me know if the behavior is seen otherwise with your github repo URL and a screenshot of the post list (or) post URL

    Thanks,
    Aakash

    Thread Starter robertomano24

    (@robertomano24)

    Thanks so much for your response, @vaakash !

    https://github.com/RobertDWhite/WhiteMatterTech/tree/main/_posts

    I verified that all the slugs in the original posts match the GitHub (e.g., post from 2022 on WP shows this slug: tails-os-with-encrypted-persistence-on-unraid-as-a-vm)
    But when I sync with Git It Write, all the posts are recreated and appended with a “-2” (e.g., tails-os-with-encrypted-persistence-on-unraid-as-a-vm-2)
    (Link to original version: https://whitematter.tech/2022/tails-os-with-encrypted-persistence-on-unraid-as-a-vm/)

    I cannot seem to grab a screenshot from WP at the moment, but I have moved all the newly imported -2s to Draft for now. That seems odd, as based on your description, everything should be good to go. I am wondering if something else is messed up in my markdown.

    Plugin Author vaakash

    (@vaakash)

    Hi @robertomano24,

    That is strange. I need to revisit the code.
    I’ll also pull your repository to my website and see what is happening. Please give me couple of days.

    Meantime can you please copy the logs and share it for analysis here – https://pastebin.com/ ?

    Thanks,
    Aakash

    Thread Starter robertomano24

    (@robertomano24)

    Awesome! Thank you!
    https://pastebin.com/AMx6NyTZ

    Plugin Author vaakash

    (@vaakash)

    Hi @robertomano24,

    I think I can guess what might be the issue.

    Since you are publishing posts to a “non-hierarchical” post type i.e (posts) your “source folder” should not have any folders under them.

    In your case .md files are put into 2021 and 2022 folders. So the plugin is trying to look for child posts under 2021 and 2022. For posts such child posts does not apply. This works well for pages.

    So I would suggest you to create separate “repo configurations” with “Folder to publish from” set to _posts/2021 and other for _posts/2022.

    I’ll try to handle this scenario better in the future version where this workaround is not necessary. For now I would suggest this config.

    Please let me know how it goes.

    Thanks,
    Aakash

    Thread Starter robertomano24

    (@robertomano24)

    @vaakash,

    It appears that solved the issue of the duplicates. Thanks so much for your help!

    Plugin Author vaakash

    (@vaakash)

    Hi @robertomano24,

    Thanks for confirming.

    Please feel free to add a review for the plugin -https://www.ads-software.com/support/plugin/git-it-write/reviews/#new-post

    If you think this plugin will be useful for others, please do share!

    Thanks,
    Aakash

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Initial Pull’ is closed to new replies.