Download
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.

publish publii site on subfolder

  • #6929
    Avatar photo[anonymous]

    I am trying with publii since morning and it really feels quite easy and solid (Tired of WordPress & Plugins mess).

    I am trying to set the publii site as mysite.com/blog using github pages + cloudflare pages. (I am suing cloudflare since couple of years and familiar with it.)

    I am able to set github private repo and connect it with cloudflare pages and Publii but can not figure out how I set things up to make it work.

    I wish main site on http://www.mysite.com and publii blog on http://www.mysite.com/blog

    Do anyone have such experience?

    #6942
    Avatar photo[anonymous]

    Update 1

    Here is what I exactly wanna accomplish

    The way I have structured the my domain , subdomain and blog on domain is as below:

    Main site : http://www.mysite.com which will host most pages (I am using publii with hidden posts as pages)

    Blog Site : http://www.mysite.com/blog (I wish to host publii blog directly on this)

    As on writing this post, I am able to configure Cloudflare Pages with Github Pages as middleware for main site (as described in this post : https://getpublii.com/docs/configure-cloudflare-pages-with-publii.html )

    The current / temporary solution I made :
    I have exported my main site and uploaded it on github repo.
    Each time I update publii blog, I have to export it as plain file to my pc and then manually upload it on the blog folder.

    Current problems:

    1. when we use native push to github pages from publii dashboard (for main site), it actually removes the whole “blog” folder from git repo.
    2. Can not define specific “folder” in the repo as root directory for publii blog site.

    The Possible solution :

    1. If we can somehow stop publii from removing specific folders (in my case its repo/blog) while pushing main site to github pages.
    2. If we can define specific folder in the repo for sites that hosted on subfolders.

    It would be interesting to do this workaround in the weekend!