Luoml's blog

如何给博客加上"Fork me on Github"

GitHub提供了两种形式的”Fork me on Github”(左上角\右上角),具体样式详见GitHub Ribbons官网

比如,在本博客中加入GitHub Ribbon,只需要拷贝以下代码到themes\{hexo-theme-next}\layout\_layout.swing</body>标签之前。

1
<a href="https://github.com/you"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>

拷贝时注意将https://github.com/you中的you改为本人的github名字。

最终效果可见博客首页右上角。
如果不是Hexo博客或非NexT主题样式,请自行查找更改相关主题文件。

Fork me on GitHub