This example puts the Table of Contents in the Sidebar. It also wraps the TOC in a nav tag so you can easily move other stuff, such as a button, to the sidebar. Just paste the following in your page.

Notice the markdown=1. This allows markdown to be embedded in an HTML tags.

<nav class="toc" markdown="1">
* TOC
{:toc}
</nav>

And create assets/main.scss with the following content.

---
---

@import "minima";

div.wrapper {max-width:960px;margin-left:5%;}
div.post-content > p {width:65%;max-width:640;}
nav.toc {float:right;width:30%;max-width:320px;margin-top:-100px;}
nav.toc ul {list-style:none;padding-left:0;margin-left:0;}
table {width:65%;max-width:640;}

Examples

Check out Sidebar, Sidebar2 and Sidebar Fixed for more examples.

Jekyll Serve

You can view this repo locally with the following command (I’m assuming you’ve already installed jekyll and cloned this repo.

jekyll serve --trace

You may get an error similar to the following:

/usr/lib/ruby/2.7.0/bundler/runtime.rb:312:in `check_for_activated_spec!': You 
have already activated rouge 3.20.0, but your Gemfile requires rouge 3.19.0. 
Prepending `bundle exec` to your command may solve this. (Gem::LoadError)

This means the gem.lock file is out of date. To fix run the following command. You may have to iterate multiple times if more than one gem is out of date.

bundle update rouge

Please send me a pull request with your fix.

Lorem Ipsum

You can ignore the following documentation. I’m using the Lued Text Editor documentation as Lorem Ipsum.


Enter Magic

First a little magic. You enter an edit command, such as alt+xw to delete one word to the right. Now you want to delete many words. You can keep pressing alt+xw… but it’s a little annoying. And here enters the magic. Press the Enter key instead. It repeats the last alt+?? command. This is a nice time saver, and may help keep the carpal away. Note, as soon as you enter another command, such as a ctrl+? command or an arrow-key command, the Enter key reverts back to being just a regular ole Enter key.

More Repeat Magic

The above Enter repeats just the last Alt command. Say you just performed a sequence of commands that you want to repeat. Ctrl+R, R for Repeat, shows a list of the most recent commands. You enter the number of commands you want to repeat and it is done. Say you want to repeat it again. Press alt+rr to repeat again. Now if you to keep repeating, press Enter repeatedly (or hold it down if you have alot of repeats).

Tab Magic

Basic Control Key Commands

File Tab Commands

Select Commands

Movement Commands

Ctags / Exuberant Tags

Delete, Cut, Copy and Paste Commands

Find and Replace Commands

Line Swap Commands

Indent and Align Commands

Center Cursor Commands

Comment Commands

Upper / Lower Case Commands

Mark Commands

Insert Line Before / After Commands

Page Up / Down Commands

Remove Tabs and Spaces

Configuration Commands

Misc Commands

Repeat Magic

Moving Around

Terminal/Console Limitations

Control Keys are Case Insensitive

The terminal maps upper and lower case Ctrl key combinations to the same value. So Lued can’t tell the difference. For example, Ctrl+d (used by Sublime to select a word) and Shift+Ctrl+D (used by Sublime to duplicate a line) look the same to Lued.

Note, the Alt key combinations are case sensitive.