Turn the Github project into a front-end site in one second

GitHub Pages can automatically create the website of the project through the GitHub Pages module set in the setting. A common pain point here is that the master often needs to sync to GH-Pages when it encounters changes, especially for pure Web front-end projects. Github officials may have sensed the pain point and created a master site as an option, which is very useful.

After you select Master Branch, the master automatically becomes a website. Master all referrals automatically updated to the site.

Share key code accurately

Say you have a line of code in a file that is really cool or key and you want to share it. For example, click on the following URL: github.com/AlloyTeam/A… You jump to line 240 of alloy_touch.js.

So the question is, right? What if I’m one piece of code, multiple lines of code that I want to share? For example, the motion easing and reverse easing functions of AlloyTouch are shown in the following code snippet: github.com/AlloyTeam/A…

Github will automatically generate the URL for you. For example, if you click on line 39, the URL becomes github.com/AlloyTeam/A… Shift click on line 45 and the URL becomes github.com/AlloyTeam/A… Your URL can then be copied and shared, and people who click on it will automatically jump to line 39, with lines 39-45 highlighted.

Automatically close issues by submitting MSG

For example, someone submits an issue github.com/AlloyTeam/A… Then you go to the trunk and change the code, and when you’re done, when you submit MSG, say:

fix  https://github.com/AlloyTeam/AlloyTouch/issues/6Copy the code

This issue will be closed automatically. It’s not just the fix keyword, of course. The following keywords also work:

  • close
  • closes
  • closed
  • fixes
  • fixed
  • resolve
  • resolves
  • resolved

Embed Github in HTML

Change the user and repo to whatever you want to display, as shown below

 <iframe src="//ghbtns.com/github-btn.html?user=alloyteam&repo=alloytouch&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe>Copy the code

After insertion you should see something like this:

Gitattributes sets the project language

As you can see above, Github automatically identifies whether your project is an HTML or Javascript project based on the amount of code associated with the file. This presents a problem, such as AlloyTouch being initially identified as an HTML project. There are more HTML examples than JS files. What to do? Gitattributes to help you figure it out. Add the following gitAttributes file to the project’s root directory: github.com/AlloyTeam/A… The inside of the:

*.html linguist-language=JavaScriptCopy the code

The main meaning is to identify all HTML file suffix code as JS files.

View access data for your project

Under your own item, click Graphs and then Traffic as shown below:

It contains Referring sites and Popular Content details and rankings. Such as: Referring sites

It contains Referring sites representing what website everyone came to your project from, and Popular content representing what files you often look at your project.

Here’s how to view the daily leaderboards for a particular language. For example, js daily leaderboards:

Github.com/trending/ja…

Github.com/trending/ht…

Github.com/trending/cs…

Github recommends: github.com/explore

other

  • Enter a colon in “issue” to add an expression
  • On any interface, Shift +? Display shortcut keys
  • “Issue” select text, R key quick reference

The last

Okay, that’s all I have, and it’s a technique I use a lot. Welcome to add practical tips ~~ I will continue to update… Our team’s Github: alloyteam.github. IO/has lots of cool, fun and useful projects. AlloyTeam recruit a large number of front-end, have a dream love learning you please send your resume to [email protected].