Turn the GitHub project into a front-end site in a second
GitHub pages as you may all know, the common practice is to build a gh-pages branch through the GitHub pages module in setting to automatically create the project's website.
The pain point that is often encountered here is that master encounters changes, often need to go to sync to gh-pages, especially the pure web front-end project, this pain point is very painful.
GitHub officials may smell the pain point, out of a master as the site is an option, too useful.
When you finish selecting Master Branch, Master automatically becomes the website. All submissions from Master are automatically updated to the site.
Share key codes with precision
For example, you have a file where a line of code is very cool or key, want to share.
You can add the following URL
#L行号
For example, click on the following URL:
https://github.com/AlloyTeam/AlloyTouch/blob/master/alloy_touch.js#L240
You will jump to the No. 240 line of alloy_touch.js.
So that's the problem? What if I'm a piece of code that multiple lines of code want to share? It's also simple: After the URL, add
#L开始行号-L End Line number
For example, Alloytouch's motion easing and inverse easing functions are shown in the following code snippet:
Https://github.com/AlloyTeam/AlloyTouch/blob/master/alloy_touch.js#L39-L45
In fact, you do not have to remember that you directly behind the URL, GitHub will automatically help you generate the URL. For example, if you click on line 39, the URL becomes
https://github.com/AlloyTeam/AlloyTouch/blob/master/alloy_touch.js#L39
Then hold down SHIFT and click 45 lines, and the URL becomes
Https://github.com/AlloyTeam/AlloyTouch/blob/master/alloy_touch.js#L39-L45
Then you can copy and share the URL, click the URL of the person will automatically jump to 39 lines, and 39-45 lines highlighted.
Automatic shutdown of issues by committed MSG
Like someone submitted a issues HTTPS://GITHUB.COM/ALLOYTEAM/ALLOYTOUCH/ISSUES/6.
Then you go to the trunk to change the code, after the completion of the submission of MSG, fill in:
fix https://github.com/AlloyTeam/AlloyTouch/issues/6
This issues will be automatically closed. Of course not just fix this keyword. The following keywords are also available:
- Close
- Closes
- Closed
- Fixes
- Fixed
- Resolve
- Resolves
- Resolved
Embed GitHub in HTML
As shown below, the user and repo are changed to what you want to show.
<iframe src = "//ghbtns.com/github-btn.html?user=alloyteam& Repo=alloytouch&type=watch&count=true "Allowtransparency=" true "Frameborder=" 0 "Scrolling= "0" Width=" Height= "> </IFRAME>
After inserting, you can see a display like this:
Gitattributes Setting the project language
As shown, GitHub automatically identifies you as an HTML or JavaScript project based on the number of related file codes.
This poses a problem, for example, that Alloytouch was initially identified as an HTML project.
Because the HTML example is more than the JS file. What do we do? Gitattributes to help you get it done. In the root directory of the project, add the following. gitattributes file to
Https://github.com/AlloyTeam/AlloyTouch/blob/master/.gitattributes
Inside of:
*.html linguist-language=JavaScript
The main meaning is to identify all the HTML file suffix code as a JS file.
View Access data for your project
Under your own project, click Graphs, and then click Traffic as follows:
There are detailed data and rankings for referring sites and popular content. such as: referring sites
where referring sites on behalf of everyone from what website came to your project, Popular content on behalf of everyone often look at your project which documents.
Trending leaderboard
The above teaches you to set the language, below you can see how to view the daily leaderboard of a certain type of language. such as the JS daily leaderboard:
Https://github.com/trending/javascript?since=daily
Https://github.com/trending/html?since=daily
Https://github.com/trending/css?since=daily
Other
- Enter Colon in issue: add expression
- Any interface, SHIFT +? Show shortcut keys
- Issue selected text, R key Quick reference
You have to collect the GitHub tips