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

Empty output.extension causes NPE #234

Closed
puredanger opened this Issue Nov 4, 2015 · 7 comments

Comments

Projects
None yet
2 participants
@puredanger

puredanger commented Nov 4, 2015

The commit:
17a4372
for issue #233 causes NPEs on baking:

java.lang.NullPointerException: null
at org.jbake.app.Renderer.createWriter(Renderer.java:104) ~[jbake-core.jar:na]
at org.jbake.app.Renderer.render(Renderer.java:90) ~[jbake-core.jar:na]
at org.jbake.app.Oven.bake(Oven.java:157) ~[jbake-core.jar:na]
at org.jbake.launcher.Main.bake(Main.java:50) ~[jbake-core.jar:na]
at org.jbake.launcher.Main.run(Main.java:86) ~[jbake-core.jar:na]
at org.jbake.launcher.Main.main(Main.java:36) ~[jbake-core.jar:na]

Run with master at the point of the commit above. To reproduce:

jbake -i foo
cd foo
modify jbake.properties to include "output.extension="
jbake -b

@jonbullock jonbullock added the bug label Nov 4, 2015

@jonbullock jonbullock added this to the v2.5.0 milestone Nov 4, 2015

@jonbullock jonbullock self-assigned this Nov 4, 2015

@jonbullock

This comment has been minimized.

Show comment
Hide comment
@jonbullock

jonbullock Nov 4, 2015

Member

Thanks for reporting this... I'll commit a fix shortly, a workaround is to fully quality the source and destination folders while baking. I was testing last night using fully qualified paths!

Member

jonbullock commented Nov 4, 2015

Thanks for reporting this... I'll commit a fix shortly, a workaround is to fully quality the source and destination folders while baking. I was testing last night using fully qualified paths!

@jonbullock jonbullock closed this in 84b8f3d Nov 4, 2015

@puredanger

This comment has been minimized.

Show comment
Hide comment
@puredanger

puredanger Nov 4, 2015

That does seem to fix that issue, however xref links from asciidoc source files seem to still be rendered with the .html extension, so all cross-doc links are broken.

I really appreciate you looking at this by the way, and I'm sorry to be whack-a-mole'ing you with problems like this. Thank you for all the work on JBake - it's so very very close to exactly what I need.

puredanger commented Nov 4, 2015

That does seem to fix that issue, however xref links from asciidoc source files seem to still be rendered with the .html extension, so all cross-doc links are broken.

I really appreciate you looking at this by the way, and I'm sorry to be whack-a-mole'ing you with problems like this. Thank you for all the work on JBake - it's so very very close to exactly what I need.

@jonbullock

This comment has been minimized.

Show comment
Hide comment
@jonbullock

jonbullock Nov 4, 2015

Member

Ah I have a suspicion that Asciidoctor is assuming that the output files will always have a .html file extension which is causing the problem with xref's. Let me do some digging...

Thanks for the feedback... I've been reading your blog for a number of years so it's great to see you using my humble little tool!

Member

jonbullock commented Nov 4, 2015

Ah I have a suspicion that Asciidoctor is assuming that the output files will always have a .html file extension which is causing the problem with xref's. Let me do some digging...

Thanks for the feedback... I've been reading your blog for a number of years so it's great to see you using my humble little tool!

@puredanger

This comment has been minimized.

Show comment
Hide comment
@puredanger

puredanger Nov 4, 2015

Working on an overhaul for a very visible site with jbake... stay tuned. :)

puredanger commented Nov 4, 2015

Working on an overhaul for a very visible site with jbake... stay tuned. :)

@jonbullock

This comment has been minimized.

Show comment
Hide comment
@jonbullock

jonbullock Nov 4, 2015

Member

Excellent!

Looks like you can control the file default suffix using the outfilesuffix attribute: http://asciidoctor.org/docs/user-manual/#navigating-between-source-files

Whether it allows an empty value though is a different matter...

Member

jonbullock commented Nov 4, 2015

Excellent!

Looks like you can control the file default suffix using the outfilesuffix attribute: http://asciidoctor.org/docs/user-manual/#navigating-between-source-files

Whether it allows an empty value though is a different matter...

@puredanger

This comment has been minimized.

Show comment
Hide comment
@puredanger

puredanger Nov 5, 2015

That works!

I was able to get everything working by setting the following properties in jbake.properties:

output.extension=
outfilesuffix=
asciidoctor.attributes.export=true

puredanger commented Nov 5, 2015

That works!

I was able to get everything working by setting the following properties in jbake.properties:

output.extension=
outfilesuffix=
asciidoctor.attributes.export=true
@jonbullock

This comment has been minimized.

Show comment
Hide comment
@jonbullock

jonbullock Nov 5, 2015

Member

Excellent, I'll be sure to include details on how to achieve this goal in the docs.

Member

jonbullock commented Nov 5, 2015

Excellent, I'll be sure to include details on how to achieve this goal in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment