GitHub 个人资料技巧

Avatar of Chris Coyier
Chris Coyier

DigitalOcean 为您的旅程的每个阶段提供云产品。立即开始使用 $200 的免费信用额度!

Monica Powell 分享了一个非常酷的技巧 几天前

个人资料 README 是通过创建一个与您的用户名相同的名称的新存储库来创建的。例如,我的 GitHub 用户名为 m0nica,因此我创建了一个名为 m0nica 的新存储库。

现在,该存储库中的 README.md 本质上是她个人资料的主页。在通常的热门存储库列表上方,您可以在 她的个人资料 上看到该 README 的渲染版本

让我快速做一个超级简单的版本,以便自己尝试一下…

好吧,我从这里开始

Screenshot of the default profile page for Chris Coyier.

然后我将去 repo.new(嘿,CodePen 也有 一个这样的酷域名!)并在我的个人帐户上创建一个与我的用户名完全相同的存储库

Screenshot showing the create new repo screen on GitHub. The repository name is set to chriscoyier.

我选择用 README 文件初始化存储库,而没有其他文件。所以,我马上就得到了

Screenshot of the code section of the chriscoyier repo, which only contains a read me file that says hi there.

我可以直接在网上编辑它,如果我这样做,我会看到更多有用的东西

Screenshot of editing the read me file directly in GitHub.

幸运的是,我的个人网站有一个可以使用的 Markdown 简介!

Screenshot of Chris Coyier's personal website homepage. It has a dark background and a large picture of Chris wearing a red CodePen hat next to some text welcoming people to the site.

我会复制并粘贴它。

Screenshot showing the Markdown code from the personal website in the GitHub editor.

提交更改后,我的个人资料会显示出来!

Screenshot of the updated GitHub profile page, showing the welcome text from the personal website homepage.

也许有一天我会做一些更有趣的事情。 Monica 的帖子 中包含很多有趣的示例。我最喜欢的是 Kaya Thomas 的个人资料,我看到了 Jina Anne 分享

您不能在其中使用 CSS(因为 GitHub 会将其删除),所以我喜欢使用旧的 <img align="right"> 来实现浮动图像外观的创造力。