Rename notes to zets

This commit is contained in:
Oliver Davies 2024-09-14 16:57:43 +01:00
parent e70d8c6f1f
commit 6d4667887d
35 changed files with 57 additions and 33 deletions

View file

@ -2,4 +2,4 @@
My personal Zettelkasten notes, powered by [Sculpin](https://sculpin.io).
All notes are located in the `source/_notes` directory and can also be viewed at <https://zet.oliverdavies.uk>
All notes are located in the `source/_zets` directory and can also be viewed at <https://zet.oliverdavies.uk>

View file

@ -1,6 +1,6 @@
---
sculpin_content_types:
notes:
permalink: /notes/:basename/
posts:
enabled: false
zets:
permalink: /notes/:basename/

View file

@ -16,10 +16,10 @@ function new {
fi
title="$1"
note_path="source/_notes"
note_count=$(find "$note_path" -type f | wc -l)
next_note=$((note_count + 1))
next_note_path="$note_path/$next_note.md"
zet_path="source/_zets"
zet_count=$(find "$zet_path" -type f | wc -l)
next_zet=$((zet_count + 1))
next_zet_path="$zet_path/$next_zet.md"
date=$(date +"%Y-%m-%d %T")
{
@ -29,9 +29,9 @@ function new {
echo "tags: []"
echo "---"
echo ""
} > "$next_note_path"
} > "$next_zet_path"
git add "$next_note_path"
git add "$next_zet_path"
git commit -m "$title"
}

View file

@ -1,13 +0,0 @@
{% if related and notes %}
<section>
<h2>Related</h2>
<ul>
{% for note in notes if related|filter((title) => title == note.title) %}
<li>
<a href="{{ note.url|trim('/', 'right') }}">{{ note.title }}</a>
</li>
{% endfor %}
</ul>
</section>
{% endif %}

View file

@ -0,0 +1,13 @@
{% if related and zets %}
<section>
<h2>Related</h2>
<ul>
{% for zet in zets if related|filter((title) => title == zet.title) %}
<li>
<a href="{{ zet.url }}">{{ zet.title }}</a>
</li>
{% endfor %}
</ul>
</section>
{% endif %}

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="{{ site.locale|default('en') }}">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ site.name|default('Sculpin Skeleton') }}</title>
</head>
<body>
{% block body %}
<h1>{% block page_title %}{{ page.title }}{% endblock %}</h1>
{% block content_wrapper %}
{% block content %}{% endblock %}
{% endblock %}
<hr />
<footer>
<p>This website is open source. <a class="underline hover:no-underline" href="{{ site.github.url }}/edit/main/source/{{ page.relative_pathname }}">Improve this page</a>.</p>
</footer>
{% endblock %}
</body>
</html>

View file

@ -13,13 +13,13 @@
{% block content %}{% endblock %}
{% include "notes/links" with { links: page.links } %}
{% include "zets/links" with { links: page.links } %}
{% include "notes/related" with {
notes: data.notes,
{% include "zets/related" with {
zets: data.zets,
related: page.related,
} %}
{% include "notes/tags" with { tags: page.tags } %}
{% include "zets/tags" with { tags: page.tags } %}
{% endblock %}

View file

@ -4,7 +4,7 @@ date: 2024-09-14 13:39:01
tags: [Linux, curl]
related:
- Sending POST requests with curl
use: [notes]
use: [zets]
---
When sending JSON data in a POST request, instead of writing it inline with the `--data` or `--json` option, a filename can be entered - prefixed with an `@` symbol.

View file

@ -1,14 +1,14 @@
---
layout: page
title: Zettelkasten for Oliver Davies (opdavies)
use: [notes]
use: [zets]
---
<ul>
{% for note in data.notes %}
{% for zet in data.zets %}
<li>
<a href="{{ note.url }}">
{{- note.date|date }}: {{ note.title -}}
<a href="{{ zet.url }}">
{{- zet.date|date }}: {{ zet.title -}}
</a>
</li>
{% endfor %}

View file

@ -1,10 +1,10 @@
---
permalink: /notes.json
use: [notes]
use: [zets]
---
[
{% for note in data.notes|sort((a,b) => b.date <=> a.date) %}
{% for note in data.zets|sort((a,b) => b.date <=> a.date) %}
{
"id": {{ note.filename|replace({".md": ""}) }},
"date": {{ note.date }},