Skip to content

Latest commit

 

History

History
109 lines (97 loc) · 3.16 KB

tutorial_info.md

File metadata and controls

109 lines (97 loc) · 3.16 KB

commands used

Create 2 github repositories

  1. misscodingnz-blog

    • will hold the blog configuration and blog files
    • basic settings
      • Public or Private
      • didnt use readme
  2. misscodingnz-blog.github.io

    • will be for github pages, will hold all the static content
    • need to set up github.io pages
      1. click on repository settings
      2. click on pages on the left menu
      3. select source under build and deployment
        • either select:
          • github actions (Beta)
          • Deploy from a branch
          • (I used Deploy from a branch)
      4. select the branch and folder to use to use
        • I used:
          • main branch
          • root folder
      5. add custom domain if needed,(I did not use domain in this example)
      6. select whether or not you want https enforced
      7. MAKE SURE SETTINGS ARE SAVED AS YOU GO
      8. After few minutes you will see a link where the site will be live
  3. Create new site

    hugo new site misscodingnz-blog
  4. Initiliaze a git repository

    git init
  5. Add files to staging

    git add .
  6. Commit the staged files to the repository

    • committed initial files
    git commit -m "new hugo site, with tutorial commands"
  7. Make sure you are on Main branch, add remote origin and push repository to github

    • make sure you are on the main branch
      git branch -M main
    • add remote origin
      git remote add origin https://github.com/dirwebdev/misscodingnz-blog.git
    • push repository to github
      git push -U origin main
  8. Create .git ignore

    • site used to create .gitignore
    • add node_modules to .gitignore
      • in this tutorial node_modules/* to this section...
      # Icon must end with two \r
      Icon
      node_modules/*
    • add .gitignore to repository
      • (make sure you are in site root directory in terminal)
      touch .gitignore
      • copy and paste generated .gitignore text into new .gitignore file and save.
    • commit new .gitignore to repository.
      git add .
      git commit -m "added .gitignore updated tutorial_info"
  9. Add hugo theme: