Gitea version 8670dec built with: bindata, sqlite
git version 2.15.3
[x]
):Hello,
I'm currently using asciidoctor
to render asciidoc readme files. These files contains include directives that the current process is unable to render correctly. The failure message displayed is Unresolved directive in <stdin> - include::filepath[]
My current understanding is that asciidoctor
is unable to find the included file from the environment it is run within. This seems pretty obvious as the content to render is given through the standard input.
Is there a way to circumvent this issue ?
What is the environment in which an external renderer is run within in order to produce the displayed markup ?
Could you have a similiar config with below?
[markup.asciidoc]
ENABLED = true
FILE_EXTENSIONS = .adoc,.asciidoc
RENDER_COMMAND = "asciidoctor --out-file=- -"
; Input is not a standard input but a file
IS_INPUT_FILE = false
Could you have a similiar config with below?
[markup.asciidoc] ENABLED = true FILE_EXTENSIONS = .adoc,.asciidoc RENDER_COMMAND = "asciidoctor --out-file=- -" ; Input is not a standard input but a file IS_INPUT_FILE = false
This is in fact my current configuration (taken as is from here).
@lunny Is there a way to pass asciidoctor
a path to the project sources by using the --base-dir
option?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Sorry to insist but the current way to integrate external renderers by using the standard input to feed them will not work for any renderer using other files from the project (for instance in case of document sources including project files).
It seems to me that Asciidoctor is just an example among others.
As Gitea is a collaborative project, I also totally understand that this issue cannot be resolved for now unless someone skilled enough has the time to handle it but I do not understand how closing automatically the issue will help.
Am I the only one thinking that the current external renderer integration method cannot cover all use cases?
Perhaps an agreement on this point is necessary as a preamble to adding an item in the Gitea roadmap?
Why don't you write a script that will set up the environment correctly for ascidoctor?
You can send the stdin to a temporary file run ascidoctor on that or deal with the input file and then cat the output back out.
@zeripath Are you saying that this script would be executed instead of asciidoctor and will hand the missing elements over to asciidoctor once it gathered all the missing pieces?
How is this script supposed to access the other files of the git repository where the document source is located? This script will get the same data than asciidoctor, that is a standard input with the content of the document source to process but no information about where to get the other parts of the git repository.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Interested as well in a solution to this problem. Including other files doesn't work with e.g. AsciiDoc which is unfortunate because it's a great feature. As such, our documentation cannot be properly viewed from Gitea.
@gautaz Thanks for opening this issue ;)
Most helpful comment
Interested as well in a solution to this problem. Including other files doesn't work with e.g. AsciiDoc which is unfortunate because it's a great feature. As such, our documentation cannot be properly viewed from Gitea.
@gautaz Thanks for opening this issue ;)