typedoc-plugin-pages
typedoc-plugin-pages copied to clipboard
Usage with [email protected]
I want to use the new --entryPoints
feature of typedoc
that allows me to specify the entry point of the library for which I want to generate docs. It makes typedoc
reduce the number of visible elements to those that are actually exported. I have to rely on a beta version for this, i.e. [email protected]
or later.
Without typedoc-plugin-pages
the docs can be built, but once I install it, I get the following error during building:
Error: The partial literal could not be found
at Object.invokePartial (/home/steffen/git/telegraf/node_modules/handlebars/dist/cjs/handlebars/runtime.js:332:11)
at Object.invokePartialWrapper [as invokePartial] (/home/steffen/git/telegraf/node_modules/handlebars/dist/cjs/handlebars/runtime.js:84:39)
at eval (eval at createFunctionContext (/home/steffen/git/telegraf/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:262:23), <anonymous>:11:28)
at Object.prog [as fn] (/home/steffen/git/telegraf/node_modules/handlebars/dist/cjs/handlebars/runtime.js:268:12)
at Object.<anonymous> (/home/steffen/git/telegraf/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js:29:22)
at Object.wrapper (/home/steffen/git/telegraf/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js:15:19)
at Object.eval [as main] (eval at createFunctionContext (/home/steffen/git/telegraf/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:262:23), <anonymous>:11:47)
at main (/home/steffen/git/telegraf/node_modules/handlebars/dist/cjs/handlebars/runtime.js:208:32)
at ret (/home/steffen/git/telegraf/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js:16:19)
at ret (/home/steffen/git/telegraf/node_modules/handlebars/dist/cjs/handlebars/runtime.js:212:12) {
description: undefined,
fileName: undefined,
lineNumber: undefined,
endLineNumber: undefined,
message: 'The partial literal could not be found',
name: 'Error',
number: undefined
}
Maybe it is relevant that I'm also using TypeScript 4.1 which is not supported by typedoc
yet.
I could not find out what is causing the error, but here is a script that should reproduce the error for you from scratch.
git clone [email protected]:telegraf/telegraf.git
cd telegraf
npm install
npm i -D typedoc@beta typedoc-plugin-pages
mkdir -p docs/pages
echo -e "# Example page\n\nHere is some content" > docs/pages/page.md
echo '{"groups":[{"title":"Documentation","pages":[{"title":"MyPage","source":"./docs/pages/page.md"}]}]}' > pagesconfig.json
npm run build:docs -- --entryPoints src/index.ts --theme pages-plugin
I know that I cannot expect a quick fix as I'm using so many unstable versions everywhere, but I'd still be happy if someone could point me in the right direction so I can fork and fix it locally or maybe even PR.
I experience the same issue using [email protected]
Fix appears to be here: https://github.com/mipatterson/typedoc-plugin-pages/pull/41/files
Published to NPM w/ patch applied here: https://www.npmjs.com/package/typedoc-plugin-pages-fork
@mipatterson if you want another set of eyes to babysit, more than happy to assist with basic maintenance every now and then.
@dannyrb thank you for the fork. this solved it for me
@dannyrb Thank you for that, it fixed the issue for me as well!
Hi,
same issue here, I hope the pr will be merged asap.
Regards
@dannyrb thanks for creating the fork, can you confirm if search works for you? It seems like the search doesn't work with latest typedoc
Information for anyone stumbling upon this issue to get the pages plugin to work.
As of 2021-11-23
there is this repository, a fork and a fork of the fork:
- https://github.com/mipatterson/typedoc-plugin-pages
- https://www.npmjs.com/package/typedoc-plugin-pages-fork
- https://www.npmjs.com/package/typedoc-plugin-pages-fork-fork
None of them works with TypeDoc v0.22+
.
Hi,
thank you for the (unfortunate) update... Have you tried to write to the forks maintainers to see if they can upgrade the plugin?
Regards