diff --git a/content/en/hosting-and-deployment/hosting-on-github.md b/content/en/hosting-and-deployment/hosting-on-github.md index 6ce5acfbe..8df6bc87c 100644 --- a/content/en/hosting-and-deployment/hosting-on-github.md +++ b/content/en/hosting-and-deployment/hosting-on-github.md @@ -54,15 +54,15 @@ This is a much simpler setup as your Hugo files and generated content are publis 1. Create a `` (e.g. `blog`) repository on GitHub. This repository will contain Hugo's content and other source files. 2. Create a `.github.io` GitHub repository. This is the repository that will contain the fully rendered version of your Hugo website. 3. `git clone && cd ` -4. Make your website work locally (`hugo server` or `hugo server -t `) and open your browser to . +4. Paste your existing Hugo project into a new local `` repository. Make sure your website works locally (`hugo server` or `hugo server -t `) and open your browser to . 5. Once you are happy with the results: * Press Ctrl+C to kill the server - * `rm -rf public` to completely remove the `public` directory -6. `git submodule add -b master git@github.com:/.github.io.git public`. This creates a git [submodule][]. Now when you run the `hugo` command to build your site to `public`, the created `public` directory will have a different remote origin (i.e. hosted GitHub repository). You can automate some of these steps with the following script. + * Before proceeding run `rm -rf public` to completely remove the `public` directory +6. `git submodule add -b master git@github.com:/.github.io.git public`. This creates a git [submodule][]. Now when you run the `hugo` command to build your site to `public`, the created `public` directory will have a different remote origin (i.e. hosted GitHub repository). ### Put it Into a Script -You're almost done. You can also add a `deploy.sh` script to automate the preceding steps for you. You can also make it executable with `chmod +x deploy.sh`. +You're almost done. In order to automate next steps create a `deploy.sh` script. You can also make it executable with `chmod +x deploy.sh`. The following are the contents of the `deploy.sh` script: