no-stack-dub-sack / apexdox-vs-code

A lightweight VS Code extension that makes documenting your Salesforce Apex files an easy, integrated experience.
Other
49 stars 7 forks source link

no homePagePath parameter required, but missing #78

Closed docbill closed 1 year ago

docbill commented 1 year ago

I started to receive the error:

Value for 'homePagePath' parameter: 'undefined' is invalid. Please provide a valid directory.

when running apexdox. This error is new, I haven't seen it before. The documentation says the absolute path to a file that contains information about my project, and provides little information about what it is expecting to be in that file.

Even if I had such a file, I probably would not want to specify an absolute path, as I would want it to point to something in my current folder.

docbill commented 1 year ago

Note: If I provide a value such as /tmp/index.html I get the error:

Value for 'homePagePath' parameter: 'undefined' is invalid. Please provide a valid directory.

no-stack-dub-sack commented 1 year ago

Thanks @docbill, I'll look into this. Interesting - I haven't seen this one in recent tests of the latest version. Can you please confirm your version number and provide a bit more detail about what kind of config file you use and share an example configuration?

no-stack-dub-sack commented 1 year ago

In general homePathPath expects a value like this: "apexdox.engine.homePagePath": "${workspaceFolder}/src/Homepage.html" and its purpose is to provide some markup to describe your project to serve as your documentation homepage.

What value did you have here before? Did your config file just not have this key? If so, I'm guessing you see this markup as your homepage?

<h2>
  Project Home
</h2>
<p>
  Use the <code class="code-inline">apexdox.homePagePath</code> setting
  to point to an HTML file that contains details about your project.
  The body of the HTML will show up here instead of this default!
</p>

Anyway, I think I know the issue and will work on fixing it in the next couple of days or so.

no-stack-dub-sack commented 1 year ago

Also, if this is blocking you, you can install one of the previous versions which should fix it for the time being.

docbill commented 1 year ago

It was never set before. I set it to be the same index.html file that is created. As without a working example, I really don't know what to put in this file. And if it just authoring a webpage that fits in a frame it isn't really something I have time to do. The main problem with referencing the index.html output file, is my typically way of updating the files is no clear the folder first, so I can make sure I don't keep unreferenced files for ever. So now I need to remember not to delete the index.html file.

no-stack-dub-sack commented 1 year ago

@docbill I've opened a PR that fixes the issue, so once its released you should be able to continue with your normal workflow without any issues. I'll get it released at some point today.

no-stack-dub-sack commented 1 year ago

@docbill this fix has been released. please give it a try (no need to include a homePagePath setting).