Ok, looks nice. Now we have to deploy.
We can deploy using github pages, netlify, ftp, #yolo. What we want, for now i will make an easy setup using gh-pages. Just for ease of use and i have the example there as it is. So install that.
npm install gh-pages
Dig into the npm script again. Add some more to build the css and javascript. Build the 11ty files and deploy this to github pages.
{
"scripts": {
"prod:eleventy": "ELEVENTY_ENV=production eleventy",
"prod:encore": "encore production",
"deploy": "npm-run-all prod:encore prod:eleventy gh-pages",
"gh-pages": "gh-pages -d dist"
}
}
Aaaaaaand done again. We developed a nice demo. Now we can just sit back and enjoy! Run the deploy command after we setup the repository to github.
npm run deploy
It builds all the scripts. Adds versioning to css/js files. Builds the files and deploys all the files to your local gh-pages branch on github for github pages.
Nice.