You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry for taking so long to respond. There’s not an easy answer unfortunately, but I can suggest some alternatives.
It’s not possible to generate an automated table of contents in the aside block, and any usage of the [[toc]] syntax in the content area would only relate to it’s own block of Markdown.
So, while this wouldn’t work:
---layout: posttitle: Getting startedaside:
title: Contentscontent: | [[toc]]---## Requirements
There are some
## Installation
Is easy
## Usage
Is up to you
if you weren’t expecting the headings in your document to change frequently, you could do the following:
---layout: posttitle: Getting startedaside:
title: Contentscontent: | - [Requirements](#requirements) - [Installation](#installation) - [Usage](#usage)---## Requirements
There are some
## Installation
Is easy
## Usage
Is up to you
Alternatively, you could use [[toc]] in your main content, and then use custom CSS to position it on the page.
Both approaches are a bit of a hack, granted. It would be cool to be able to show contents in the sidebar, although most GOV.UK services show a table of contents at the top of the page. That, and if you wanted side navigation, content and a sidebar, space would get a bit tight.
Hello
I know that you can generate toc inline using
[[toc]]
Is it possible to generate a toc in the side bar?
For example modify the front matter in https://github.com/x-govuk/govuk-eleventy-plugin/blob/main/docs/example-layouts/post.md?plain=1 with something like:
The text was updated successfully, but these errors were encountered: