typedoc-plugin-pages icon indicating copy to clipboard operation
typedoc-plugin-pages copied to clipboard

Usage with [email protected]

Open KnorpelSenf opened this issue 4 years ago • 9 comments

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.

KnorpelSenf avatar Dec 14 '20 00:12 KnorpelSenf

I experience the same issue using [email protected]

dannyrb avatar Jan 14 '21 22:01 dannyrb

Fix appears to be here: https://github.com/mipatterson/typedoc-plugin-pages/pull/41/files

dannyrb avatar Jan 15 '21 01:01 dannyrb

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 avatar Jan 15 '21 01:01 dannyrb

@dannyrb thank you for the fork. this solved it for me

francoisromain avatar Jan 27 '21 16:01 francoisromain

@dannyrb Thank you for that, it fixed the issue for me as well!

sl1g18 avatar Feb 04 '21 19:02 sl1g18

Hi,

same issue here, I hope the pr will be merged asap.

Regards

FStefanni avatar Feb 05 '21 15:02 FStefanni

@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

vipulgupta2048 avatar Jul 07 '21 16:07 vipulgupta2048

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+.

nifr avatar Nov 23 '21 11:11 nifr

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

FStefanni avatar Nov 23 '21 15:11 FStefanni