A charming Jekyll theme.
jekyll-theme
1<article class="post h-entry">
2 <header class="post-header">
3 <a class="post-permalink u-url" href="{{- include.post.url | absolute_url -}}" rel="bookmark">
4 <time class="post-date dt-published" datetime="{{ include.post.date | date_to_xmlschema }}">
5 {{- include.post.date | date: site.date_formats.day -}}
6 </time>
7 </a>
8
9 {%- if include.post.title and include.post.title != "" -%}
10 <h2 class="post-title p-name">
11 <a href="{{- include.post.url | relative_url -}}">
12 {{- include.post.title -}}
13 </a>
14 </h2>
15 {%- assign post_title = include.post.title -%}
16 {%- elsif include.post.source -%}
17 {%- assign link_metadata = include.post.source | metadata -%}
18
19 <h2 class="post-title p-name">
20 {%- if link_metadata.title -%}
21 <cite class="post-title u-in-reply-to h-cite">
22 <a class="post-source-title u-url" href="{{- include.post.source -}}">
23 {{- link_metadata['og:title'] | default: link_metadata.title | prepend: "↪ " -}}
24 </a>
25 </cite>
26 {%- else -%}
27 <cite class="post-source-title u-in-reply-to h-cite">
28 <a class="post-source u-url p-name" href="{{- include.post.source -}}">
29 {{- include.post.source | remove: "https://" | remove: "http://" | prepend: "↪ " -}}
30 </a>
31 </cite>
32 {%- endif -%}
33 </h2>
34 {%- endif -%}
35
36 {%- if include.post.categories -%}
37 {% for category in include.post.categories %}
38 {%- assign category_slug = category | slugify: site.slug_mode -%}
39 {%- assign category_url = site.jekyll-archives.permalinks.category | replace: ":name", category_slug -%}
40
41 <a
42 class="post-category category {{ category_slug | prepend: "_" }} p-category"
43 href="{{ category_url | relative_url }}"
44 rel="tag"
45 >
46 {{- category -}}
47 </a>
48 {% endfor %}
49 {%- endif -%}
50 </header>
51
52 {%- if include.is_archive -%}
53 {%- if include.post.title == "" and include.post.source == nil -%}
54 <div class="post-content p-summary">
55 {{ include.post.excerpt }}
56 </div>
57 {%- endif -%}
58 {%- else -%}
59 <div class="post-content e-content">
60 {{ include.post.content }}
61 </div>
62 {%- endif -%}
63
64 {%- if include.post.author or site.author -%}
65 <footer class="post-footer" {%- if include.is_archive or site.author or site.data.authors.size == 1 -%}hidden{%- endif -%}>
66 {%- assign author = include.post.author -%}
67
68 {%- if site.author -%}
69 {% assign author = site.author %}
70 {%- elsif site.data.authors -%}
71 {%- assign author = site.data.authors[include.post.author] -%}
72 {%- endif -%}
73
74 <p class="post-author p-author h-card">
75 <span class="post-byline">
76 {{ site.translations.byline }}
77 </span>
78 {% if author.uri -%}
79 <a class="p-name u-url" href="{{- author.uri -}}">
80 {{ author.name }}
81 </a>
82 {%- else -%}
83 <span class="p-name">
84 {{- author -}}
85 </span>
86 {%- endif -%}
87 </p>
88 </footer>
89 {%- endif -%}
90</article>