|
1 | 1 | # Create Your Website {.sec-rstudio} |
2 | 2 |
|
3 | | -If you're less familiar with RStudio and Git, and you'd like to stay online, then using the online GitHub editor is the right choice for you! |
| 3 | +<br> |
| 4 | + |
| 5 | +To create a personal website with GitHub, you must already have a GitHub account. If you do not, [please make one](https://docs.github.com/en/get-started/start-your-journey/creating-an-account-on-github). |
| 6 | + |
| 7 | +These instructions largely follow the instructions from GitHub, found [here](https://pages.github.com/). |
| 8 | + |
| 9 | +1. In GitHub, create a new repository called username.github.io where username is replaced by your actual username. For example, if my username is pandabear, my repository is called pandabear.github.io |
| 10 | +2. On your desktop, create a folder. I called mine “Personal_Website” |
| 11 | +3. Clone your GitHub repository to your local folder. You can do this with your IDE of choice or through the command line. |
| 12 | + <ul> |
| 13 | + <li> To copy the full repository link from your GitHub repository, use the green clone button, and then the copy icon. Paste this where your IDE asks for it. </li> |
| 14 | + <li> Or if you are using your command line, you can change directory (using the cd command) into your "Personal_Website" folder and then type out "git clone \<paste your link here\>". </li> |
| 15 | + </ul> |
| 16 | +4. Now, create a new file inside of your repository called "index.html" |
| 17 | +5. Inside the file, copy and paste this text: <br> |
| 18 | + \<\!DOCTYPE html\> <br> |
| 19 | + \<html\> <br> |
| 20 | + \<body\> <br> |
| 21 | + \<h1\>Hello World\</h1\> <br> |
| 22 | + \<p\>I'm hosted with GitHub Pages.\</p\> <br> |
| 23 | + \</body\> <br> |
| 24 | + \</html\> <br> |
| 25 | +6. Save your file. |
| 26 | +7. Commit and push your changes to GitHub. |
| 27 | +8. Check in your GitHub repository to make sure that the commit is pushed. You should see index.html with the commit message that you gave it. |
| 28 | +9. Check your actual website by going to username.github.io. It should say (in very basic styling): <h1>Hello World</h1> |
| 29 | +<p>I'm hosted with GitHub Pages.</p> |
| 30 | +10. Now that our site is hosted correctly, we can actually build our site to look how we want it! |
| 31 | + |
| 32 | +<br> |
| 33 | + |
| 34 | +If you need more instructions about committing and pushing to GitHub, check out our [Git and GitHub Guide](https://iqss.github.io/git_guide/). |
0 commit comments