[Grimace original] github builds a dynamic website and grimace builds a dynamic github
Directory
- Introduction
- Github registration and basic use
- Git basic usage
- Github site configuration
- Domain Name ing
- Background Service Construction
- Frontend page Construction
- Summary
I. Introduction
Github provides free repositories and supports building personal websites and domain name ing. There are also some free backend services on the Internet.
Today, I will use github + background services to build a free dynamic website.
Ii. github registration and basic usage (a lot of online searches, directly post an address)
Http://jingyan.baidu.com/article/f7ff0bfc7181492e27bb1360.html
III. Basic use of git (this is also the case and there are many tutorials)
Portal: Liao Xuefeng's official website-git tutorial
Iv. github personal site configuration
Automatic site generation
V. Domain Name ing
If you have your own domain name, you can map it to github.
1) create a CNAME file in the github repository and directly write the domain name to be bound.
2) Go to your DNS service provider and create a CNAME to resolve it to your github page Personal Homepage Address.
Wait for the change to take effect. Generally, you can use your custom domain name for access in a few minutes.
Vi. Background Service Construction
There are some free backend service providers on the Internet. I use bmob here and need to register it.
Here, we only implement the function of recording the total number of site visits.;
The next step is to call the two methods through JSONP.
1 <script type = "text/javascript"> 2/* 3 1cf19cbebb0bdf1a in the url is the Secret Key 4 getTotalPV in the application Key, which is the method name set in the cloud code, note the case sensitivity: 5 */6 $. ajax ({7 url: "http://cloud.bmob.cn/1cf19cbebb0bdf1a/getTotalPV", 8 dataType: 'jsonp', 9 data: '', 10 jsonp: 'callback', 11 success: function (result) {12 alert (result. results [0]. totalPV); 13} 14}); 15 16 </script>
(To be continued ...)