-
Create a new repository on GitHub with the name .github.io, where is your GitHub username.
-
Clone the repository to your local machine using Git.
-
Create a new file called index.md in the repository's root directory. This will serve as the homepage for your GitHub Pages site.
-
Add the necessary Jekyll front matter to the index.md file. At a minimum, it should include the following YAML code:
---
layout: default
---
This front matter specifies the layout file to be used for rendering the content.
- Create a new file called _layouts/default.html in the repository's root directory. This file will define the default layout for your site. Add the following code to it:
<!DOCTYPE html>
<html>
<head>
<title>{{ page.title }}</title>
</head>
<body>
{{ content }}
</body>
</html>
- Commit and push the changes to your GitHub repository.
After pushing the changes, GitHub Pages will automatically build your Jekyll site and make it available at .github.io. You can further customize your Jekyll site by adding additional Markdown files, layouts, stylesheets, and other assets as needed.