Home  >  Article  >  Development Tools  >  Let’s talk about blogging on Github

Let’s talk about blogging on Github

PHPz
PHPzOriginal
2023-04-10 09:44:051808browse

With the development of modern technology and the Internet, blogs have become an important way for people to share their knowledge and exchange experiences. Moreover, many programmers will use Github, which is not only a place to host code, but also serves as a platform for blogging. Below, this article will take Github as an example to introduce how to blog on Github.

one. Register a Github account

First, we need to register a Github account, the address is https://github.com/. If you already have an account, you can skip this step.

two. Create a Repository for the blog

To write a blog, you first need to create a Repository for the blog. Click the " " sign in the upper right corner of the page and select "New repository" to create a new Repository.

In the pop-up interface, enter the name of the Repository, such as "myblog", and then check "Initialize this repository with a README", so that a README.md file will be created in the Repository.

three. Visit the blog page

Then, we need to click on “Settings” to enter the settings page and scroll down to the “GitHub Pages” section. Select "master branch" in "Source" and click the "Save" button. After this step, Github will generate the address of a blog page.

Four. Start blogging

Go back to the Repository page and click "Create new file" to create or edit a Markdown file directly in the browser.

Markdown is a simple and easy-to-learn markup language that can be used to write blogs, documents, etc. But if you are not familiar with Markdown, you can also visually edit Markdown text through online Markdown editors, such as Typora, Dillinger, etc.

Before writing a blog, you can first understand the commonly used syntax of Markdown, for example:

  • Big title

  • Subtitle

    • Italic statements
  • ** Bold statements
  • [Link text](Link address)

After writing, we submit this file in Github. When submitting, you can enter some instructions about this update in "Commit changes".

five. Access the blog page

After creating the new file, we can access the blog page in the Github Pages configuration.

six. Upload pictures and other resources

In the process of blogging, it is very likely that you need to upload pictures and other resources. At this time, we can upload the resource files to other platforms of our own (such as our own blog site), and then display them in the Github blog by referencing the corresponding resource address through Markdown. Of course, you can also upload resource files such as images directly to the Github repository, but this method may be more troublesome and take up more storage space.

Summary:

Through the description of this article, we can see that blogging on Github is not a particularly difficult thing. Github can not only be used for code hosting, but also as a platform for static blog generation and display. Not only is it simple and easy to operate, but it can also accept multiple languages ​​​​such as Markdown, so it is a good tool worth trying for programmers or people who like to write or record life details.

The above is the detailed content of Let’s talk about blogging on Github. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn