A charming Jekyll theme. linus.arthr.dev/
jekyll-theme
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(layout): most markup structure

+274 -3
+11
_includes/blog/categories.html
··· 1 + {%- if site.categories -%} 2 + <nav class="blog-categories"> 3 + {%- for category in site.categories %} 4 + {% assign category_slug = category | first | slugify: site.slug_mode %} 5 + {%- assign category_url = site.jekyll-archives.permalinks.category | replace: ":name", category_slug -%} 6 + <a class="blog-category category {{ category_slug | prepend: '_' -}}" href="{{- category_url -}}"> 7 + {{- category | first -}} 8 + </a> 9 + {% endfor -%} 10 + </nav> 11 + {%- endif -%}
+89
_includes/blog/post.html
··· 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 + {%- unless include.post.title == "" -%} 54 + <div class="post-content p-summary"> 55 + {{ include.post.excerpt }} 56 + </div> 57 + {%- endunless -%} 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 + {%- if author.uri -%} 75 + <p class="post-author p-author h-card"> 76 + <a class="p-name u-url" href="{{- author.uri -}}"> 77 + {{ author.name }} 78 + </a> 79 + </p> 80 + {%- else -%} 81 + <p class="post-author p-author h-card"> 82 + <span class="p-name"> 83 + {{- author -}} 84 + </span> 85 + </p> 86 + {%- endif -%} 87 + </footer> 88 + {%- endif -%} 89 + </article>
+1 -2
_includes/header.html
··· 1 1 {%- assign is_personal_website = false -%} 2 2 3 - {%- if site.author or site.authors == 1 -%} 3 + {%- if site.author or site.data.authors == 1 -%} 4 4 {%- assign is_personal_website = true -%} 5 5 {%- endif -%} 6 6 ··· 11 11 class="site-logo u-photo" 12 12 src="{{ site.logo }}" 13 13 alt="" 14 - role="presentation" 15 14 /> 16 15 {% endif %} 17 16
+63
_layouts/blog.html
··· 1 + --- 2 + layout: default 3 + --- 4 + 5 + {%- capture archive_title -%} 6 + {%- if page.type or page.date -%} 7 + <h1 class="archive-title p-name"> 8 + {%- if page.date -%} 9 + {%- assign archive_date = page.date | date: site.date_formats[page.type] -%} 10 + 11 + {{- site.translations.archive_date_title | replace: "%date", archive_date -}} 12 + {%- else -%} 13 + {%- if page.type == "tag" -%} 14 + {{- site.translations.archive_tag_title | replace: "%tag", page.title -}} 15 + {%- else -%} 16 + {{- site.translations.archive_category_title | replace: "%category", page.title -}} 17 + {%- endif -%} 18 + {%- endif -%} 19 + </h1> 20 + {%- endif -%} 21 + {%- endcapture -%} 22 + 23 + {%- assign blog_posts = site.posts -%} 24 + 25 + {%- if paginator.posts -%} 26 + {%- assign blog_posts = paginator.posts -%} 27 + {%- elsif page.posts -%} 28 + {%- assign blog_posts = page.posts -%} 29 + {%- endif -%} 30 + 31 + <div class="blog-list h-feed"> 32 + {%- include blog/categories.html -%} 33 + 34 + {{- archive_title }} 35 + 36 + {% for post in blog_posts -%} 37 + {%- assign is_archive = false -%} 38 + {%- if page.type or page.date -%} 39 + {%- assign is_archive = true -%} 40 + {%- endif -%} 41 + 42 + {%- include blog/post.html post=post is_archive=is_archive -%} 43 + {%- endfor -%} 44 + 45 + {% if paginator.previous_page or paginator.next_page -%} 46 + <nav class="blog-pagination" aria-label="{{- site.translations.blog_pagination_title -}}"> 47 + 48 + <div class="pagination-links"> 49 + {% if paginator.previous_page -%} 50 + <a class="prev-page menu-item" href="{{ paginator.previous_page_path | relative_url }}" rel="prev"> 51 + {{- site.translations.blog_pagination_prev_page -}} 52 + </a> 53 + {%- endif %} 54 + 55 + {% if paginator.next_page -%} 56 + <a class="next-page menu-item" href="{{ paginator.next_page_path | relative_url }}" rel="next"> 57 + {{- site.translations.blog_pagination_next_page -}} 58 + </a> 59 + {%- endif %} 60 + </div> 61 + </nav> 62 + {%- endif %} 63 + </div>
+12
_layouts/default.html
··· 17 17 {% for link in site.seo.links %} 18 18 <link rel="me" href="{{ link }}" /> 19 19 {% endfor %} 20 + 21 + {%- if site.category_colors -%} 22 + <style id="category-colors"> 23 + {%- for category in site.category_colors %} 24 + .{{- category.name | slugify: site.slug_mode | prepend: "_" }} { 25 + background-color: {{ category.color -}}; 26 + } 27 + {%- endfor -%} 28 + </style> 29 + {%- endif -%} 30 + 31 + <link rel="stylesheet" href="{%- link assets/css/layout.css -%}" /> 20 32 </head> 21 33 <body> 22 34 {% include header.html %}
+95 -1
_layouts/post.html
··· 2 2 layout: default 3 3 --- 4 4 5 - {{ content }} 5 + <article class="post h-entry"> 6 + <header class="post-header"> 7 + <a class="post-permalink u-url" href="{{- page.url | absolute_url -}}" rel="bookmark"> 8 + <time class="post-date dt-published" datetime="{{ page.date | date_to_xmlschema }}"> 9 + {{- page.date | date: site.date_formats.day -}} 10 + </time> 11 + </a> 12 + 13 + {%- if page.title and page.title != "" -%} 14 + <h1 class="post-title p-name"> 15 + {{- page.title -}} 16 + </h1> 17 + {%- assign post_title = page.title -%} 18 + {%- elsif page.source -%} 19 + {%- assign link_metadata = page.source | metadata -%} 20 + 21 + <h2 class="post-title p-name"> 22 + {%- if link_metadata.title -%} 23 + <cite class="post-title u-in-reply-to h-cite"> 24 + <a class="post-source-title u-url" href="{{- page.source -}}"> 25 + {{- link_metadata['og:title'] | default: link_metadata.title | prepend: "↪ " -}} 26 + </a> 27 + </cite> 28 + {%- else -%} 29 + <cite class="post-source-title u-in-reply-to h-cite"> 30 + <a class="post-source u-url p-name" href="{{- page.source -}}"> 31 + {{- page.source | remove: "https://" | remove: "http://" | prepend: "↪ " -}} 32 + </a> 33 + </cite> 34 + {%- endif -%} 35 + </h2> 36 + {%- endif -%} 37 + 38 + {%- if page.categories -%} 39 + {% for category in page.categories %} 40 + {%- assign category_slug = category | slugify: site.slug_mode -%} 41 + {%- assign category_url = site.jekyll-archives.permalinks.category | replace: ":name", category_slug -%} 42 + 43 + <a 44 + class="post-category category {{ category_slug | prepend: "_" }} p-category" 45 + href="{{ category_url | relative_url }}" 46 + rel="tag" 47 + > 48 + {{- category -}} 49 + </a> 50 + {% endfor %} 51 + {%- endif -%} 52 + </header> 53 + 54 + <div class="post-content e-content"> 55 + {{ page.content }} 56 + </div> 57 + 58 + {%- if page.author or site.author or page.tags -%} 59 + <footer class="post-footer"> 60 + {%- assign author = page.author -%} 61 + 62 + {%- if site.author -%} 63 + {% assign author = site.author %} 64 + {%- elsif site.data.authors -%} 65 + {%- assign author = site.data.authors[page.author] -%} 66 + {%- endif -%} 67 + 68 + {%- if author.uri -%} 69 + <p class="post-author p-author h-card"> 70 + <a class="p-name u-url" href="{{- author.uri -}}"> 71 + {{ author.name }} 72 + </a> 73 + </p> 74 + {%- else -%} 75 + <p class="post-author p-author h-card"> 76 + <span class="p-name"> 77 + {{- author -}} 78 + </span> 79 + </p> 80 + {%- endif -%} 81 + 82 + {%- if page.tags -%} 83 + <ul class="post-tags"> 84 + {%- for tag in page.tags -%} 85 + {%- assign tag_slug = tag | slugify: site.slug_mode -%} 86 + {%- assign tag_url = site.jekyll-archives.permalinks.tag | replace: ":name", tag_slug -%} 87 + 88 + <li class="tag-item"> 89 + <a class="p-category" href="{{ tag_url }}" rel="tag"> 90 + {{ tag }} 91 + </a> 92 + </li> 93 + {%- endfor -%} 94 + </ul> 95 + {%- endif -%} 96 + </footer> 97 + {%- endif -%} 98 + </article> 99 +
+3
index.html
··· 1 + --- 2 + layout: blog 3 + ---