Sign in

Sync to a sub-directory in a Github repo

  • This topic has 7 replies, 3 voices, and was last updated 1 year, 9 months ago by .
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #6792
    Avatar photowentin

    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 photoTomasz Dziuda


    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 🙂

    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    Avatar photowentin

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

    Avatar photowentin

    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 photowentin

    correction, the command should be

    git submodule update --remote


    Avatar photoonion
    This reply has been marked as private.
    Avatar photowentin

    @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 photoonion

    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.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.