Preview: https://blog.03k.org/friends.html
-
- Copy "layouts" to your hugo website path or theme path.
-
- Creat a xxx.md, set page layout to "links", If you want to add to index, set menu to main.
---
title: "Myfriends"
date: 2018-11-02
layout: "links"
menu: "main"
weight: 50
---
-
- Now you can add friend's links in the xxx.md by shortcode. The format looks like:
---
title: "Myfriends"
date: 2018-11-02
layout: "links"
menu: "main"
weight: 50
---
{{< friend name="Tony" url="http://tony.blog" logo="/tony.jpg" word="A funny guy" >}}
{{< friend name="Mike" url="http://Mike.blog" logo="/Mike.jpg" word="A poor guy" >}}
-
- In order to display other content of the theme, You need to find a template based on your theme, such as "single.html". Refer to the code of "single.html" to modify "links.html". For example, insert some code at the head or tail. Make "links.html" look consistent with the template format of "single.html".
操作可以参考:#2 (comment)
效果预览: https://blog.03k.org/friends.html
欢迎交换友链!