前段時間 GitHub 出了一個功能,可以定制自己的 GitHub 首頁。比如我的首頁 https://github.com/polaris1119 之前是這樣的:
定制后是這樣的:
看著很“高端”吧。
現在就給大家講一下怎么做到的。
1、新建一個同名倉庫
新創建一個和 GitHub 賬號同名的 repository(倉庫),比如我的賬號是 polaris1119,所以創建這個倉庫: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=“logo” height=“160” align=“right” style=“margin: 5px; margin-bottom: 20px;” /》 ### I‘m polarisxu- Peking university- [studygolang.com](https://studygolang.com) 站長。 - [《Go語言編程之旅:一起用Go做項目》](https://u.jd.com/RMSbOS)合著者。 - 開源圖書:[《Go語言標準庫》](https://github.com/polaris1119/The-Golang-Standard-Library-by-Example)。 - GCTT、golangweekly 等倉庫發起人。- 公眾號:polarisxu《img src=“https://github-profile-trophy.vercel.app/?username=polaris1119&theme=flat&column=7” alt=“logo” height=“160” align=“center” style=“margin: auto; margin-bottom: 20px;” /》
對這三部分內容進行簡單說明:
頂部的 img 標簽,顯示為一張圖片,控制的是我主頁上面右邊的圖:polarisxu’s GitHub Stats;其中 username=polaris1119 改為你的 username 即可;
中間的文字,一般寫上你的一些介紹,主要成就或項目等,隨意發揮;
底部的 img 標簽,顯示為一張圖片,控制的是我主頁下邊的“獎杯”圖片;其中 username=polaris1119 改為你的 username 即可;
保存,回到你的 GitHub 主頁,有驚喜沒?!對比一下別人的,有沒有要更多貢獻開源的沖動?!
總結
沒有統計這個過程是不是 2 分鐘能搞定,但我覺得差不多吧。如果對上面兩張圖是怎么實現的感興趣,自己去摸索吧。歡迎大家留言秀出你的 GitHub 首頁地址(留言沒法發圖片,只能貼鏈接了)。
責編AJX
-
網站
+關注
關注
2文章
259瀏覽量
23238 -
源代碼
+關注
關注
96文章
2946瀏覽量
66955 -
GitHub
+關注
關注
3文章
473瀏覽量
16564
發布評論請先 登錄
相關推薦
評論