-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Output of JBake compilation is incorrect #11
Comments
Yes, there is an issue with the output dir, that's why we there is that FIXME. We require most probably a solution specific to the selected JBake version. TBH, I'm not exactly sure what you're proposing to solve the issue. Create an FTR, here is my Gitter question about this issue: https://gitter.im/jbake-org/jbake?at=5c68865080df6804a1b83744 Unfortunately, there was no response. |
Here is the relevant PR in JBake repo Unfortunately, it's from 2019, yet not merged 🤔 |
From the JBake usage help, you could try to specify to destination directory as a second argument. Can you try that? |
Yes. Exactly that.
That was what I was afraid of. Hence the suggestion of making the change on this side. |
I assume you referring to the "baking"? As I said above, serving won't work because it always appends the ./mill -i site.jbakeRun -b /home/hmf/VSCodeProjects/hashnode-pubs/site/src /home/hmf/VSCodeProjects/hashnode-pubs/out/site/jbake.dest/ouput Note that I am forced to set |
I was hoping JBake's behavior had not changed. Hence the suggestion "just" to conform to the "server path". I see now this is not quite as simple. 8-( |
From a short look at the source code of JBake, I think it will use the specified destination directory as a base for serving, but only when it is given explicitly. This requires to specify it somehow. But I lack the time and a useful test project to try that atm. Could you checkout and patch mill-jbake locally to test your approach? If it works somehow you already have a draft PR, which I can take over. |
@hmf Can you checkout and test this branch? Build with:
Then use version |
@lefou Tested. Repeated the init, bake and serve. Worked perfectly. I looked for the
I am curious, how did you do that? Thank you very much. |
I was trying to serve the site using the following command:
Unfortunately that will fail because JBake serving expects the site to be in an
output
directory. In my case thejbake
command placed the compile site into:But as the output below shows, serving requires the output to be in:
Here is the output:
The JBake documentation says:
I don't think the FIXME of the
def jbakeServe(): Command[Unit]
target is the problem. I am assuming that thedef jbake: T[PathRef]
target is setting both the input and output directories. So to solve this I think it is only necessary to add an/output
to thejbake
output path. Note that setting the path in the server command doesn't help because JBake always adds/output
to the path. Here is an example showing this:And here is the output:
The text was updated successfully, but these errors were encountered: