Skip to content

Add Asciidoctor Web PDF#244

Open
diguage wants to merge 3 commits intoasciidoctor:mainfrom
diguage:web-pdf
Open

Add Asciidoctor Web PDF#244
diguage wants to merge 3 commits intoasciidoctor:mainfrom
diguage:web-pdf

Conversation

@diguage
Copy link
Copy Markdown

@diguage diguage commented Mar 6, 2022

The PR contains two changes:

  1. Asciidoctor Web PDF is a great tool. So I add Asciidoctor Web PDF.
  2. Demo of some useful tips for using Asciidoc on GitHub -- show the admonitions as icons. So, I add some variables:
ifdef::env-github[]
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
endif::[]

@dduportal
Copy link
Copy Markdown
Contributor

Hi @diguage thanks for the contribution. Is there an issue that could help us (maintainers) to understand a bit better the "why/what/how" of this PR please?

A few feedback at first:

  • You removed the README.md while there is a reason why we added it (DockerHub does not support asciidoctor so the CI process keeps it up to date from the README.adoc). Could you please add it back?
  • Could you add a test case for this addon, that would help a lot?

Copy link
Copy Markdown
Contributor

@dduportal dduportal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some important feedback to allow this PR to land (version tracking is mandatory)

Comment thread Dockerfile
which \
font-noto-cjk
font-noto-cjk \
nodejs
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • What is the version of nodejs used here? Could you fix it and add an updatecli manifest (in ./updatecli/updatecli.d/) to track its version please?
  • Could you share, in the PR description, the additional size resulting with this change (the image is already quite heavy)?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let me try it. I do not know how to do it(the updatecli manifest), give me some time.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem: it is not very well documented on the contributing section so there is no strong expectations.
My message was to let you know that it is needed but I may help.
I suggest that you try by checking the existing manifests.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the code. But it is not the final work. Give me some time.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the code to add a test case and manifest for Node.js. Please check it. If it has some errors, please help me to update it.

I tried to build it many times but it always threw errors. Please help me to check the additional size resulting with this change. Thanks.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT about using a Multi stage build with the official NodeJS image (instead of instaling the nodejs package) in which you install the NPM packages, and you retrieve only the required directories/files (explained in https://medium.com/geekculture/how-to-install-a-specific-node-js-version-in-an-alpine-docker-image-3edc1c2c64be for a "pure" NodeJS installation).

It would allow faster builds (node js / npm run in parallel of the rest), and a fixed controlled version of nodejs.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me try it.

Comment thread Dockerfile Outdated
Comment thread README.adoc
Comment thread README.adoc Outdated
Comment thread README.adoc
@mojavelinux
Copy link
Copy Markdown
Member

This issue is related to #183. Please see my comment there.

Comment thread Dockerfile Outdated
Comment thread updatecli/updatecli.d/nodejs.yml Outdated
Comment thread README.md

- [Asciidoctor Kroki](https://github.com/Mogztter/asciidoctor-kroki) 0.5.0

- [Asciidoctor Web PDF](https://github.com/Mogztter/asciidoctor-web-pdf) 1.0.0-alpha.14 -- This is an unofficial project.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mojavelinux I add the description: This is an unofficial project. . Is it OK?

Comment thread README.adoc
* https://github.com/asciidoctor/asciidoctor-confluence[Asciidoctor Confluence] {ASCIIDOCTOR_CONFLUENCE_VERSION}
* https://github.com/asciidoctor/asciidoctor-bibtex[Asciidoctor Bibtex] {ASCIIDOCTOR_BIBTEX_VERSION}
* https://github.com/Mogztter/asciidoctor-kroki[Asciidoctor Kroki] {ASCIIDOCTOR_KROKI_VERSION}
* https://github.com/Mogztter/asciidoctor-web-pdf[Asciidoctor Web PDF] {ASCIIDOCTOR_WEB_PDF_VERSION} -- This is an unofficial project.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mojavelinux I add the description: This is an unofficial project. . Is it OK?

Copy link
Copy Markdown
Author

@diguage diguage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please help me to check or update the test case and the updatecli manifest. Thanks a lot.

Comment thread updatecli/updatecli.d/nodejs.yml Outdated
Comment thread Dockerfile
ARG asciidoctor_kroki_version=0.5.0
ARG nodejs_version=16.14.0-r0
ARG asciidoctor_web_pdf_version=1.0.0-alpha.14
ARG asciidoctor_kroki_npm_version=0.15.4
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the reason to add this element (since kroki is already installed)?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asciidoctor Kroki has two versions: for Ruby and for Node.js. Asciidoctor Kroki for Ruby was installed. But Asciidoctor Kroki for Node.js is not installed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, thanks for the explanation! In that case we'll have to track the version of this component as well with an updatecli manifest :) (yea it's cumbersome but the goal is ensure that control what is inside this image to avoid supply chain issues)

Co-authored-by: Damien Duportal <damien.duportal@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants