Skip to content

Commit fffd0a6

Browse files
[setup](build): Jekyll(minima files)
Signed-off-by: Ralph Hightower <[email protected]>
1 parent fe3b4a7 commit fffd0a6

File tree

5 files changed

+154
-0
lines changed

5 files changed

+154
-0
lines changed

_layouts/base.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
3+
4+
{%- include head.html -%}
5+
6+
<body>
7+
8+
{%- include header.html -%}
9+
10+
<main class="page-content" aria-label="Content">
11+
<div class="wrapper">
12+
{{ content }}
13+
</div>
14+
</main>
15+
16+
{%- include footer.html -%}
17+
18+
</body>
19+
20+
</html>

_layouts/home.html

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
layout: base
3+
page_excerpts: true
4+
minima:
5+
show_excerpts: true
6+
---
7+
<!-- Just some nice to have styles for the pager buttons -->
8+
<style>
9+
ul.pager { text-align: center; list-style: none; }
10+
ul.pager li {display: inline;border: 1px solid black; padding: 10px; margin: 5px;}
11+
</style>
12+
13+
<div class="home">
14+
{%- if page.title -%}
15+
<h1 class="page-heading">{{ page.title }}</h1>
16+
{%- endif -%}
17+
18+
{{ content }}
19+
20+
<ul class="post-list">
21+
<!--
22+
Here is the main paginator logic called.
23+
All calls to site.posts should be replaced by paginator.posts
24+
-->
25+
{% for post in paginator.posts %}
26+
<li>
27+
<span class="post-meta">{{ post.date | date: date_format }}</span>
28+
<h3>
29+
<a class="post-link" href="{{ post.url | relative_url }}">
30+
{{ post.title | escape }}
31+
</a>
32+
</h3>
33+
<!-- {%- if site.minima.show_excerpt -%} -->
34+
<!-- {%- if post.excerpt.size > 0 -%} -->
35+
<p>DEBUG: {{ post.excerpt | escape }} </p>
36+
<!-- {%- endif -%} -->
37+
<!-- {%- endif -%} -->
38+
</li>
39+
{% endfor %}
40+
</ul>
41+
42+
<!--
43+
Showing buttons to move to the next and to the previous list of posts (pager buttons).
44+
-->
45+
{% if paginator.total_pages > 1 %}
46+
<ul class="pagination">
47+
{%- assign date_format = site.minima.date_format | default: "%B %e, %Y %I:%M %p %Z, %a" -%} <ul class="pager">
48+
{% if paginator.first_page %}
49+
<li class="previous-page">
50+
<a href="{{ paginator.first_page_path | prepend: site.baseurl | replace: '//', '/' }}">First</a>
51+
</li>
52+
{% endif %}
53+
54+
{% if paginator.previous_page %}
55+
<li class="previous-page">
56+
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&larr; Newer Posts</a>
57+
</li>
58+
{% endif %}
59+
60+
{% if paginator.page_trail %}
61+
{% for trail in paginator.page_trail %}
62+
<li {% if page.url == trail.path %}class="selected"{% endif %}>
63+
<a href="{{ trail.path | prepend: site.baseurl | replace: '//', '/' }}" title="{{trail.title}}">{{ trail.num }}</a>
64+
</li>
65+
{% endfor %}
66+
{% endif %}
67+
68+
{% if paginator.next_page %}
69+
<li class="next-page">
70+
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Older Posts &rarr;</a>
71+
</li>
72+
{% endif %}
73+
74+
{% if paginator.last_page %}
75+
<li class="previous-page">
76+
<a href="{{ paginator.last_page_path | prepend: site.baseurl | replace: '//', '/' }}">Last</a>
77+
</li>
78+
{% endif %}
79+
</ul>
80+
{% endif %}
81+
82+
</div>

_layouts/page.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
layout: base
3+
---
4+
<article class="post">
5+
6+
<header class="post-header">
7+
<h1 class="post-title">{{ page.title | escape }}</h1>
8+
</header>
9+
10+
<div>
11+
<div id="table-of-contents">
12+
{{ content | toc_only }}
13+
</div>
14+
<div id="markdown-content">
15+
{{ content | inject_anchors }}
16+
</div>
17+
</div>
18+
19+
</article>

_layouts/post.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
layout: base
3+
---
4+
5+
<div class="home">
6+
{%- if page.title -%}
7+
<h1 class="page-heading">{{ page.title }}</h1>
8+
{%- endif -%}
9+
{%- assign date_format = site.minima.date_format | default: "%B %e, %Y %I:%M %p %Z, %a" -%}
10+
<span class="post-meta">{{ page.date | date: date_format }}</span>
11+
{{ content | toc }}
12+
13+
<h2>Related Posts</h2>
14+
<ul>
15+
{% for post in page.ai_related_posts limit:3 %}
16+
<li><a href="{{ post.url | prepend: site.baseurl | replace: '//', '/' }}">{{ post.title }}</a></li>
17+
{% endfor %}
18+
</ul>
19+
20+
</div>

_layouts/tag_page.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
layout: default
3+
---
4+
<h2>{{ page.tag }}</h2>
5+
<ul>
6+
{% for post in page.posts %}
7+
<li><a href="{{ post.url }}">{{ post.title }}</a> ({{ post.date | date_to_string }} | Tags: {{ post | tags }})</li>
8+
{% endfor %}
9+
</ul>
10+
11+
<div id="tag-cloud">
12+
{{ site | tag_cloud }}
13+
</div>

0 commit comments

Comments
 (0)