Hello,
I am trying to create a static documentation site using Nanoc + Kramdown in gitlab. I have the default template from here:
https://gitlab.com/pages/nanoc.
Our documentation can be a bit long where I work, so rather than scrolling down through the page, I would like page navigation to be in the sidebar, rather than inline in the document the way it is working now. (after I get this working, my plan is to make the sidebar floating, so it is always on the page and doesn't scroll away...but that is an iteration for another day.)
My ultimate goal is to change the default.html sidebar section to include page navigation that is generated by kramdown, but I cannot get the code to render. What is your best advice for how to make this work?
You can see my test project here if you would like to see all the files and the output I see:
(I have uploaded my project from my onprem gitlab where you would not have had access)
details:
My default.html looks like this:
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title>A Brand New Nanoc Site - <%= @item[:title] %></title>
<link rel="stylesheet" href="stylesheet.css">
<!-- you don't need to keep this, but it's cool for stats! -->
<meta name="generator" content="Nanoc <%= Nanoc::VERSION %>">
</head>
<body>
<div id="main">
<%= yield %>
</div>
<div id="sidebar">
<%= render '/toc.*' %>
</div>
</body>
</html>
my toc.md looks like this:
---
description: Table of Contents
---
## On this page
{:.no_toc .hidden-md .hidden-lg}
- TOC
{:toc .hidden-md .hidden-lg}
(Note: this md code works fine in my index.md file when it is rendered.)