This is a very beginning article about Netlify hosting services. In this post, I would like to show you how it's quick and easy to publish your static website on Netlify.
As an example, I'm going to use a website generated by Jekyll, but you can use any generator. At least, it's just plain HTML and asset files.
I assume that you already have a Netlify account. If you don't, then register one right now. The process is pretty much straightforward, and you shouldn't get any issues. When you get your account ready, follow the instruction to publish your website.
In your Jekyll-project root directory, run the terminal command
JEKYLL_ENV=production jekyll build. The command will generate website files to the _site folder. Make sure the folder doesn't exist before running the command;
- Open Netlify dashboard and find a box with the message Want to deploy a new site without connecting to Git? Drag and drop your site folder here;
- Drag and drop the _site folder to the box and wait for it to get deployed;
- You'll be redirected to the website dashboard after it's published successfully, where you can find a .netlify.com subdomain to access your website.
Drag-and-drop publishing works well if you don’t need to update your website too often. Otherway, it would be more appropriate to automate the deployment process connecting the website to the GitHub repository.