Rename notes to zets
This commit is contained in:
parent
e70d8c6f1f
commit
6d4667887d
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
My personal Zettelkasten notes, powered by [Sculpin](https://sculpin.io).
|
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>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
sculpin_content_types:
|
sculpin_content_types:
|
||||||
notes:
|
|
||||||
permalink: /notes/:basename/
|
|
||||||
posts:
|
posts:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
zets:
|
||||||
|
permalink: /notes/:basename/
|
||||||
|
|
12
run.local
12
run.local
|
@ -16,10 +16,10 @@ function new {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
title="$1"
|
title="$1"
|
||||||
note_path="source/_notes"
|
zet_path="source/_zets"
|
||||||
note_count=$(find "$note_path" -type f | wc -l)
|
zet_count=$(find "$zet_path" -type f | wc -l)
|
||||||
next_note=$((note_count + 1))
|
next_zet=$((zet_count + 1))
|
||||||
next_note_path="$note_path/$next_note.md"
|
next_zet_path="$zet_path/$next_zet.md"
|
||||||
date=$(date +"%Y-%m-%d %T")
|
date=$(date +"%Y-%m-%d %T")
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -29,9 +29,9 @@ function new {
|
||||||
echo "tags: []"
|
echo "tags: []"
|
||||||
echo "---"
|
echo "---"
|
||||||
echo ""
|
echo ""
|
||||||
} > "$next_note_path"
|
} > "$next_zet_path"
|
||||||
|
|
||||||
git add "$next_note_path"
|
git add "$next_zet_path"
|
||||||
git commit -m "$title"
|
git commit -m "$title"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 %}
|
|
13
source/_includes/zets/related.html.twig
Normal file
13
source/_includes/zets/related.html.twig
Normal 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 %}
|
|
@ -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>
|
|
@ -13,13 +13,13 @@
|
||||||
|
|
||||||
{% block content %}{% endblock %}
|
{% block content %}{% endblock %}
|
||||||
|
|
||||||
{% include "notes/links" with { links: page.links } %}
|
{% include "zets/links" with { links: page.links } %}
|
||||||
|
|
||||||
{% include "notes/related" with {
|
{% include "zets/related" with {
|
||||||
notes: data.notes,
|
zets: data.zets,
|
||||||
related: page.related,
|
related: page.related,
|
||||||
} %}
|
} %}
|
||||||
|
|
||||||
{% include "notes/tags" with { tags: page.tags } %}
|
{% include "zets/tags" with { tags: page.tags } %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -4,7 +4,7 @@ date: 2024-09-14 13:39:01
|
||||||
tags: [Linux, curl]
|
tags: [Linux, curl]
|
||||||
related:
|
related:
|
||||||
- Sending POST requests with curl
|
- 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.
|
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.
|
|
@ -1,14 +1,14 @@
|
||||||
---
|
---
|
||||||
layout: page
|
layout: page
|
||||||
title: Zettelkasten for Oliver Davies (opdavies)
|
title: Zettelkasten for Oliver Davies (opdavies)
|
||||||
use: [notes]
|
use: [zets]
|
||||||
---
|
---
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{% for note in data.notes %}
|
{% for zet in data.zets %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ note.url }}">
|
<a href="{{ zet.url }}">
|
||||||
{{- note.date|date }}: {{ note.title -}}
|
{{- zet.date|date }}: {{ zet.title -}}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
---
|
---
|
||||||
permalink: /notes.json
|
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": ""}) }},
|
"id": {{ note.filename|replace({".md": ""}) }},
|
||||||
"date": {{ note.date }},
|
"date": {{ note.date }},
|
Loading…
Reference in a new issue