ahus1 / keycloak-antora

Proof-of-concept on how Antora can be used for Keycloak
https://ahus1.github.io/keycloak-antora/
2 stars 2 forks source link

missing `asciidoctor-pdf` #4

Closed themr0c closed 1 year ago

themr0c commented 1 year ago
$ cd antora
$ yarn install
yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > asciidoctor-highlight.js@0.4.0" has unmet peer dependency "@asciidoctor/core@>=2.0.0 <2.3.0".
warning " > asciidoctor-kroki@0.16.0" has unmet peer dependency "@asciidoctor/core@~2.2".
warning Workspaces can only be enabled in private projects.
[4/4] Building fresh packages...

Done in 7.14s.
$ yarn run author
yarn run v1.22.17
$ antora --stacktrace --redirect-facility static antora-playbook-author.yml
[10:02:33.210] WARN (@antora/asciidoc-loader): Skipping reference to missing attribute 'project_versionLinks' in value of 'project_doc_base_url' attribute
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/antora/antora-playbook-author.yml
[10:02:33.215] WARN (@antora/asciidoc-loader): Skipping reference to missing attribute 'project_versionDoc' in value of 'apidocs_link' attribute
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/antora/antora-playbook-author.yml
[10:02:33.216] WARN (@antora/asciidoc-loader): Skipping reference to missing attribute 'project_versionDoc' in value of 'apidocs_javadocs_link' attribute
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/antora/antora-playbook-author.yml
[10:02:33.217] WARN (@antora/asciidoc-loader): Skipping reference to missing attribute 'project_versionDoc' in value of 'apidocs_adminrest_link' attribute
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/antora/antora-playbook-author.yml
[10:02:37.676] WARN (asciidoctor): skipping reference to missing attribute: version
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/doc/guides-operator/modules/ROOT/pages/installation.adoc
    source: /home/ffloreth/src/gh/upstream/keycloak-antora (branch: main <worktree> | start path: doc/guides-operator)
[10:02:37.677] WARN (asciidoctor): skipping reference to missing attribute: version
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/doc/guides-operator/modules/ROOT/pages/installation.adoc
    source: /home/ffloreth/src/gh/upstream/keycloak-antora (branch: main <worktree> | start path: doc/guides-operator)
[10:02:37.678] WARN (asciidoctor): skipping reference to missing attribute: version
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/doc/guides-operator/modules/ROOT/pages/installation.adoc
    source: /home/ffloreth/src/gh/upstream/keycloak-antora (branch: main <worktree> | start path: doc/guides-operator)
[10:02:40.274] WARN (asciidoctor): skipping reference to missing attribute: realm
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/doc/server-admin/modules/ROOT/pages/assembly-managing-clients.adoc
    source: /home/ffloreth/src/gh/upstream/keycloak-antora (branch: main <worktree> | start path: doc/server-admin)
[10:02:41.362] WARN (asciidoctor): skipping reference to missing attribute: domain
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/doc/server-admin/modules/ROOT/pages/authentication/flows.adoc
    source: /home/ffloreth/src/gh/upstream/keycloak-antora (branch: main <worktree> | start path: doc/server-admin)
[10:02:41.363] WARN (asciidoctor): skipping reference to missing attribute: realmname
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/doc/server-admin/modules/ROOT/pages/authentication/flows.adoc
    source: /home/ffloreth/src/gh/upstream/keycloak-antora (branch: main <worktree> | start path: doc/server-admin)
[10:02:41.364] WARN (asciidoctor): skipping reference to missing attribute: client-id
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/doc/server-admin/modules/ROOT/pages/authentication/flows.adoc
    source: /home/ffloreth/src/gh/upstream/keycloak-antora (branch: main <worktree> | start path: doc/server-admin)
[10:02:41.364] WARN (asciidoctor): skipping reference to missing attribute: redirect-uri
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/doc/server-admin/modules/ROOT/pages/authentication/flows.adoc
    source: /home/ffloreth/src/gh/upstream/keycloak-antora (branch: main <worktree> | start path: doc/server-admin)
[10:02:41.938] WARN (asciidoctor): skipping reference to missing attribute: realm-name
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/doc/server-admin/modules/ROOT/pages/identity-broker/saml.adoc
    source: /home/ffloreth/src/gh/upstream/keycloak-antora (branch: main <worktree> | start path: doc/server-admin)
[10:02:41.939] WARN (asciidoctor): skipping reference to missing attribute: broker-alias
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/doc/server-admin/modules/ROOT/pages/identity-broker/saml.adoc
    source: /home/ffloreth/src/gh/upstream/keycloak-antora (branch: main <worktree> | start path: doc/server-admin)
[10:02:41.940] WARN (asciidoctor): skipping reference to missing attribute: realm-name
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/doc/server-admin/modules/ROOT/pages/identity-broker/saml.adoc
    source: /home/ffloreth/src/gh/upstream/keycloak-antora (branch: main <worktree> | start path: doc/server-admin)
[10:02:41.940] WARN (asciidoctor): skipping reference to missing attribute: broker-alias
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/doc/server-admin/modules/ROOT/pages/identity-broker/saml.adoc
    source: /home/ffloreth/src/gh/upstream/keycloak-antora (branch: main <worktree> | start path: doc/server-admin)
[10:02:42.077] WARN (asciidoctor): skipping reference to missing attribute: realm
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/doc/server-admin/modules/ROOT/pages/identity-broker/tokens.adoc
    source: /home/ffloreth/src/gh/upstream/keycloak-antora (branch: main <worktree> | start path: doc/server-admin)
[10:02:42.077] WARN (asciidoctor): skipping reference to missing attribute: provider_alias
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/doc/server-admin/modules/ROOT/pages/identity-broker/tokens.adoc
    source: /home/ffloreth/src/gh/upstream/keycloak-antora (branch: main <worktree> | start path: doc/server-admin)
[10:02:46.145] WARN (asciidoctor): skipping reference to missing attribute: version
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/doc/guides-operator/modules/ROOT/pages/installation.adoc
    source: /home/ffloreth/src/gh/upstream/keycloak-antora (branch: main <worktree> | start path: doc/guides-operator)
[10:02:46.146] WARN (asciidoctor): skipping reference to missing attribute: version
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/doc/guides-operator/modules/ROOT/pages/installation.adoc
    source: /home/ffloreth/src/gh/upstream/keycloak-antora (branch: main <worktree> | start path: doc/guides-operator)
[10:02:46.147] WARN (asciidoctor): skipping reference to missing attribute: version
    file: /home/ffloreth/src/gh/upstream/keycloak-antora/doc/guides-operator/modules/ROOT/pages/installation.adoc
    source: /home/ffloreth/src/gh/upstream/keycloak-antora (branch: main <worktree> | start path: doc/guides-operator)
[10:02:52.114] FATAL (antora): Command failed: bundle exec asciidoctor-pdf -a toclevels=5 -a env=site -a env-site -a site-gen=antora -a site-gen-antora -a attribute-missing=warn -a !data-uri -a icons=font -a sectanchors -a site-title=Keycloak Docs -a site-url=http://localhost:5000/keycloak-antora/ -a kroki-fetch-diagram=true -a idprefix -a idseparator=- -a experimental -a page-pagination -a project_name=Keycloak -a project_name_full=Keycloak -a project_community=true -a !project_product=@ -a project_images=keycloak-images -a project_doc_base_url=https://www.keycloak.org/docs/{project_versionLinks} -a project_doc_base_url_latest=https://www.keycloak.org/docs/latest -a project_versionLinks=latest -a project_dirref=KEYCLOAK_HOME -a project_openshift_product_name=Keycloak for OpenShift -a kc_realms_path=/realms -a kc_admins_path=/admin -a kc_js_path=/js -a kc_base_path -a project_operator=Keycloak Operator -a operatorRepo_link=https://github.com/keycloak/keycloak-operator -a application_monitoring_operator=Application Monitoring Operator -a application_monitoring_operator_installation_link=https://github.com/integr8ly/application-monitoring-operator#installation -a create_cmd=kubectl apply -a create_cmd_brief=kubectl -a jdgserver_name=Infinispan -a jdgserver_version=9.4.19 -a jdgserver_version_latest=11.0.9 -a jdgserver_crossdcdocs_link=https://infinispan.org/docs/11.0.x/titles/xsite/xsite.html -a subsystem_undertow_xml_urn=urn:jboss:domain:undertow:12.0 -a subsystem_infinispan_xml_urn=urn:jboss:domain:infinispan:12.0 -a subsystem_datasources_xml_urn=urn:jboss:domain:datasources:6.0 -a saml_adapter_xsd_urn=https://www.keycloak.org/schema/keycloak_saml_adapter_1_10.xsd -a !tech_feature_disabled=@ -a quickstartRepo_link=https://github.com/keycloak/keycloak-quickstarts -a quickstartRepo_name=Keycloak Quickstarts Repository -a quickstartRepo_dir=keycloak-quickstarts -a authorizationguide_name=Authorization Services Guide -a authorizationguide_name_short=Authorization Services -a authorizationguide_link=https://www.keycloak.org/docs/{project_versionLinks}/authorization_services/ -a authorizationguide_link_latest=https://www.keycloak.org/docs/latest/authorization_services/ -a adapterguide_name=Securing Applications and Services Guide -a adapterguide_name_short=Securing Apps -a adapterguide_link=https://www.keycloak.org/docs/{project_versionLinks}/securing_apps/ -a adapterguide_link_js_adapter=https://www.keycloak.org/docs/{project_versionLinks}/securing_apps/#_javascript_adapter -a adapterguide_link_latest=https://www.keycloak.org/docs/latest/securing_apps/ -a adapterguide_logout_link=https://www.keycloak.org/docs/{project_versionLinks}/securing_apps/#_java_adapter_logout -a adminguide_name=Server Administration Guide -a adminguide_name_short=Server Administration -a adminguide_link=https://www.keycloak.org/docs/{project_versionLinks}/server_admin/ -a adminguide_link_latest=https://www.keycloak.org/docs/latest/server_admin/ -a adminguide_bruteforce_name=Password guess: brute force attacks -a adminguide_bruteforce_link=https://www.keycloak.org/docs/{project_versionLinks}/server_admin/#password-guess-brute-force-attacks -a adminguide_timeouts_name=Timeouts -a adminguide_timeouts_link=https://www.keycloak.org/docs/{project_versionLinks}/server_admin/#_timeouts -a adminguide_clearcache_name=Clearing Server Caches -a adminguide_clearcache_link=https://www.keycloak.org/docs/{project_versionLinks}/server_admin/#_clear-cache -a apidocs_name=API Documentation -a apidocs_link=https://www.keycloak.org/docs/{project_versionDoc}/api_documentation/ -a developerguide_name=Server Developer Guide -a developerguide_name_short=Server Developer -a developerguide_link=https://www.keycloak.org/docs/{project_versionLinks}/server_development/ -a developerguide_link_latest=https://www.keycloak.org/docs/latest/server_development/ -a developerguide_deploying_themes=https://www.keycloak.org/docs/{project_versionLinks}/server_development/#deploying-themes -a developerguide_actiontoken_name=Action Token SPI -a developerguide_actiontoken_link=https://www.keycloak.org/docs/{project_versionLinks}/server_development/#_action_token_spi -a developerguide_jsproviders_name=JavaScript Providers -a developerguide_jsproviders_link=https://www.keycloak.org/docs/{project_versionLinks}/server_development/#_script_providers -a gettingstarted_name=Getting Started Guide -a gettingstarted_name_short=Getting Started -a gettingstarted_link=https://www.keycloak.org/guides#getting-started -a gettingstarted_link_latest=https://www.keycloak.org/guides#getting-started -a upgradingguide_name=Upgrading Guide -a upgradingguide_name_short=Upgrading -a upgradingguide_link=https://www.keycloak.org/docs/{project_versionLinks}/upgrading/ -a upgradingguide_link_latest=https://www.keycloak.org/docs/latest/upgrading/ -a releasenotes_name=Release Notes -a releasenotes_name_short=Release Notes -a releasenotes_link=https://www.keycloak.org/docs/{project_versionLinks}/release_notes/ -a releasenotes_link_latest=https://www.keycloak.org/docs/latest/release_notes/ -a apidocs_javadocs_name=JavaDocs Documentation -a apidocs_javadocs_link=https://www.keycloak.org/docs-api/{project_versionDoc}/javadocs/ -a apidocs_adminrest_name=Administration REST API -a apidocs_adminrest_link=https://www.keycloak.org/docs-api/{project_versionDoc}/rest-api/ -a appserver_name=WildFly -a appserver_dirref=WILDFLY_HOME -a appserver_version=23 -a appserver_doc_base_url=http://docs.wildfly.org/23 -a appserver_socket_link=http://docs.wildfly.org/23/Admin_Guide.html#Interfaces_and_ports -a appserver_socket_name=WildFly 23 Documentation -a appserver_jgroups_link=http://docs.wildfly.org/23/High_Availability_Guide.html#JGroups_Subsystem -a appserver_jgroups_name=WildFly 23 Documentation -a appserver_jpa_link=http://docs.wildfly.org/23/Developer_Guide.html#hibernate-properties -a appserver_jpa_name=WildFly 23 Development Guide -a appserver_network_link=http://docs.wildfly.org/23/Admin_Guide.html#Interfaces_and_ports -a appserver_network_name=WildFly 23 Documentation -a appserver_datasource_link=http://docs.wildfly.org/23/Admin_Guide.html#DataSource -a appserver_datasource_name=WildFly 23 Documentation -a appserver_caching_link=http://docs.wildfly.org/23/High_Availability_Guide.html#Infinispan_Subsystem -a appserver_caching_name=WildFly 23 Documentation -a appserver_admindoc_link=http://docs.wildfly.org/23/Admin_Guide.html -a appserver_admindoc_name=WildFly 23 Documentation -a appserver_loadbalancer_link=http://docs.wildfly.org/23/High_Availability_Guide.html -a appserver_loadbalancer_name=WildFly 23 Documentation -a standalone -a !api-management -a on-prem -a project_version=20.0.0 -a project_versionMvn=20.0.0 -a project_versionNpm=20.0.0 -a project_versionDoc=20 -a revdate=2022-09-26 -a !page-partial -a doctype=book -a docfile=20.0@server-admin::pdf$keycloak-server-administration.adoc -a docfilesuffix=.adoc -a docname@=keycloak-server-administration -a imagesdir=/home/ffloreth/src/gh/upstream/keycloak-antora/antora/build/assembler -o /home/ffloreth/src/gh/upstream/keycloak-antora/antora/build/assembler/server-admin/20.0/keycloak-server-administration.pdf -
bundler: failed to load command: asciidoctor-pdf (/usr/bin/asciidoctor-pdf)
/usr/share/gems/gems/bundler-2.3.7/lib/bundler/definition.rb:481:in `materialize': Could not find asciidoctor-pdf-2.3.2, treetop-1.6.11, css_parser-1.12.0, pdf-reader-2.10.0, addressable-2.8.1, public_suffix-5.0.0 in any of the sources (Bundler::GemNotFound)
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/definition.rb:190:in `specs'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/definition.rb:238:in `specs_for'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/runtime.rb:18:in `setup'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler.rb:151:in `setup'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/setup.rb:20:in `block in <top (required)>'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/ui/shell.rb:136:in `with_level'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/ui/shell.rb:88:in `silence'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/setup.rb:20:in `<top (required)>'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:56:in `require_relative'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:56:in `kernel_load'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:23:in `run'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/cli.rb:484:in `exec'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/cli.rb:31:in `dispatch'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/cli.rb:25:in `start'
        from /usr/share/gems/gems/bundler-2.3.7/libexec/bundle:48:in `block in <top (required)>'
        from /usr/share/gems/gems/bundler-2.3.7/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
        from /usr/share/gems/gems/bundler-2.3.7/libexec/bundle:36:in `<top (required)>'
        from /home/ffloreth/bin/bundle:23:in `load'
        from /home/ffloreth/bin/bundle:23:in `<main>'

    Cause: Error
        at ChildProcess.<anonymous> (/home/ffloreth/src/gh/upstream/keycloak-antora/antora/node_modules/@antora/assembler/lib/util/run-command.js:40:16)
        at ChildProcess.emit (node:events:520:28)
        at maybeClose (node:internal/child_process:1092:16)
        at Socket.<anonymous> (node:internal/child_process:451:11)
        at Socket.emit (node:events:520:28)
        at Pipe.<anonymous> (node:net:687:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
themr0c commented 1 year ago

This issue is still valid after the switch to npm.

ahus1 commented 1 year ago

Thanks for letting me know; it seems that you tried to install the Node version of the asciidoctor-pdf.

I'd recommend to install the ruby based asciidoctor-pdf. They produce very different results and aimed for different purposes. As the layout is not too complicated, I'd recommend to use the ruby variant.

To have a look at the generated AsciiDoc files, you could choose to let it fail, and the AsciiDoc files are created anyway.

The command to run would be bundle install in the antora folder.

themr0c commented 1 year ago

Note, when installing Node.js asciidoctor-pdf, I got this warning afterwards:

WARN: `asciidoctor-pdf` is deprecated and will be removed in a future version, please use `asciidoctor-web-pdf` instead
ahus1 commented 1 year ago

Thanks - I updated the antora/README.adoc to include a description on how to install the Ruby based asciidoctor-pdf.

There are now also two author playbooks, one with PDF (slow) and the other one without PDF (fast).