Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP, DO NOT MERGE] Adding native integrations to support IndieWeb #118

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
8 changes: 4 additions & 4 deletions layouts/_default/summary.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<article>
<article class="h-entry">
<header>
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<h2 class="p-name"><a class="u-url u-uid" href="{{ .Permalink }}">{{ .Title }}</a></h2>

{{ partial "post_meta.html" . }}

</header>

<p>
<p class="p-summary">
{{ .Summary }}
</p>

{{ if .Truncated }}
<footer>
<a href="{{ .RelPermalink }}">Read more<i class="fa fa-angle-double-right fa-fw"></i></a>
<a class="u-url" href="{{ .RelPermalink }}">Read more<i class="fa fa-angle-double-right fa-fw"></i></a>
</footer>
{{ end }}
</article>
10 changes: 10 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Raleway&display=swap" rel="stylesheet" type="text/css">

<!-- IndieAuth OpenID -->
<link rel="self" href="{{ site.BaseURL }}" />
<link rel="openid.delegate" href="{{ site.BaseURL }}" />
<link rel="openid.server" href="https://openid.indieauth.com/openid" />

<!-- IndieAuth PGPKey Method -->
{{ with .Site.Params.pgpkey }}
<link rel="pgpkey" href="{{ . }}">
{{ end }}

<!-- MathJax -->
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

Expand Down
13 changes: 11 additions & 2 deletions layouts/partials/post_meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,27 @@

<div>
<i class="fa fa-calendar fa-fw"></i>
<time>{{ with .Site.Params.dateFormat }}{{ $.Date.Format . }}{{ else }}{{ .Date.Format "02 Jan 2006, 15:04" }}{{ end }}</time>
<a class="u-url" href="{{ .Permalink }}"><time class="dt-published">{{ with .Site.Params.dateFormat }}{{ $.Date.Format . }}{{ else }}{{ .Date.Format "02 Jan 2006, 15:04 MST" }}{{ end }}</time></a>
</div>

{{ $baseUrl := .Site.BaseURL }}

<!-- IndieWeb Author Insertion -->
{{ with $.Param "author" }}
<div>
<i class="fa fa-address-card fa-fw"></i>
<a rel="author" class="p-author h-card" href="{{ with .Params.authorcard }}{{ . }}{{ else }}{{ $baseUrl }}/about/{{ end }}">{{ . }}</a>
</div>
{{ end }}


{{ if isset .Params "topics" }}
{{ $count := len .Params.topics }}
{{ if gt $count 0 }}
<div>
<i class="fa fa-folder fa-fw"></i>
{{ range $k, $v := .Params.topics }}
<a class="post-taxonomy-topic" href="{{ $baseUrl }}topics/{{ . | urlize }}">{{ . }}</a>{{ if lt $k (sub $count 1) }}&nbsp;&#47;{{ end }}
<a class="post-taxonomy-topic p-category" href="{{ $baseUrl }}topics/{{ . | urlize }}">{{ . }}</a>{{ if lt $k (sub $count 1) }}&nbsp;&#47;{{ end }}
{{ end }}
</div>
{{ end }}
Expand Down
9 changes: 6 additions & 3 deletions layouts/post/single.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{{ partial "header.html" . }}

<article class="h-entry">
<div class="header">
<h1>{{ .Title }}</h1>
<h2>{{ .Description }}</h2>
<h1 class="p-name">{{ .Title }}</h1>
<h2 class="p-summary">{{ .Description }}</h2>
</div>
<div class="content">

{{ partial "post_meta.html" . }}

<div class="e-content">
{{ .Content }}
</div>

{{ partial "share.html" . }}

Expand All @@ -21,5 +23,6 @@ <h2>{{ .Description }}</h2>
{{ partial "telegram.html" . }}

</div>
</article>

{{ partial "footer.html" . }}
14 changes: 14 additions & 0 deletions layouts/shortcodes/h-card.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div class="h-card">
<div class="pure-g">
<div class="pure-u-1-1">
<div style="padding: 0 .2em">
<img class="u-photo pure-img-responsive" src="{{ .Get "photo" }}">
</div>
</div>
</div>
My name is <span class="p-name">{{ .Get "name" }}</span>, or more formally <span class="p-honorific-prefix">{{ .Get "honorific" }}</span> <span class="p-given-name">{{ .Get "given-name" }}</span> <abbr class="p-additional-name">{{ .Get "middle-name" }}</abbr> <span class="p-family-name">{{ .Get "family-name" }}</span>.<br />
My nickname is <span class="p-nickname">{{ .Get "nickname" }}</span>.
This site you're on, entitled <a class="u-url u-uid" rel="me" href="{{ site.BaseURL }}">{{ site.Title }}</a>, is my personal website as part of the <a href="https://indieweb.org/">IndieWeb</a><br />

If you need to contact me, please encrypt your messages using <a class="u-key" href="{{ .Get "keyurl" }}">my public key</a>.
</div>