Roam Research (
https://roamresearch.com/) is gaining some attention as a revolutionary way to organize thoughts and ideas by connecting them through backlinks, so that you suddenly can see how information is related and find back to it in new contexts. At the moment, there are some open source tools that have somewhat similar functionality (
https://www.reddit.com/r/selfhosted/comments/f0z6yd/open_source_alternatives_to_roam_research/), but it seems that DokuWiki actually can be a nice competitor!
Here I will describe my setup, please comment if you have suggestions or if you find it inspiring! At the moment I am using Bootstrap 3 with the cosmos theme.
The front page is really simple with a field to add notes. If I select "Todo," I can add a due date (automatically set to today:
http://ewy.no/tiddly/img/ewy_1.PNG. A task is then created and tagged with "todo," "note" and todays date:
http://ewy.no/tiddly/img/ewy_2.PNG Start date is always the day the task was created. Similarly, a note (
http://ewy.no/tiddly/img/ewy_3.PNG) will be tagged with "note" and todays date:
http://ewy.no/tiddly/img/ewy_4.PNG. Clicking on the non-existing page takes you straight to the create page with template:
http://ewy.no/tiddly/img/ewy_5.PNG. Backlinks are automatically transcluded:
http://ewy.no/tiddly/img/ewy_6.PNG.
I have four overview pages: Todo, Subjects, Notes, and Calendar. The subject page shows all pages tagged "notetopic," eg. dokuwiki (
http://ewy.no/tiddly/img/ewy_7.PNG). The todo page shows all the tasks (
http://ewy.no/tiddly/img/ewy_8.PNG). The note page shows all my notes. And as always is my note kept as plain text files (
http://ewy.no/tiddly/img/ewy_11.PNG) so that I later can use eg. the note-link janitor (
https://github.com/andymatuschak/note-link-janitor) if the need arises.
The calendar page takes you to a calendar (
http://ewy.no/tiddly/img/ewy_9.PNG). When opening a day, there is an overview of tasks created, completed and due that day (
http://ewy.no/tiddly/img/ewy_10.PNG). At the bottom all notes from that day is listed. It's a nice log of what happened that day!
In addition, I added a "New" button in the navigation bar that redirects me directly to a new page with the note template, this is useful if I want to add an image etc and saves me a few clicks.
I also added a right sidebar with add note/todo fields in it.
So, to the technical part:
The home-page is made using the Bureaucracy Plugin (
https://www.dokuwiki.org/plugin:bureaucracy):
<form>
action template ! ":notes"
fieldset "Notat"
textarea "Notat" !
yesno "Todo"
addpage tmplts "%Y%m%d-%H%M%S"
fieldset "Todo" "Todo"
date "Frist" =%Y-%m-%d
addpage tmplts_todo "%Y%m%d-%H%M%S"
fieldset
submit
</form>
The plugin didn't like my data format, so I get a warning, but is still works. The two templates are simply (tmplts-todo)
<todo start:%Y-%m-%d due:@@Frist@@>@@Notat@@</todo>
{{tag>note todo %Y%m%d}}
and (tmplts)
@@Notat@@
{{tag>note %Y%m%d}}
In the notes namespace I have the template
# @!PAGE@
## Backlinks
{{blinks>@ID@&permalink}}
{{tag>notetopic}}
to quickly create new subject pages. Note that I use the markdown plugin (
https://www.dokuwiki.org/plugin:markdowku) and the 404 manager plugin (
https://www.dokuwiki.org/plugin:404manager). To include the backlinks, you need the include plugin (
https://www.dokuwiki.org/plugin:include), and to modify it by adding
$this->Lexer->addSpecialPattern("{{blinks>.+?}}", $mode, 'plugin_include_include');
at line 15 in include.php and
case 'blinks':
$page = $this->_apply_macro($page, $parent_id);
resolve_pageid(getNS($parent_id), $page, $exists);
@require_once(DOKU_INC.'inc/fulltext.php');
$pagearrays = ft_backlinks($page,true);
$this->taghelper =& plugin_load('helper', 'tag');
$tags = $this->taghelper->getTopic('notes', null, 'note');
foreach ($tags as $tag){
$tagss[] = $tag['id'];
}
if(!empty($pagearrays)){
foreach ($pagearrays as $pagearray) {
if(in_array($pagearray,$tagss)){
$pages[] = $pagearray;
}
}
}else{
$pages[] = 'notes:dummy';
}
break;
at line 715 in helper.php. This will only include pages tagged with "note" so that we avoid recursion.
The overview pages are made by the todo plugin and the include plugin, eg.
# Notater
{{tagtopic>note&firstseconly&noeditbutton&permalink}}
My journal is found in the journal namespace. There are two templates, one for days and one for months. In _template.txt:
# Notater fra @PAGE@
## Dagens gjøremål
### Gjort i dag
~~TODOLIST completedat:@PAGE@ showdate:yes ns:notes header:none~~
### Nye i dag
~~TODOLIST startat:@PAGE@ showdate:yes ns:notes header:none~~
### Frist i dag
~~TODOLIST dueat:@PAGE@ showdate:yes ns:notes header:none~~
## Dagens notater
{{tagtopic>@PAGE@ -todo&noreadmore&noeditbutton&permalink}}
~~NOCACHE~~
and in __template.txt:
{{monthcal:create_prev_next_links=yes,display_weeks=yes,namespace=journal,year=@CURNS@}}
The latter makes it easy to create a new calendar view for each month. The days are all saved directly into the journal namespace as eg. 20200413.txt, whereas the calendar has its own namespace per month, eg. 202003:start. This is a bit cumbersome, and I had to modify how the monthcal plugin made links. But it is working.
Additionally, I have added the linksuggest, imgpaste and dropfiles plugins, but they are only working from the edit page and not the add notes-page.
I had to activate php to make a "New note" button, so my navigation bar looks as
<php>
echo '<ul>';
echo '<li><a href = "/nn/doku.php?id=todos">Todos</a></li>';
echo '<li><a href = "/nn/doku.php?id=notater">Notater</a></li>';
echo '<li><a href = "/nn/doku.php?id=tema">Tema</a></li>';
echo '<li><a href = "/nn/doku.php?id=journal:start">Kalender</a></li>';
echo '<li><a href = "/nn/doku.php?id=notes:';
echo date('Ymd-His');
echo '&do=edit&newpagetemplate=tmplts_2">Nytt</a></li>';
echo '</ul>';
</php>
~~NOCACHE~~
where the newpagetemplate plugin (
https://www.dokuwiki.org/plugin:newpagetemplate) makes the templates right.
To keep the right sidebar at place, I added
#dokuwiki__aside{
position: sticky;
top: 75px;
bottom: 0;
overflow: auto;
}
to the userall.css
To make the sidebar-field properly link back to the page from which the note was added, I had to edit the Bureaucracy plugin to render the value field for hidden. That is, in helper/fieldhidden.php, edit line 28 to
$tlp = $this->getParam('value');
$ins = array_slice(p_get_instructions($tlp), 2, -2);
$tlp = p_render('xhtml', $ins, $byref_ignore);
$form->addHidden($params['name'], $tlp. '');
Edit: I added my own setup!