- Fork the following repo: https://github.com/chrisrhymes/example-blog/fork
- Name your repo “your-username.github.io” where your-username is your GitHub username
- From the forked repo, click the “Code” dropdown.
- Select the “Codespaces” tab
- Click “Create codespace on main”.
- Open the terminal using the top left menu.
- View
- Terminal
- In the terminal in the bottom right of the window, enter
rvm install ruby-3.0.5
then press enter to install ruby. - Next, enter
rvm use 3.0.5
and press enter to use the ruby version. - Enter
bundle install
and then press enter to run it. - Then enter
bundle exec jekyll serve
and press enter. - Click the “Open in browser” button in the pop-up that appears
- View your new site.
- Click into the terminal window and press
ctrl + c
to stop serving your site.
- Edit the
_config.yml
file - Update the title and description for your site. The title appears in the top left of the site as the home link. The description is used as a meta tag to describe your site to search engines.
- In the terminal window, enter
bundle exec jekyll serve
and press enter. - Click the “Open in browser” button in the pop-up that appears
- Open the
_authors
directory, right click on theexample.md
file and select "Copy" from the menu; right click on the_authors
directory and select "Paste" to drop a copy of the file into that directory (it will be calledexample copy.md
). - Right click
example copy.md
and select "Rename" from the menu; call ityour-name.md
, where your-name is your name, (e.g. chris.md). - Edit the your-name.md file and change the information in the title, name, position, description, website lines, and social media links (comment out any social links you don’t want to show by typing
#
and a space before the ones you don't want to display; they will turn grey to show they are commented out). - Remove the content after the last
---
and type a bio about yourself. The content uses markdown for formatting. - Choose an image for your avatar or create an avatar with https://getavataaars.com/ ensuring that the filename is all lowercase and has no special characters or spaces.
- Drag and drop the image into the
img
folder. - Update the avatar setting to point to your new image.
- Save your changes.
- Edit the post called '2023-05-03-welcome-to-jekyll.markdown' in the
_posts
folder so the author is the same as the name setting inyour-name.md
. - Visit the browser window with the website running and click on the Authors link in the top right of the page. It should now show your author in the list. Click through to see your author page.
- Like you did before, copy the '2023-05-03-welcome-to-jekyll.markdown' file in the
_posts
folder and paste it back into the same folder; it should appear as '2023-05-03-welcome-to-jekyll copy.markdown'; rename this file following the formatYYYY-MM-DD-post-name.md
. - Update the title, date, and categories. Ensure the author is your author name.
- Delete everything under the last
---
and write your blog post using markdown. - Save the changes.
- Visit the browser window with the website running and click on the title in the top left to go back to the home page. Your new post should now be visible. Click to view it.
- Click the Source control button on the left menu bar.
- Enter a commit message.
- Press the
+
symbol on the right of the Changes heading. - Press the drop down next to the
Commit
button and selectCommit and push
.
- In GitHub, navigate to the repository.
- Click the
Settings
tab. - Click on the
Pages
option underCode and automation
. - Select
Deploy from a branch
. - Then select the
main
branch and the/ root
directory, then press Save. - Your site will then build and will soon be available on
https://your-username.github.io
where your-username is your github username.