Add custom styles for external links and new OPML blogroll shortcode
- Added a style in custom-head.html to remove the default target="_blank" link indicator. - Created a new shortcode opmlblogroll.html to fetch and display a blogroll from a remote API.
This commit is contained in:
16
layouts/shortcodes/opmlblogroll.html
Normal file
16
layouts/shortcodes/opmlblogroll.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{{ $url := "https://appletune.fundor333.com/api//blogroolgroup/?format=json" }}
|
||||
|
||||
{{ with resources.GetRemote $url }}
|
||||
{{- $content := .Content | transform.Unmarshal -}}
|
||||
|
||||
{{- range $content -}}
|
||||
<h2>{{ .name }}</h2>
|
||||
<ul>
|
||||
{{- range .rows }}
|
||||
<li><a href='{{.url}}'>{{.name}}</a> (<a href='{{.feed_url}}'>feed</a>)</li>
|
||||
{{ end}}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user