前段時(shí)間 GitHub 出了一個(gè)功能,可以定制自己的 GitHub 首頁(yè)。比如我的首頁(yè) https://github.com/polaris1119 之前是這樣的:
定制后是這樣的:
看著(zhù)很“高端”吧。
現在就給大家講一下怎么做到的。
1、新建一個(gè)同名倉庫
新創(chuàng )建一個(gè)和 GitHub 賬號同名的 repository(倉庫),比如我的賬號是 polaris1119,所以創(chuàng )建這個(gè)倉庫:https://github.com/polaris1119/polaris1119。
官方提示:
polaris1119/polaris1119 is a special repository. Its README.md will appear on your public profile!
2、編輯該倉庫的 README.md 文件
在該文件最頂部增加如下內容(該文件默認有的內容可以不用管),相應部分需要修改為你的:
《img src=“https://github-readme-stats.vercel.app/api?username=polaris1119&show_icons=true” alt=“l(fā)ogo” height=“160” align=“right” style=“margin: 5px; margin-bottom: 20px;” /》 ### I‘m polarisxu- Peking university- [studygolang.com](https://studygolang.com) 站長(cháng)。 - [《Go語(yǔ)言編程之旅:一起用Go做項目》](https://u.jd.com/RMSbOS)合著(zhù)者。 - 開(kāi)源圖書(shū):[《Go語(yǔ)言標準庫》](https://github.com/polaris1119/The-Golang-Standard-Library-by-Example)。 - GCTT、golangweekly 等倉庫發(fā)起人。- 公眾號:polarisxu《img src=“https://github-profile-trophy.vercel.app/?username=polaris1119&theme=flat&column=7” alt=“l(fā)ogo” height=“160” align=“center” style=“margin: auto; margin-bottom: 20px;” /》
對這三部分內容進(jìn)行簡(jiǎn)單說(shuō)明:
頂部的 img 標簽,顯示為一張圖片,控制的是我主頁(yè)上面右邊的圖:polarisxu’s GitHub Stats;其中 username=polaris1119 改為你的 username 即可;
中間的文字,一般寫(xiě)上你的一些介紹,主要成就或項目等,隨意發(fā)揮;
底部的 img 標簽,顯示為一張圖片,控制的是我主頁(yè)下邊的“獎杯”圖片;其中 username=polaris1119 改為你的 username 即可;
保存,回到你的 GitHub 主頁(yè),有驚喜沒(méi)?!對比一下別人的,有沒(méi)有要更多貢獻開(kāi)源的沖動(dòng)?!
總結
沒(méi)有統計這個(gè)過(guò)程是不是 2 分鐘能搞定,但我覺(jué)得差不多吧。如果對上面兩張圖是怎么實(shí)現的感興趣,自己去摸索吧。歡迎大家留言秀出你的 GitHub 首頁(yè)地址(留言沒(méi)法發(fā)圖片,只能貼鏈接了)。
責編AJX
-
網(wǎng)站
+關(guān)注
關(guān)注
1文章
256瀏覽量
22870 -
源代碼
+關(guān)注
關(guān)注
95文章
2933瀏覽量
66215 -
GitHub
+關(guān)注
關(guān)注
3文章
458瀏覽量
16032
發(fā)布評論請先 登錄
相關(guān)推薦
評論