mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 05:36:07 +01:00
Swap type of bookmark out, when needed
This commit is contained in:
parent
9da18584ff
commit
4c0e0be6bc
2 changed files with 9 additions and 2 deletions
|
@ -7,7 +7,7 @@ bookmarkOf: https://www.youtube.com/watch?v=0Fok5AQ2WRo
|
|||
references:
|
||||
https://wwwYoutubeCom/watch?v=0Fok5Aq2wRo:
|
||||
url: https://www.youtube.com/watch?v=0Fok5AQ2WRo
|
||||
type: cite
|
||||
type: video
|
||||
name: Why E̱NGLISH shoul̆d start ūsing accėnt màrks
|
||||
summary: "English generally only uses accent marks for words borrowed from other languages. However, using them more widely could solve many of the spelling and pronunciation problems with our language. In this video, I recommend six accents - or diacritical marks - that we should adopt."
|
||||
featured: https://i.ytimg.com/vi/0Fok5AQ2WRo/maxresdefault.jpg
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
{{- if not .Params.bookmarkOf -}}
|
||||
{{ errorf "BookmarkOf partial called when no bookmark of param set" -}}
|
||||
{{- end -}}
|
||||
{{- define "partials/article-type.html" -}}
|
||||
{{- if collections.In (slice "cite" "entry") . -}}
|
||||
{{- "article" -}}
|
||||
{{- else -}}
|
||||
{{- . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $page := . -}}
|
||||
{{- $url := .Params.bookmarkOf -}}
|
||||
|
@ -12,7 +19,7 @@
|
|||
{{- end -}}
|
||||
💭 Thoughts on{{" "}}
|
||||
{{- with $reference.name -}}
|
||||
the article {{ partial "rich-link.html" (dict "Class" "u-bookmark-of" "Destination" $url "Text" . "Page" $page) }}.
|
||||
the {{ partial "partials/article-type.html" (default "article" $reference.type) }} {{ partial "rich-link.html" (dict "Class" "u-bookmark-of" "Destination" $url "Text" . "Page" $page) }}.
|
||||
{{- else -}}
|
||||
{{ partial "rich-link.html" (dict "Class" "u-bookmark-of" "Destination" $url "Text" (printf "an article from %s" (($url | urls.Parse).Hostname)) "Page" $page) }}
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in a new issue