mirror of
https://github.com/Colin-XKL/Colinx-Blog.git
synced 2026-01-11 02:01:29 +08:00
feat: add ssg open services list
This commit is contained in:
@@ -6,4 +6,4 @@ framed = true
|
||||
|
||||
Welcome to my blog👋 Check these
|
||||
|
||||
[💻 技术文章](/categories/%E6%8A%80%E6%9C%AF/) | [📖 My Readings](https://reading.colinx.one) | [💡 My Github](https://github.com/Colin-XKL/)
|
||||
[💻 技术文章](/categories/%E6%8A%80%E6%9C%AF/) | [📖 My Readings](https://reading.colinx.one) | [💡 My Github](https://github.com/Colin-XKL/) | [💎 公开服务](/services/)
|
||||
|
||||
@@ -8,7 +8,7 @@ lastmod: 2021-05-10
|
||||
|
||||
## About Me
|
||||
|
||||
00 后,性别男,爱好女,CS 在读,准软件工程师,业余摄影师、音乐制作人,RSS 爱好者
|
||||
00 后,性别男,爱好女,CS专业,软件攻城狮一枚,业余摄影师、音乐制作人,RSS 爱好者
|
||||
|
||||
### I Like
|
||||
|
||||
|
||||
10
content/services.md
Normal file
10
content/services.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: 公开服务
|
||||
date: 2022-06-16
|
||||
|
||||
---
|
||||
|
||||
这里是一些开放的服务以及一些个人作品
|
||||
|
||||
|
||||
{{< service_list name="aaa" url="http://pro.colinx.oldnine.xyz:10055/items/OpenServices" >}}
|
||||
30
layouts/shortcodes/service_list.html
Normal file
30
layouts/shortcodes/service_list.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!--
|
||||
Params:
|
||||
name: css #id
|
||||
url: path or url of your data.json
|
||||
-->
|
||||
{{ with .Get "url" }}
|
||||
{{ $url := . }}
|
||||
{{ with $.Get "name" }}
|
||||
{{ $name := . }}
|
||||
{{ $data := getJSON $url }}
|
||||
{{ range $data.data }}
|
||||
{{ $item := . }}
|
||||
|
||||
<h3 id="{{$item.name}}">{{$item.name}}</h3>
|
||||
{{ $link := urls.Parse $item.link }}
|
||||
<p>{{$item.type}} - {{$item.subtitle}}</p>
|
||||
<p>地址:
|
||||
{{ if (gt (len $link.Host) 1) }}
|
||||
<a href="{{$item.link}}" >{{$link.Host}}</a>
|
||||
{{ else }}
|
||||
{{$item.link}}
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ if (gt (len $item.StartServingAt) 1) }}
|
||||
<p>上线于{{$item.StartServingAt}}</p>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user