Skip to content

TemplateContentRenderError was thrown > cheerio.load() expects a string #21

@mariusa

Description

@mariusa

Hi, getting this error

`TemplateContentRenderError` was thrown
> cheerio.load() expects a string, file:./modules.md, line:9

`RenderError` was thrown
> cheerio.load() expects a string

`Error` was thrown:
    Error: cheerio.load() expects a string
        at Function.exports.load (/usr/local/lib/node_modules/eleventy-plugin-toc/node_modules/cheerio/lib/static.js:30:11)
        at BuildTOC (/usr/local/lib/node_modules/eleventy-plugin-toc/src/BuildTOC.js:18:21)
        at /usr/local/lib/node_modules/eleventy-plugin-toc/.eleventy.js:8:14

with a simple .md file

        <h2>{{ page.title }}</h2>
        <div class="line-shape"></div>

{{ content | toc : '{"tags":["h2","h3"],"wrapper":"div","wrapperClass":"content-tableau"}' }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions