-
Notifications
You must be signed in to change notification settings - Fork 122
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
added outputFile option to override the generated filename #301
Conversation
I see no problem with the PR, but I feel we need to warn that files may be overwritten. We could add a warning message in the code, or just state this in the documentation. wdyt? Btw, AppVeyor passed OK. |
Also, it's worth mentioning that the path in |
2 similar comments
I would add it to the documentation. It does the same as the -o, --out-file=OUT_FILE command line option from the asciidoc CLI command. |
Perfect! Do you want to it yourself to this PR? Or else, I can find some time tomorrow to do it. |
I have added it to the README.adoc. I hope the wording is ok. 😏 I wasn't able to do the 汉语 translation, though. 😁 |
1 similar comment
README.adoc
Outdated
@@ -130,6 +130,7 @@ When converting to HTML, images must be copied to the output location so that th | |||
<resources> | |||
---- | |||
outputDirectory:: defaults to `${project.build.directory}/generated-docs` | |||
outputFile:: defaults to `null`, can be used to override the name of the generated output file. This is useful for backends, that create a single file, e.g. the pdf backend. All output will be redirected to the same file, the same way as the `-o, --out-file=OUT_FILE` option from the `asciidoc` CLI command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean asciidoctor
command right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, have fixed it. But I just checked, the asciidoc command supports the same parameter, so I wasn't wrong 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. My comment is just cause I want to avoid controversy with the python implementation.
I have one minor comment. I typo a guess :P |
1 similar comment
I would say that it should only be used if there's exactly one input file. An alternative would be to use it, but warn if there's more than one input file. Either way, I agree it shouldn't silently work if there are multiple input files. |
I was happy with the mention in the README, but we can add a explicit warning in the build process. |
I was just thinking that if there is more than one file being processed (which the plugin should know), then it's a warning. This feature is essentially mutually exclusive to processing more than one file. |
But if files are in different directories and |
The asciidoctor CLI allows to override the output filename with the -o, --out-file arguments. This change allows to do the same with the maven plugin.
This allows for example to include the project version in the filename: