├── .gitignore ├── README.md ├── config.json ├── diary └── diary.md ├── favicon.png ├── images └── vimlogo-small.png ├── index.md ├── install.sh ├── navigation.md └── serve.sh /.gitignore: -------------------------------------------------------------------------------- 1 | .vimwiki_tags 2 | /*index.html 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vimwiki 2 | 3 | ![](images/vimlogo-small.png) This repository contains a [Vimwiki][1] instance 4 | using [Markdown][2] syntax backed by Git. HTML rendering is provided by 5 | [MDwiki][3]; content may be viewed online using a traditional web server or 6 | offline using a script (see [below](#Offline_Viewing)). 7 | 8 | ## Installation 9 | 10 | To initialize a new wiki instance, a clone of this repository can be made to 11 | simplify setup: 12 | 13 | $ git clone git://github.com/sstallion/vimwiki-skel.git vimwiki && cd vimwiki 14 | $ git remote set-url origin 15 | $ git push -u origin master 16 | 17 | Once initialized, `install.sh` should be called to install MDwiki and create the 18 | appropriate symlink under `$HOME`: 19 | 20 | $ sh install.sh [instance] 21 | 22 | Finally, [Vimwiki][1] should be installed if it is not already. 23 | 24 | ## Configuration 25 | 26 | At a minimum, the `vimwiki` plugin must be configured with the wiki instance 27 | location by adding the following to your `.vimrc`: 28 | 29 | let g:vimwiki_list = [{'path': '~/.vimwiki', 'syntax': 'markdown', 'ext': '.md'}] 30 | 31 | If multiple instances are installed, they must be added to this list as well: 32 | 33 | let g:vimwiki_list = [{'path': '~/.vimwiki-home', 'syntax': 'markdown', 'ext': '.md'}] 34 | \ {'path': '~/.vimwiki-work', 'syntax': 'markdown', 'ext': '.md'}] 35 | 36 | It is advised to disable global extension support to avoid having all Markdown 37 | files treated as if they were part of the wiki by adding the following to your 38 | `.vimrc`: 39 | 40 | let g:vimwiki_global_ext = 0 41 | 42 | For more detail, see: `:help g:vimwiki_global_ext`. 43 | 44 | ## Compatibility 45 | 46 | By default, Vimwiki does not add a file extension to generated wiki links, which 47 | is incompatible with MDwiki. PR [#529] addresses this issue by adding a new 48 | option `g:vimwiki_markdown_link_ext` to include the file extension. To correct 49 | this issue, add the following to your `.vimrc`: 50 | 51 | let g:vimwiki_markdown_link_ext = 1 52 | 53 | [#529]: https://github.com/vimwiki/vimwiki/pull/529 54 | 55 | ## External Wikis 56 | 57 | From time to time, it can be useful to reference wikis belonging to other 58 | repositories. Fortunately, the `git-submodule(1)` mechanism can be used to 59 | reference these repositories from the wiki instance: 60 | 61 | $ git submodule add external/ 62 | 63 | Once added, simply reference the page by adding a link to your wiki: 64 | 65 | [Link Text](external//.md) 66 | 67 | ## Offline Viewing 68 | 69 | If you wish to view the wiki offline using a browser, a simple HTTP server can 70 | be started locally by calling `serve.sh` in the repository root (requires Python 71 | 2.x): 72 | 73 | $ sh serve.sh [port] 74 | Serving HTTP on 0.0.0.0 port 8080 ... 75 | 76 | Content may then be viewed by visiting http://localhost:8080/ using your 77 | browser. 78 | 79 | ## Contributing 80 | 81 | Pull requests are welcome! If a problem is encountered using this repository, 82 | please file an issue on [GitHub][4]. 83 | 84 | [1]: https://vimwiki.github.io/ 85 | [2]: https://daringfireball.net/projects/markdown/syntax 86 | [3]: https://dynalon.github.io/mdwiki/ 87 | [4]: https://github.com/sstallion/vimwiki-skel/issues 88 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "lineBreaks": "original", 3 | "additionalFooterText": "", 4 | "anchorCharacter": "🔗", 5 | "title": "Vimwiki" 6 | } 7 | -------------------------------------------------------------------------------- /diary/diary.md: -------------------------------------------------------------------------------- 1 | # Diary 2 | -------------------------------------------------------------------------------- /favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sstallion/vimwiki-skel/23d68ea1a1f8c0fb7fb44aeb73394dc5cd453496/favicon.png -------------------------------------------------------------------------------- /images/vimlogo-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sstallion/vimwiki-skel/23d68ea1a1f8c0fb7fb44aeb73394dc5cd453496/images/vimlogo-small.png -------------------------------------------------------------------------------- /index.md: -------------------------------------------------------------------------------- 1 | # Home 2 | 3 | To get started, please see the [README](README.md). 4 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | # install.sh [instance] - install Vimwiki to $HOME 3 | 4 | MDWIKI_URL="http://dynalon.github.io/mdwiki/mdwiki-latest-debug.html" 5 | 6 | echo "Updating submodules..." 7 | git submodule update --init --recursive 8 | 9 | echo "Installing MDwiki..." 10 | curl -L -o index.html --progress-bar $MDWIKI_URL 11 | 12 | # Update title using our configuration file; 13 | # see: http://dynalon.github.io/mdwiki/#!customizing.md#Configuration 14 | title=`sed -n 's#.*"title": "\(.*\)",*#\1#p' config.json` 15 | if [ ! -z "$title" ]; then 16 | echo "Updating MDwiki..." 17 | sed "s#.*#$title#" index.html > .index.html 18 | mv .index.html index.html 19 | fi 20 | 21 | link_name=$HOME/.vimwiki 22 | if [ ! -z "$1" ]; then 23 | link_name="$link_name-$1" 24 | fi 25 | if [ -e $link_name -a ! -h $link_name ]; then 26 | echo "Skipping $link_name; not a symbolic link" 27 | else 28 | echo "Installing $link_name..." 29 | ln -fns $PWD $link_name 30 | fi 31 | 32 | echo "Done." 33 | exit 0 34 | -------------------------------------------------------------------------------- /navigation.md: -------------------------------------------------------------------------------- 1 | # Vimwiki 2 | 3 | [Diary](diary/diary.md) 4 | -------------------------------------------------------------------------------- /serve.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # serve.sh [port] - HTTP server for serving HTML content 3 | 4 | exec python3 -m http.server ${1:-8080} 5 | --------------------------------------------------------------------------------