黑白之海
当指针转向天台

Hugo | 添加github代码提交次数热力图

在?看看代码。

最简单的一种:

<!-- Alignment options!!!!! -->
<div align="center">
  <img width="600" height="300" src="https://ghchart.rshah.org/409ba5/Your_git_handle_here">
</div>

其中409ba5是热力图的色值。Your_git_handle_here是github账户名。

稍微复杂一点,添加了更多可选项的版本:

<!-- Include the library. -->
<script
  src="https://unpkg.com/github-calendar@latest/dist/github-calendar.min.js">
</script>

<!-- Optionally, include the theme (if you don't want to struggle to write the CSS) -->
<link
  rel="stylesheet"
  href="https://unpkg.com/github-calendar@latest/dist/github-calendar-responsive.css"
/>

<!-- Prepare a container for your calendar. -->
<div class="calendar">
    <!-- Loading stuff -->
    Loading the data just for you.
</div>

<script>
    // or enable responsive functionality:
    GitHubCalendar(".calendar", "Your_git_handle_here", { responsive: true },{ tooltips: true });

</script>

中文也搜出了用手加一个GitHub动态图类似结果。