Skip to content

Commit df5509d

Browse files
authored
Update libreblog.js
Adding footnotes.
1 parent 3495f08 commit df5509d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

libreblog/libreblog.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1374,6 +1374,12 @@ const configTwig = function() {
13741374
return "<a href='#ref-" + args.counter + "' class='ref-link' property='dc:relation'>" + args.counter + "</a>";
13751375
});
13761376

1377+
globalThis.Twig.extendFunction('note', (noteText, args) => {
1378+
references_cache[args.uri + "/" + ++args.counter] = noteText;
1379+
references_cache[args.uri + "/counter"] = args.counter;
1380+
return "<a href='#ref-" + args.counter + "' class='ref-link'>" + args.counter + "</a>";
1381+
});
1382+
13771383
globalThis.Twig.extendFunction('img', (id, args, options) => {
13781384
if (!args.media[id]) return "";
13791385
if (!options) options = {};
@@ -2217,4 +2223,4 @@ export default {
22172223
getMediaFile: getMediaFile,
22182224
risMap: risMap,
22192225
libreblogLogo: libreblogLogo
2220-
}
2226+
}

0 commit comments

Comments
 (0)