2025-05-13

Mandatory Military Service

드디어 끝났다

Blog

tried to setup github workflow. Was going to use nix to ship norgolith binary, but failed to build with nix due to git crate dependencies.

backup

note copied from syntax-design.norg

** Inline Macro

Examples:
@code
\macro[can embed /inline text/ with square brackets]
\macro[including [anchors]]
\macro[with other \inline[\macros[text]]]

\macro(key value; key value)

\macro[with markup and](key value)

\macro()

/\macro/

\macro\macro

\valid-macro-name()

\macro$[free-form syntax]$
\macro$$[free-form syntax]$$
@end

** Link targets

`{*** heading}` is shorthand syntax for `{* : * : * heading}`. Note that this just means it refers to heading that is at least 3 levels deep.

If we really go far with type system, we should also have `{-- list item}` or `{: table}`, but we don't. That means it is fine to say that `* heading` inside link item is separate syntax to /target/ the title.

*** WikiLinks

Don't need it. *Import* the wiki and use anchors instead:

@code
.auto-link /path/to/wiki/workspace/**/*

[some file]
@end

`.auto-link` will iterate through all files and define an anchor targeting them.
This enables us to implement aliased wikilinks too.

and form norgolith/todo.norg


Query tag idea:

@@code
@query

SELECT * FROM notes ...;

@template.html

{% for note in notes %}
  <div>
    <a href="{{ note.permalink }}"><h2>{{ note.title }}</h2></a>
    <p>{{ note.description }}</p>
  </div>
{% endfor %}

@end
@@end

or we might not need it at all and just need to implement it from template.

Nah, this sucks. This is not extensible (what if user want to query notes based on custom metadata?)
I have a crazy idea: use janet to query notes.

/'Wait, but how would you deal with the index performance??'/ you might ask.
Well, why don't we cache janet script and its result in DB? That can work.

Some edge case could be:

When janet script tries to find document metadata which is also dyanmically generated based on workspace state (e.g. based on other query result)