Skip to content

Commit b749559

Browse files
committed
blog: 2025-10-23, 2025-10-25
1 parent 83815fc commit b749559

8 files changed

Lines changed: 111 additions & 3 deletions

File tree

docs/_includes/ipage.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
<hr/>
2929

3030
<div class="container">
31-
<!--<h4 class="text-epsilon">Latest {{ include.header }}</h4>-->
32-
3331
<div>
3432
{% assign main = include.main %}
3533
{% assign secondary = include.secondary | split: ',' %}
39.2 KB
Loading
9.37 KB
Loading
11.7 KB
Loading
24.1 KB
Loading

docs/blog/2025-10-23.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: October 23rd, 2025
3+
layout: page
4+
parent: Blog posts
5+
tags: [programming, typescript, obsidian, obsidian plugin]
6+
date: 2025-10-23
7+
subject: First actual Open Source Contribution!!
8+
nav_order: 997
9+
---
10+
11+
{% include top-card.html %}
12+
13+
![Top banner thing](/assets/images/blog/2025_10_23-1.png)
14+
15+
**Situation**
16+
17+
Finally found an obsidian plugin for navigating dates, and opening daily notes in advance <small>yay</small>
18+
19+
![Initial stuff](/assets/images/blog/2025_10_23-2.png)
20+
21+
**Problema**
22+
23+
While its nice and all, I kinda have a thing for knowing how many days in the past or future a day is. After some digging, found out obsidian plugins are basically made with typescript, and since I'm not that versed in ts, especially when it comes to the whole part of async and moving data back and forth, I am very pleased that I managed to pull off all my requirements:
24+
25+
![Solution #1](/assets/images/blog/2025_10_23-3.png)
26+
![Solution #2](/assets/images/blog/2025_10_23-4.png)
27+
28+
- [X] added a red negative counter for days in the past
29+
- [X] added a green counter for days in the future
30+
- [X] marked today with 0
31+
- [X] marked today with 0🌛 in case its between midnight and 4AM (I got mini heart attacks way too often when checking the clock past midnight and realize the calendar changed, I can't be the only one.....)
32+
- [X] added option in settings to toggle on/off
33+
34+
Made a fork and all that, now just gotta wait till it gets approved, else I may take the project in another direction, and give it more quality of life features <small>such as a danish mode to display week numbers.</small>
35+
36+
Thank you for reading 😎👉
37+
38+
{% include tags.html %}

docs/blog/2025-10-25.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
title: October 25th, 2025
3+
layout: page
4+
parent: Blog posts
5+
tags: [programming, js, liquid, headaches]
6+
date: 2025-10-25
7+
subject: JustTheDocsCeption
8+
nav_order: 996
9+
---
10+
11+
{% include top-card.html %}
12+
13+
I more or less spent the entire afternoon and evening trying to figure out how to modularize the whole table of contents stuff on index pages as I wasn't a fan of the default. Or well, I could sense it needed extra features.
14+
15+
It was quite a
16+
17+
battle.
18+
19+
If you go on any category page (bar software as I'm still pondering on that one), you will see a very nice table of contents with sorting options. I'm into modularization a lot. If I can make something repetitive modular, I will do my best to do it, even if sometimes its kind of like scratching my right ear with my left hand.
20+
21+
In this case it was similar, but it was more like scratching my right ear with my right hand, only that the arm wraps *around my head* first.
22+
23+
The end result was phenomenal though, as now I can just slap a tiny snippet on each index, and modify it to my likeing.
24+
{% raw %}
25+
```liquid
26+
{% include ipage.html
27+
area='hardware'
28+
main='type'
29+
secondary='device'
30+
header='mods'
31+
%}
32+
```
33+
{% endraw %}
34+
What happens here is all the pages containing `/hardware/` in the uri will have the `type` and the `device` displayed in a list that will just say `mods:` prior. And as per usual, I took it a step further, the `secondary` attribute being allowed to have more than 1 item <small>even though I do not have a usecase for it as of now</small>.
35+
36+
All it took was to combine javascript with [Liquid](https://liquidjs.com/tutorials/intro-to-liquid.html) in the monstrosity bellow 👌
37+
38+
{% raw %}
39+
```liquid
40+
{% for post in sorted_posts %}
41+
{% if post.path contains include.area and post[main] %}
42+
<li data-{{ main }}="{{ post[main] }}"
43+
{% if secondary %}
44+
{% for opt in secondary %}
45+
data-{{opt}}="{{ post[opt] | downcase }}"
46+
{% endfor %}
47+
{% endif %}
48+
>
49+
<a href="{{ post.url }}">
50+
{{ post[main]}}
51+
{% if secondary %}
52+
53+
{% for sec in secondary %}
54+
{{post[sec]}}{% unless forloop.last %}, {% endunless %}
55+
{% endfor %}
56+
{% endif %}
57+
</a>
58+
</li>
59+
{% endif %}
60+
{% endfor %}
61+
```
62+
{% endraw %}
63+
64+
Thank you for reading 😎👉
65+
66+
**Some minutes into making this article edit:** *spent a bit of time figuring out how to show the liquid code, since it kept rendering, turns out it just had to be wrapped in* `raw` *tags.*
67+
68+
{% include tags.html %}

docs/blog/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ title: Blog posts
33
nav_order: 3
44
layout: page
55
has_children: true
6-
6+
has_toc: false
77
---
88

9+
# Blog
10+
11+
Random thoughts, devlogs, writings, and all that jazz 🎶🎶🎶
12+
913
{% include ipage.html
1014
area='blog'
1115
main='date'

0 commit comments

Comments
 (0)