Skip to content

Commit e696cde

Browse files
committed
Format post-list layout
1 parent 16968ec commit e696cde

7 files changed

Lines changed: 66 additions & 19 deletions

.github/workflows/pages-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
uses: actions/checkout@v6
3232
with:
3333
fetch-depth: 0
34-
# submodules: true
34+
submodules: true
3535
# If using the 'assets' git submodule from Chirpy Starter, uncomment above
3636
# (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets)
3737

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ comments:
133133
# Self-hosted static assets, optional › https://github.com/cotes2020/chirpy-static-assets
134134
assets:
135135
self_host:
136-
enabled: # boolean, keep empty means false
136+
enabled: true # boolean, keep empty means false
137137
# specify the Jekyll environment, empty means both
138138
# only works if `assets.self_host.enabled` is 'true'
139139
env: # [development | production]

_layouts/post-list.html

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,58 @@
11
---
22
layout: page
33
---
4-
<div id="post-list">
5-
{% for post in site.posts %}
4+
5+
{% assign all_pinned = site.posts | where: 'pin', 'true' %}
6+
{% assign all_normal = site.posts | where_exp: 'item', 'item.pin != true and item.hidden != true' %}
7+
8+
{% assign pinned_end = all_pinned.size | minus: 1 %}
9+
{% assign normal_end = all_normal.size | minus: 1 %}
10+
11+
{% assign posts = '' | split: '' %}
12+
13+
<!-- Get pinned posts on current page -->
14+
{% for i in (0..pinned_end) %}
15+
{% assign posts = posts | push: all_pinned[i] %}
16+
{% endfor %}
17+
18+
<!-- Get normal posts on current page -->
19+
{% for i in (0..normal_end) %}
20+
{% assign posts = posts | push: all_normal[i] %}
21+
{% endfor %}
22+
23+
<div id="post-list" class="flex-grow-1 px-xl-1">
24+
{% for post in posts %}
625
<article class="card-wrapper card">
7-
<a href="{{ post.url | relative_url }}" class="post-preview">
8-
<div class="card-body">
9-
<h1 class="card-title">{{ post.title }}</h1>
10-
<div class="card-text">
11-
<p>{{ post.description | default: post.content | strip_html | truncate: 150 }}</p>
26+
<a href="{{ post.url | relative_url }}" class="post-preview row g-0 flex-md-row-reverse">
27+
<div class="card-body d-flex flex-column">
28+
<h1 class="card-title my-2 mt-md-0">{{ post.title }}</h1>
29+
<div class="card-text content mt-0 mb-3">
30+
<p>{% include post-summary.html %}</p>
31+
</div>
32+
<div class="post-meta flex-grow-1 d-flex align-items-end">
33+
<div class="me-auto">
34+
<!-- posted date -->
35+
<i class="far fa-calendar fa-fw me-1"></i>
36+
{% include datetime.html date=post.date lang=lang %}
37+
38+
<!-- categories -->
39+
{% if post.categories.size > 0 %}
40+
<i class="far fa-folder-open fa-fw me-1"></i>
41+
<span class="categories">
42+
{% for category in post.categories %}
43+
{{ category }}
44+
{%- unless forloop.last -%},{%- endunless -%}
45+
{% endfor %}
46+
</span>
47+
{% endif %}
48+
</div>
49+
50+
{% if post.pin %}
51+
<div class="pin ms-1">
52+
<i class="fas fa-thumbtack fa-fw"></i>
53+
<span>{{ site.data.locales[lang].post.pin_prompt }}</span>
54+
</div>
55+
{% endif %}
1256
</div>
1357
</div>
1458
</a>

_posts/2026-03-26-how-to-schedule-bot-actions.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ title: How to Schedule Bot Actions
55
description: How to automate scheduled bot actions using the cron facility
66
category: [General]
77
tag: [setup, schedule]
8+
pin: false
89
date: 2026-03-26 15:52 -0700
910
---
1011

@@ -62,7 +63,7 @@ in place of the five time-date fields.
6263
Here is an example `crontab` entry with some brief descriptions in comments
6364
of what activities are scheduled:
6465

65-
```
66+
```cron
6667
SHELL=/bin/bash
6768
#
6869
# Schedule BotControl actions
@@ -118,12 +119,13 @@ The schedule set here is for the PG&E Time-of-Use Rate Plan E-6.
118119
Although unrelated to scheduled bot actions, this example illustrates some of the
119120
ways `crontab` can be used to schedule activity.
120121

121-
```
122-
# By default these entries run every 15 minutes. This provides a keepalive function
123-
# and relies on the start_miner script checking to see if it is already running.
124-
# You may prefer to change the '0,15,30,45' entries to simply '0' or '15' to only
125-
# start/stop once and not every 15 minutes. Or, you may prefer to increase the
126-
# "keepalive" frequency from 15 to 5 minutes - '0,5,10,15,20,25,30,35,40,45,50,55'
122+
```cron
123+
# By default these entries run every 15 minutes. This provides
124+
# a keepalive function and relies on the start_miner script checking
125+
# to see if it is already running. You may prefer to change the
126+
# '0,15,30,45' entries to simply '0' or '15' to only start/stop once
127+
# and not every 15 minutes. Or, you may prefer to increase the "keepalive"
128+
# frequency from 15 to 5 minutes - '0,5,10,15,20,25,30,35,40,45,50,55'
127129
#
128130
# Set SHELL to run my custom cron startup script when running commands
129131
SHELL=/usr/local/bin/cron.bash

_posts/2026-03-26-lifebots-control-panel-setup.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: LifeBots Control Panel Setup
44
description: How to setup the LifeBots Control Panel with an API key and Bot secret
55
category: [ControlPanel]
66
tag: [setup, lifebots, controlpanel, api]
7+
pin: false
78
date: 2026-03-26 13:17 -0700
89
---
910

_posts/2026-03-26-setup-your-bot-as-a-scripted-agent-in-second-life.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ title: Setup Your Bot as a Scripted Agent in Second Life
55
description: How to set your bot's Second Life account as a scripted agent
66
category: [General]
77
tag: [setup, secondlife]
8+
pin: false
89
date: 2026-03-26 10:26 -0700
910
---
1011

_tabs/articles.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
2-
layout: archives
3-
#layout: post-list
2+
layout: post-list
43
title: Articles
54
icon: fas fa-stream
6-
#permalink: /articles/
5+
permalink: /articles/
76
order: 1
87
---

0 commit comments

Comments
 (0)