1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-23 12:52:10 +00:00

Improvements to citations

- Put reply-context in a paragraph
- Allow an itemid for mention-work
This commit is contained in:
Rohan Kumar 2022-08-01 20:55:33 -07:00
parent 30e59289ce
commit c3ae952081
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
2 changed files with 4 additions and 2 deletions

View file

@ -11,6 +11,7 @@
{{- $replyAuthorRel = "publisher" -}}
{{- end -}}
<aside role="note">
<p>
Reply to <span class="h-cite in-reply-to" itemprop="about" itemscope="" itemtype="https://schema.org/{{ $schemaType }}">
<cite itemprop="name" class="p-name">
<a class="u-url" itemprop="url" href="{{ .replyURI }}">{{ .replyTitle | safeHTML}}</a>
@ -20,4 +21,5 @@
<span itemprop="name" class="p-name fn n">{{ .replyAuthor }}</span></a>
</span>
</span>
</p>
</aside>

View file

@ -4,12 +4,12 @@
{{- end -}}
{{- if .Get "p" -}}
<p
class="h-cite{{ with .Get "reply" }} in-reply-to{{ end }}" itemprop="{{ $itemprop }}"{{ with .Get "role" }} role="{{ . }}"{{ end }} itemscope="" itemtype="https://schema.org/{{ .Get "itemtype" }}">
class="h-cite{{ with .Get "reply" }} in-reply-to{{ end }}"{{ with .Get "itemid" }} itemid="{{ . }}"{{ end }} itemprop="{{ $itemprop }}"{{ with .Get "role" }} role="{{ . }}"{{ end }} itemscope="" itemtype="https://schema.org/{{ .Get "itemtype" }}">
{{- .Inner | markdownify | safeHTML -}}
</p>
{{- else -}}
<span
class="h-cite{{ with .Get "reply" }} in-reply-to{{ end }}" itemprop="{{ $itemprop }}"{{ with .Get "role" }} role="{{ . }}"{{ end }} itemscope="" itemtype="https://schema.org/{{ .Get "itemtype" }}">
class="h-cite{{ with .Get "reply" }} in-reply-to{{ end }}"{{ with .Get "itemid" }} itemid="{{ . }}"{{ end }} itemprop="{{ $itemprop }}"{{ with .Get "role" }} role="{{ . }}"{{ end }} itemscope="" itemtype="https://schema.org/{{ .Get "itemtype" }}">
{{- .Inner | markdownify | safeHTML -}}
</span>
{{- end -}}