Step to create website

table of content

1. Clone the GitHub Repository

  • You used git clone to clone the mz-jhz.github.io repository from GitHub.
  • This operation created a local folder (possibly C:\Users\junha\github\mz-jhz.github.io).

2. Open the Project in Atom

  • You opened the mz-jhz.github.io folder in Atom and made modifications (e.g., editing _config.yml).
  • However, you noticed that the file directory in Atom did not match the one in the terminal.

3. Run the Jekyll Server

  • You ran the following command in the terminal:

    bundle exec jekyll serve
    
    • Jekyll successfully launched a local server and listened on http://127.0.0.1:4000.
    • However, when you accessed the webpage, you found that the changes did not take effect.

4. Identifying Discrepancies Between Atom and Local Files

  • You edited _config.yml in Atom but noticed that when running cat _config.yml in the terminal, the contents did not match what you had edited.
  • After checking the local mz-jhz.github.io folder, you found that:
    • Some files deleted in Atom still existed (e.g., the _posts directory).
    • This indicated that Atom might not be editing files in the correct directory, or multiple versions of the project exist.

5. Troubleshooting the Issue

  • You opened Windows File Explorer and found that the mz-jhz.github.io folder still existed locally.
  • You realized that Atom might have opened two different project folders, causing discrepancies between what you saw and what you were actually editing.
  • You attempted to run the following command to rebuild the site:
    rm -rf _site && bundle exec jekyll build && bundle exec jekyll serve
    
    • However, the issue persisted.

How Was the Local mz-jhz.github.io Folder Created?

Your local mz-jhz.github.io folder might have been created in the following ways:

  1. Generated by git clone:
    • When you cloned the repository from GitHub, Git created the mz-jhz.github.io folder and synced all remote repository files.
  2. Generated by Jekyll’s build process:
    • The _site/ directory is generated by Jekyll as the static website output. This is automatically created and should not be edited directly.
  3. Multiple instances of mz-jhz.github.io exist:
    • You may have cloned the same repository in different locations, leading to Atom and the terminal referencing different directories.