An easy way to publish a webpage
I was thinking about the easiest way to publish a website, one way that came to my mind was to just upload a zip file with all the html, js, css and images needed for the website.
One of the easiest ways that I have seen to update a website is to just pack a couple of html, js, css and images files into a file and upload the file, only two steps are involved:
- Upload the zip file
- Create a route and link it to the zip file
That is why I included this functionality in a couple projects that I am working on, here is an example of this functionality using the UI.
The first step is to upload the zip file, here is an screenshot of the UI to upload a file: (you can also create a script using the API)
Once you have the files uploaded all you need to do is to create a "Route pack" and link the zip file
route packs list
That's it! now the site will be live on the target route for the zip file, in this case https://www.vicjicama.com/photos
Here is the live website
You can setup multiple zip sites on multiple routes, this is a very convenient way to manage multiple parts or your site on multiple repositories or zip files.
I reused this feature to deploy a React SPA the same way, check the related blog post for more details.
You can find to website files for this example on this repository, or you can also download the files directly from the site here.
You can create pages using this zipped route method, or you can create a single web page using html+form+values, take a look to this post for more details