Code Monkey home page Code Monkey logo

skills-github-pages's Introduction

GitHub Pages

Create a site or blog from your GitHub repositories with GitHub Pages.

Step 4: Create a blog post

Your home page is looking great! 🤠

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.

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:

---
title: "Welcome to my blog"
date: 2019-01-20
---

For more information about configuring front matter, see the Jekyll frontmatter documentation.

⌨️ Activity: Create a blog post

  1. Browse to the my-pages branch.
  2. Click the Add file dropdown menu and then on Create new file.
  3. Name the file _posts/YYYY-MM-DD-title.md.
  4. 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".

  5. Type the following content at the top of your blog post:
    ---
    title: "YOUR-TITLE"
    date: YYYY-MM-DD
    ---
  6. Replace YOUR-TITLE with the title for your blog post.
  7. Replace YYYY-MM-DD with today's date.
  8. Type a quick draft of your blog post. Remember, you can always edit it later.
  9. Commit your changes to your branch.
  10. Wait about 20 seconds then refresh this page (the one you're following instructions from). GitHub Actions will automatically update to the next step.

Get help: Post in our discussion boardReview the GitHub status page

© 2023 GitHub • Code of ConductMIT License

skills-github-pages's People

Contributors

dazaoshuxiadewo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.