By Sheldon L | Published at 2019-02-01 | Updated at 2019-02-01 |
markdown
(.md
): such as Atom
, VS Code
, …Git
, configure your account the same as your Github, and interact with github, see https://sheldonldev.github.io/2019/01/01/00.html.Create a new repo named as YourAccountName.github.io
, with a README
in it.
Go to this repo setting, finde the botton Choose theme
, Select
a theme you like.
Back to repo, you’ll see a new file named _config.yml
. Open and add new configs:
title: Your Title
description: Your Description
Create a file index.html
. You can open https://YourAccountName.github.io
now.
Then, you or your collaborator can clone it to devices.
Create a new repo named as you like.
Go to the repo, you will see a pulldown of Branch: master
. Click it and input: gh-pages
, and click create new branch: gh-pages
when you finish your typing.
Find the tag n branch
(n may be 2) and click.
Set gh-pages
as default.
Go to this repo setting, finde the Github Pages
block, change the source option to gh-pages
.
Select a theme and config it as above.
Create a file index.md
. You can edit it. It will show as:
https://YourAccountName.github.io/ProjectName
gh-pages
use Jekyll
(but not full), you can search github pages documentation to get help.
A lazy way to run gh-pages:
settings
in your ghpages, choose a theme, then run git pull
.index.html
, and write a line at tht top in yml
language:---
layout: home
---
<!-- No other content here -->
_post/yyyy-mm-dd-Your_Title.md
. At the top of the blog, you should write in yml
language like this:---
layout: post
title: Your Title
author: Your Name
---
<!-- Here is your content writen in `markdown` -->
<!-- Search 'Markdown tutorial' in the google, if you don't know how to write markdown -->
Open browser, check https://YourAccountName.github.io/