Skip to content
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

own documentation generated wrong #27

Open
hohwille opened this issue Apr 26, 2021 · 6 comments
Open

own documentation generated wrong #27

hohwille opened this issue Apr 26, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@hohwille
Copy link
Member

hohwille commented Apr 26, 2021

https://repo1.maven.org/maven2/com/devonfw/tools/devonfw-docgen-pdf/5.0.2/devonfw-docgen-pdf-5.0.2.pdf

devonfw Documentation GeneratorDocGen  is  a  tool  that  can  generate  a  complete  and  self-contained  documentation  as  PDF,  ePub  orHTML from Asciidoc pages.
Unresolved directive in master.asciidoc - include::features.asciidoc[leveloffset=1]
Unresolved directive in master.asciidoc - include::usage.asciidoc[leveloffset=1]
Unresolved directive in master.asciidoc - include::guidelines.asciidoc[leveloffset=1]
Unresolved directive in master.asciidoc - include::migration.asciidoc[leveloffset=1]
Unresolved directive in master.asciidoc - include::tools.asciidoc[leveloffset=1]
Unresolved directive in master.asciidoc - include::credits.asciidoc[leveloffset=1]

Seems to be buggy as included files are in documentation subfolder that is not copied before generation.

@hohwille hohwille added the bug Something isn't working label Apr 26, 2021
@hohwille hohwille added this to the release:2021.04.002 milestone Apr 26, 2021
@hohwille
Copy link
Member Author

@maybeec maybeec removed this from the release:2021.12.001 milestone Dec 1, 2021
@hohwille
Copy link
Member Author

The problem seems to be that the generation always takes place in target/asciidoc directory.
However, here the main asciidoc to generate is not within that same folder but is ./documentation/master.asciidoc.
For some odd reason ascidoctor generator treats all links relative to the base directory where the generation started even if the main asciidoc file is located in a different folder.
So in the end we need to cd to the basedir of the target asciidoc or add a property to configure the base directory otherwise.

@hohwille
Copy link
Member Author

fixed in 2023.04.001.

@hohwille
Copy link
Member Author

hohwille commented Apr 17, 2023

Works fine locally but somehow fails on github:

Error:  Failed to execute goal org.asciidoctor:asciidoctor-maven-plugin:1.6.0:process-asciidoc (generate-doc) 
on project devonfw-docgen-init: 
Execution generate-doc of goal org.asciidoctor:asciidoctor-maven-plugin:1.6.0:process-asciidoc failed: 
org.jruby.exceptions.SystemCallError: (ENOENT) No such file or directory - 
/home/runner/work/docgen/docgen/init/target/asciidoc/master.asciidoc -> [Help 1]

The profile does not seem to get activated:

docgen/pom.xml

Lines 393 to 401 in 74febad

<id>documentation-folder</id>
<activation>
<file>
<exists>${basedir}/documentation/master.asciidoc</exists>
</file>
</activation>
<properties>
<docgen.asciidoc.basedir>${basedir}/target/asciidoc/documentation</docgen.asciidoc.basedir>
</properties>

Currently clueless why this works on my local windows machine but not on github,...

@hohwille hohwille reopened this Apr 17, 2023
hohwille added a commit that referenced this issue Apr 17, 2023
@hohwille
Copy link
Member Author

I do not have time for this nuts. I just reverted the fix and will release now (again with broken documentation as all the time).

@hohwille
Copy link
Member Author

For the record: I also tried it with KISS and moved the master.asciidoc out of the documentation folder and changed the include paths and docgen.asciidoc.page but that did not work either...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants