Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find resource markdown-page.hbs #15

Open
alexandercerutti opened this issue May 7, 2020 · 8 comments
Open

Cannot find resource markdown-page.hbs #15

alexandercerutti opened this issue May 7, 2020 · 8 comments
Assignees
Labels

Comments

@alexandercerutti
Copy link

alexandercerutti commented May 7, 2020

Hi @mipatterson, thank you for this plugin.

I've installed the plugin and tried to build the docs. I receive the message

Cannot find resource `markdown-page.hbs`

as shown in the screenshot below. I don't know what could be the cause of this.

image

I'm using typedoc v0.17.6, typedoc-plugin-pages v1.0.1 and this is the configuration I used. It has been inserted in the tsconfig.json file, inside the object typedocOptions.

    "pages": {
      "groups": [{
        "title": "0.4.x to 0.5.0 Migration Guide",
        "path": "./docFiles/migrationGuide0.4.x-0.5.x"
      }],
      "output": "pages",
      "theme": "pages-plugin",
    }

My tsconfig.json is sibling of ./docFiles/ folder.
Thank you!

@mipatterson
Copy link
Owner

The markdown-page.hbs file is the theme's handlebars template for rendering pages generated by this plugin. @alexandercerutti, could you double check that that file exists in /node_modules/typedoc-plugin-pages/dist/theme/v2/templates?

If that file is indeed there, then I suspect that the root cause could be a cross-platform issue. I can see from the screenshot that you are on a Mac. I developed the plugin on my Windows machine. I will try to reproduce this issue on my Mac, when I get a chance. If I see the issue there, I should be able to get a fix in.

@alexandercerutti
Copy link
Author

alexandercerutti commented May 7, 2020

I have it inside the folder. Yes, I'm on MacOS. Okay, I'll wait for updates. Thank you again. 😄

@alexandercerutti
Copy link
Author

Hi, are there any updates? I'd like to look into the issue too, but I don't know where to start. 😄🤔

@gino8080
Copy link

Hello I have a similar problem with the markdown plugin

here is the output

npx typedoc                              
Loaded plugin /Volumes/.../node_modules/typedoc-plugin-markdown
Loaded plugin /Volumes/.../node_modules/typedoc-plugin-pages

Using TypeScript 3.9.3 from /Volumes/.../node_modules/typescript/lib
ENOENT: no such file or directory, stat '/Volumes/.../node_modules/typedoc-plugin-markdown/dist/resources/assets'

this are my settings inside tsconfig.json (altro tried using a separate pagesconfig.json)

 "typedocOptions": {
    "inputFiles": [
      "./lib"
    ],
    "mode": "library",
    "out": "documentation/dist",
    "excludeNotExported": true,
    "excludePrivate": true,
    "excludeProtected": true,
    "disableSources": true,
    "theme": "pages-plugin",
    "pages": {
      "groups": [
        {
          "title": "Documentation",
          "pages": [
            {
              "title": "My Page",
              "path": "./documentation/index.md"
            }
          ]
        }
      ],
      "theme": "pages-plugin"
    }
  }

@IchZerowan
Copy link

IchZerowan commented Jun 8, 2020

Reproduceavble with typedoc 0.17.7 on Windows.

UPD: I was using the default TypeDoc theme instead of this plugin's one, with a proper theme everything is OK

@mipatterson mipatterson added the bug Something isn't working correctly label Nov 16, 2020
@MCluck90
Copy link
Contributor

For what it's worth, I ran in to this problem when I wanted to use my own custom theme. I found out that I needed to create this file:

path/to/theme/templates/markdown-page.hbs

Here's the contents of that file:

<div class="tsd-panel tsd-typography">
    {{#markdown}}{{{model.pagesPlugin.item.contents}}}{{/markdown}}
</div>

@mipatterson
Copy link
Owner

mipatterson commented Nov 25, 2020

@alexandercerutti

Sorry for the slow response. I've had a surprisingly small amount of time to dedicate to this project in 2020, considering quarantine.

I think it's likely that you're running into the same issue as @IchZerowan and @MCluck90. Make sure that you're telling TypeDoc to use the pages-plugin theme according to the TypeDoc documentation, here.

Previous plugin documentation incorrectly indicated that you could specify the theme in the Pages Plugin configuration object (like it appears you have above). The documentation has since been corrected. You should move the following line from the Pages Plugin configuration portion of your configuration to the top-level TypeDoc configuration:

"theme": "pages-plugin",

@mipatterson mipatterson self-assigned this Nov 25, 2020
@mipatterson mipatterson added question and removed bug Something isn't working correctly labels Nov 25, 2020
@alexandercerutti
Copy link
Author

Hi @mipatterson
Well, a lot of time passed and we needed the plugin for the project at work. We had to workaround the docs generation in another way. Sadly I won't be able to test this again soon... So for the moment, thank you for your reply. I'll see if I'll be able to look at this plug-in again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants