Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
dokuwiki [2019/02/20 21:20] paul |
dokuwiki [2020/09/23 04:09] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== DokuWiki ====== | ====== DokuWiki ====== | ||
- | This is Paul' | + | I use [[https:// |
+ | running on one awesome droplet. It is served by Apache2. The domain name | ||
+ | paulsammut.com points to it and a virtual host on port 80 picks up the traffic. | ||
+ | |||
+ | ==== Change Log ==== | ||
The following are modifications I have done to it. | The following are modifications I have done to it. | ||
* Changed theme to Boostrap3 | * Changed theme to Boostrap3 | ||
- | * Removed the footer by deleting everything inside dokuwiki/ | + | * Removed the footer by deleting everything inside |
- | * Removed | + | * Added a google analytics plugin |
+ | * Added a mathjax plugin | ||
+ | * Added a discussion plugin for comments | ||
+ | |||
+ | ===== Vim Editing ===== | ||
+ | |||
+ | I tried a couple of vim plugins that allow you to log into the DokuWiki server | ||
+ | and serve up pages to vim for editing, but they were dependant on an old package | ||
+ | of dokuwikixmlrpc which I could not get to install. I tried for a day to update | ||
+ | the package to allow the install but I was sure to keep running into problems. | ||
+ | |||
+ | I use the '' | ||
+ | run this command: | ||
+ | |||
+ | <code vim> | ||
+ | :set ft=dokuwiki | ||
+ | </ | ||
+ | |||
+ | I added a function in my '' | ||
+ | sets this syntax automatically. It does this with two checks: | ||
+ | * File extension is '' | ||
+ | * First line contains '' | ||
+ | |||
+ | It then sends keys to unfold the doc, as the doc opens fully folded by default. | ||
+ | |||
+ | <code vim> | ||
+ | " For DokuWiki txt files. | ||
+ | au BufRead *.txt call s: | ||
+ | |||
+ | " Check if first line contains heading | ||
+ | fun! s: | ||
+ | if getline(1) =~ " | ||
+ | set ft=dokuwiki | ||
+ | normal zR | ||
+ | endif | ||
+ | endfunction | ||
+ | </ | ||
+ | |||
+ | ===== Namespaces ===== | ||
+ | So I spent over an hour redoing the site to have a hierarchy system of namespaces. | ||
+ | After I set it up, I realized I didn't want it. It adds unnecessary complication | ||
+ | to the page and here are the reasons I reverted back to pre-namespace. | ||
+ | * Forcing me to have start pages for every parent node in the hierarchy | ||
+ | * Complicates the links by now adding their trace | ||
+ | * Forces me to write duplicate code with links | ||
+ | * Adds hours of reshuffling for no appreciable gain | ||
+ | * The DokuWiki site doesn' | ||
+ | |||
+ | ===== Plugins ===== | ||
+ | |||
+ | I use various plugins to get the functionality I wanted. | ||
+ | |||
+ | ==== Discussion Plugin ==== | ||
+ | |||
+ | I use the [[https:// | ||
+ | Plugin]] to add comments. I tried using the '' | ||
+ | %%'' | ||
+ | work. So I had to add the string '' | ||
+ | %page using this commnad: | ||
+ | |||
+ | <code bash> | ||
+ | printf " | ||
+ | </ | ||
+ | |||
+ | ==== Analytics Plugin ==== | ||
+ | |||
+ | I set up Google Analytics using the | ||
+ | [[https:// | ||
+ | plugin]] [[https:// | ||
+ | enter the tracking ID into the plugin configuration. | ||
+ | |||
+ | ===== Syntanx Highlighting ===== | ||
+ | |||
+ | I have tried all kinds of code blocks and settled on using the default one with | ||
+ | line numbers. | ||
+ | |||
+ | I use this for pseudo code. There isn't actually a pseudo code coloring syntax | ||
+ | but i type it in there because if you don't have a syntax option the line | ||
+ | numbers don't show up: | ||
+ | |||
+ | < | ||
+ | <code cpp [enable_line_numbers=" | ||
+ | <code pseudo [enable_line_numbers=" | ||
+ | </ | ||
+ | |||
+ | ===== Mac Vim Editing ===== | ||
+ | |||
+ | I use ssfs to mount the droplet dokuwiki directory and edit the files directly | ||
+ | on the server. I could use unison to do it but whatever. | ||
+ | |||
+ | I sometimes run into issues with read only files and file owner corruption with | ||
+ | mac's version of sshfs. I set the user to paul and group to www-data on the | ||
+ | droplet. | ||
+ | |||
+ | '' | ||
+ | |||
+ | '' |