mipatterson / typedoc-plugin-pages

A TypeDoc plugin that lets you integrate your own pages into the documentation output
Apache License 2.0
37 stars 21 forks source link

Usage with typedoc@0.20.0-beta.24 #47

Open KnorpelSenf opened 3 years ago

KnorpelSenf commented 3 years ago

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. typedoc@0.20.0-beta.24 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 git@github.com: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.

dannyrb commented 3 years ago

I experience the same issue using TypeDoc@0.20.13

dannyrb commented 3 years ago

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

dannyrb commented 3 years ago

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.

francoisromain commented 3 years ago

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

sl1g18 commented 3 years ago

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

FStefanni commented 3 years ago

Hi,

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

Regards

vipulgupta2048 commented 3 years ago

@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

nifr commented 2 years ago

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:

None of them works with TypeDoc v0.22+.

FStefanni commented 2 years ago

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