github pages

2022-10-23,

http://zyip.github.io/facemaker/index

echo "hello world" >>hello.htm

git init

git add hello.htm

git commit -m "add hello.htm"

git remote add origin https://github.com/zyip/facemaker.git

git push -u origin master

git push origin gh-pages

$ cd your_repo_root/repo_name

$ git fetch origin

$ git checkout gh-pages

Welcome to GitHub Pages.

This automatic page generator is the easiest way to create beautiful pages for all of your projects. Author your page content here using GitHub Flavored Markdown, select a template crafted by a designer, and publish. After your page is generated, you can check out the new branch:

$ cd your_repo_root/repo_name
$ git fetch origin
$ git checkout gh-pages

If you're using the GitHub for Mac, simply sync your repository and you'll see the new branch.

Designer Templates

We've crafted some handsome templates for you to use. Go ahead and continue to layouts to browse through them. You can easily go back to edit your page before publishing. After publishing your page, you can revisit the page generator and switch to another theme. Your Page content will be preserved if it remained markdown format.

Rather Drive Stick?

If you prefer to not use the automatic generator, push a branch named gh-pages to your repository to create a page manually. In addition to supporting regular HTML content, GitHub Pages support Jekyll, a simple, blog aware static site generator written by our own Tom Preston-Werner. Jekyll makes it easy to create site-wide headers and footers without having to copy them across every page. It also offers intelligent blog support and other advanced templating features.

Authors and Contributors

You can @mention a GitHub username to generate a link to their profile. The resulting<a> element will link to the contributor's GitHub Profile. For example: In 2007, Chris Wanstrath (@defunkt), PJ Hyett (@pjhyett), and Tom Preston-Werner (@mojombo) founded GitHub.

Support or Contact

Having trouble with Pages? Check out the documentation at https://help.github.com/pagesor contact support@github.com and we’ll help you sort it out.

----------

Configuring an A record with your DNS provider

With your DNS provider, create A records that resolve to the following IP addresses:

192.30.252.153
192.30.252.154

To confirm that your A records have been set correctly, use the dig command:

dig example.com +nostats +nocomments +nocmd
;example.com
example.com. 73 IN A 192.30.252.153
example.com. 73 IN A 192.30.252.154

----------

Adding a CNAME file to your repository

If you're using a custom domain to redirect your GitHub Pages site, you must create and commit aCNAME file to your GitHub Pages repository that contains the custom domain.

    On GitHub, navigate to your Pages repository.
    In the "Branches" menu, switch to your repository's Pages branch:
    For User and Organization Pages sites, the Pages branch is master.
    For Project Pages sites, the Pages branch is gh-pages.
    Add a new file, named CNAME (with all caps!), to the root directory of the Pages branch.
    In the new file, add a single line that specifies the bare subdomain for your custom domain. For example, use blog.example.comnot https://blog.example.com. Note that there can only be one domain in the CNAME file.
    Type a commit message, or accept the default message.
    Under the commit message box, click Confirm merge.

----------

references:

http://www.sitepoint.com/free-static-sites-middleman-github/?utm_medium=email&utm_campaign=SitePoint+Ruby+20150303&utm_content=SitePoint+Ruby+20150303+CID_993d17cebd4c92b96aff5021f2b65763&utm_source=CampaignMonitor&utm_term=Static%20Sites%20with%20Middleman

github pages的相关教程结束。

《github pages.doc》

下载本文的Word格式文档,以方便收藏与打印。