populate source title in backlinks with the node instead of page title

main
Ryan Rix 10 months ago
parent bc20ab278e
commit b3d53e6bd6

@ -197,9 +197,9 @@ def make_backlinks_org(self):
def to_org(link: Link):
return \
"""
,* [[{path}][{title}]]
,* [[id:{path}][{title}]]
""".format(
path=parse_sexp(link.source_file),
path=parse_sexp(link.source_id),
title=link.get_source_title()
)

@ -137,9 +137,9 @@ class Page(SQLModel, table=True):
def to_org(link: Link):
return \
"""
* [[{path}][{title}]]
* [[id:{path}][{title}]]
""".format(
path=parse_sexp(link.source_file),
path=parse_sexp(link.source_id),
title=link.get_source_title()
)

@ -58,7 +58,11 @@
(let ((dest-file (caar (org-roam-db-query
[:select file :from nodes
:where (= id $s1)]
dest))))
dest)))
(source-title (caar (org-roam-db-query
[:select title :from nodes
:where (= id $s1)]
source))))
(when (and dest-file (arcology--published-page? dest-file)
(arroyo-db-query [:insert :into arcology-links
:values $v1]

Loading…
Cancel
Save