We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Sync to a sub-directory in a Github repo

  • #6792
    Avatar photo[anonymous]

    Is there a way to sync publii blog to a sub-directory in a Github repo?

    Say the git repo already has another website in the root folder, which I don’t want to override. I create a blog/ directory and set publii to sync with this “blog/” sub-directory only. is it possible?

    Avatar photo[anonymous]


    I think that the only solution can be using something like submodules in GIT: and put the blog into separate github repository which will be used as a submodule in your main repository.

    I did not test such solution – it is just an idea to check 🙂

    Avatar photo[anonymous]

    Thanks so much Tomasz! I am gonna test it today and report how it goes to help others! thanks for the suggestion!

    Avatar photo[anonymous]

    Confirmed that submodule works.

    After publishing the site to the submodule repo, I just need to run

    github update submodule

    from the main repo to update the blog.

    Avatar photo[anonymous]

    correction, the command should be

    git submodule update --remote
    Avatar photo[anonymous]
    This reply has been marked as private.
    Avatar photo[anonymous]

    @onion I followed the information on this page:


    • Main site repo, let’s call it main repo
    • Publish blog to its own Repo,name it “blog”
    • Add repo “blog” as sub-module to the main repo
    Avatar photo[anonymous]

    Thank you @wentin I tried but couldn’t get it live and running. Actually, I am familiar with Cloudflare but not with Git and its operations.

    I will try to work over the week and update my workings here.