From 22b272d75ac83cd10f47597687ed592918884891 Mon Sep 17 00:00:00 2001 From: Shiying Date: Mon, 9 Sep 2024 12:41:03 +0100 Subject: [PATCH 1/4] Update index.md --- index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.md b/index.md index 6bdb01a..2e39a8e 100644 --- a/index.md +++ b/index.md @@ -1,4 +1,5 @@ --- -title: Welcome to my blog +title: My blog (temporary) --- + From 2ba32aa0cefb9e1581ba99322edd6cf153a3f320 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 9 Sep 2024 11:41:22 +0000 Subject: [PATCH 2/4] Update to 4 in STEP and README.md --- .github/steps/-step.txt | 2 +- README.md | 45 +++++++++++++++++++++++++++++++---------- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/.github/steps/-step.txt b/.github/steps/-step.txt index 00750ed..b8626c4 100644 --- a/.github/steps/-step.txt +++ b/.github/steps/-step.txt @@ -1 +1 @@ -3 +4 diff --git a/README.md b/README.md index b31859b..8cce40b 100644 --- a/README.md +++ b/README.md @@ -14,25 +14,48 @@ _Create a site or blog from your GitHub repositories with GitHub Pages._ -## Step 3: Customize your homepage +## Step 4: Create a blog post -_Nice work setting the theme! :sparkles:_ +_Your home page is looking great! :cowboy_hat_face:_ -You can customize your homepage by adding content to either an `index.md` file or the `README.md` file. GitHub Pages first looks for an `index.md` file. Your repository has an `index.md` file so we can update it to include your personalized content. +GitHub Pages uses Jekyll. In Jekyll, we can create a blog by using specially named files and frontmatter. The files must be named `_posts/YYYY-MM-DD-title.md`. You must also include `title` and `date` in your frontmatter. -### :keyboard: Activity: Create your homepage +**What is _frontmatter_?**: The syntax Jekyll files use is called YAML frontmatter. It goes at the top of your file and looks something like this: -1. Browse to the `index.md` file in the `my-pages` branch. -1. In the upper right corner, open the file editor. -1. Type the content you want on your homepage. You can use Markdown formatting on this page. -1. (optional) You can also modify `title:` or just ignore it for now. We'll discuss it in the next step. -1. Commit your changes to the `my-pages` branch. +```yml +--- +title: "Welcome to my blog" +date: 2019-01-20 +--- +``` + +For more information about configuring front matter, see the [Jekyll frontmatter documentation](https://jekyllrb.com/docs/frontmatter/). + +### :keyboard: Activity: Create a blog post + +1. Browse to the `my-pages` branch. +1. Click the `Add file` dropdown menu and then on `Create new file`. +1. Name the file `_posts/YYYY-MM-DD-title.md`. +1. Replace the `YYYY-MM-DD` with today's date, and change the `title` of your first blog post if you'd like. + > If you do edit the title, make sure there are hyphens between your words. + > If your blog post date doesn't follow the correct date convention, you'll receive an error and your site won't build. For more information, see "[Page build failed: Invalid post date](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/troubleshooting-jekyll-build-errors-for-github-pages-sites)". +1. Type the following content at the top of your blog post: + ```yaml + --- + title: "YOUR-TITLE" + date: YYYY-MM-DD + --- + ``` +1. Replace `YOUR-TITLE` with the title for your blog post. +1. Replace `YYYY-MM-DD` with today's date. +1. Type a quick draft of your blog post. Remember, you can always edit it later. +1. Commit your changes to your branch. 1. Wait about 20 seconds then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/en/actions) will automatically update to the next step.