javascriptnode.jsnunjuckseleventy

11ty - deploy /public folder on github pages?


i'm a junior front end developer.. I have recently created a blog site using 11ty, Nunjucks, and Netlify CMS. I am now trying to deploy this site on GitHub Pages, but I am facing challenges as the index file for my site is located in the /public folder. This is different from the default configuration for GitHub Pages deployment which typically deploys the site from the root folder of the repository. I have tried searching online for a solution to this issue, but most of the information I have found seems to be outdated.

Is there a way to modify the configuration of GitHub Pages to deploy my site from the /public folder? could you please provide detailed instructions on how to accomplish this? I would greatly appreciate any guidance. thank you all in advance


Solution

  • "scripts": {
        "build": "eleventy"
    },
    

    Some other help: https://www.linkedin.com/pulse/eleventy-github-pages-lea-tortay/ https://www.rockyourcode.com/how-to-deploy-eleventy-to-github-pages-with-github-actions/

    A bit easier to deploy on Netlify, even because you mentioned NetlifyCMS, so i recommned using Netlify instead of GHpages.

    I hope it helps.