This repository has been archived by the owner on Apr 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Custom buttons
andjar edited this page Apr 23, 2020
·
1 revision
You can add a simply "Archive" button to your sidebar by adding
<php>
echo '<html>';
echo '<form action="/roam/archive.php" method="post" >';
echo '<input name="pageid" type="hidden" value="'. getID() .'" />';
echo '<input name="fpath" type="hidden" value="' . wikifn(getID()) . '"> ';
echo '<button type="submit">Archive</button>';
echo '</form>';
echo '</html>';
</php>
This will simply exchange the note tag with archived so that the note is not included in backlinks or in the note overview. All links to it will still work, and the file is not removed from the notes folder.
There is a file called "pandoc.php" in the roam folder. In your sidebar you can add
<php>
echo '<html>';
echo '<form action="/roam/pandoc.php" method="post" >';
echo '<input name="pageid" type="hidden" value="'. getID() .'" />';
echo '<input name="fpath" type="hidden" value="' . wikifn(getID()) . '"> ';
echo '<button type="submit">Export</button>';
echo '</form>';
echo '</html>';
</php>
Clicking on the "Export" button will run pandoc and redirect you to the file's location. For the citation to work, you should add your references in the sidebar formatted as bibtex. At the moment, there is no control of file access.