完成GitHub个人主页设计,只需要这三步
以下文章來源于技術傳播那些事兒 ,作者Lilian Lee
如果你用過或經常使用 GitHub,可能已經發現有些人的 GitHub 主頁長得有點兒不一樣。
默認情況下,GitHub 個人主頁默認從上到下依次展示 repositories、contributions、contribution activity。而有些人的主頁在最上方展示的是自定義的內容,例如個人簡介、貢獻統計、常用編程語言等。
我也對自己的 GitHub 個人主頁進行了一些自定義的內容設計,本文分享一下具體步驟,操作起來很簡單。
如果你也想讓自己的 GitHub 主頁稍微那么與眾不同一點點兒,不妨也試一試😎
假如你還沒有 GitHub 賬號,但想擁有 GitHub 個人主頁,那么需要先去注冊一個賬號,再熟悉一下 Markdown 基本語法,然后就可以按照以下步驟開始啦!
本文結構 & 具體步驟如下:
1 新建一個以個人 GitHub ID 命名的倉庫
打開 GitHub 個人主頁,例如我的主頁是:
https://github.com/lilin90
點擊 Repositories > New,進入新建倉庫頁面。
1)在 Repository name 處填寫自己的 GitHub ID(例如我的是 lilin90)。GitHub 還會提醒你這是一個 special 的倉庫🤓
2)按需填寫倉庫描述、勾選倉庫訪問權限、初始文件,我基本采用的默認選項。如果你想等自己編輯好內容再公開可見,也可以先選擇 Private。
3)點擊 Create repository,即完成倉庫創建。
2 編輯 README.md 文件,自定義內容
根據自己的需求、想法、創意,自由發揮,編輯 README.md 文件。
可以直接在網頁上編輯,也可以在本地編輯再 push 上去。我是直接在網頁上編輯的,也方便 Preview changes 隨時預覽顯示效果。
你會看到,初始的 README.md 里已經有了一些內容,給了一些可選的內容建議,你可以選擇采用或不采用。
1Here are some ideas to get you started:23- 🔭 I’m currently working on ...4- 🌱 I’m currently learning ...5- 👯 I’m looking to collaborate on ...6- 🤔 I’m looking for help with ...7- 💬 Ask me about ...8- 📫 How to reach me: ...9- 😄 Pronouns: ... 10- ? Fun fact: ...接下來,分享下我都加了些什么內容:
- 個人簡介
- GitHub 個人貢獻數據統計
- My side projects
- Get in touch
怎么加呢?
普通的文字描述與鏈接,使用簡單的 Markdown 語法即可。如果不了解 Markdown,搜一下,幾分鐘基本即可掌握其語法。
如果要插入 GitHub 個人貢獻數據統計、常用編程語言、Pin 住某個倉庫等,可參考 github-readme-stats 這個開源項目,有簡潔明了的使用說明:
https://github.com/anuraghazra/github-readme-stats
▲ 截圖自 github-readme-stats 項目
github-readme-stats 項目提供了很多主題,可根據個人喜好選擇:
https://github.com/anuraghazra/github-readme-stats/blob/master/themes/README.md
部分主題示例:
▲ 截圖自 github-readme-stats 項目
如果要插入各種社交平臺的聯系方式或者個人博客等,可借助 Shields.io,用于展示 quality metadata badges for open source projects,鏈接如下:
https://shields.io/
▲ 截圖自 shields.io
我在 Get in touch 部分插入的各種聯系方式都用了 shields.io 鏈接,這樣可以展示出 icon,好看一些,辨識度也高一些。
以下是我的 lilin90 倉庫 README.md 文件的源代碼,供參考:
1### Hi there 👋23🤓 I'm Lilian Lee 李琳, a Content Strategist | Senior Technical Writer.45I love photography 📷, traveling ??, cooking and enjoying delicious food 🥘 ([a Lv7 VIP at Dianping 大眾點評](https://m.dianping.com/userprofile/121632876)).67And I love fruit very much. 🍎 🍓 🥭 🥝89 10 11 12### My side projects 13 141. Collecting and sharing awesome resources about technical communication (tech comm): 15 16 [](https://github.com/lilin90/awesome-technical-communication) 17 18 > **Note:** Currently, this project includes tech comm resources in both English and Chinese. 19 202. Keep writing and publishing articles about tech comm (technical writing, stories, self-improvement, etc.) in Chinese: 21 22 - [知乎專欄:技術傳播那些事兒](https://www.zhihu.com/column/tc-fun) 23 - [微信公眾號:技術傳播那些事兒](https://res.cloudinary.com/lilian-photos/image/upload/v1585391408/cover/wechat-qrcode-scan-to-follow.jpg) 24 25 26### Get in touch 27 28[](https://lilianlee.me/) 29[](https://github.com/lilin90) 30[](https://www.linkedin.com/in/lilian-lee-54305777/) 31[](https://twitter.com/lilianlee90/) 32[](https://www.instagram.com/lilianlee.me/) 33[](https://pixabay.com/zh/users/lilian90-1322641/) 34 35[](https://www.zhihu.com/people/liliansd) 36[](https://res.cloudinary.com/lilian-photos/image/upload/v1585391408/cover/wechat-qrcode-scan-to-follow.jpg) 37▲ 可左右滑動
編輯完成,可點擊 Preview changes 預覽下顯示效果。不滿意可以繼續修改,直到滿意為止。
3 提交對 README.md 的修改,搞定
如果對預覽的顯示效果比較滿意了,接下來寫一個 commit message,點擊 Commit changes 提交即可。
提交成功后,就搞定啦。此時,再打開你的 GitHub 主頁,就會顯示你自定義的內容了🥳
我的 GitHub 主頁自定義的內容顯示效果如下:
是不是很簡單的操作?
感興趣的小伙伴可以行動起來了😉
文章看完,還不過癮?
更多精彩內容歡迎關注百度開發者中心公眾號
總結
以上是生活随笔為你收集整理的完成GitHub个人主页设计,只需要这三步的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 正式发布!中国首个LF Edge捐赠项目
- 下一篇: 容器安全最佳实践入门