-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Support asciidoc (asciidoctor) #342
Comments
Did you try the following? - run: sudo gem install asciidoctor Also we can use the |
Ah, now I understand the difference between a Docker-based action and one like yours a little bit better, I think. Thank you! That seems to work -- basically. asciidoctor in the 18.04 repos is ancient, so gem it is, with a twist: - name: Setup asciidoctor
run: |
sudo gem update --system 3.0.6 # cf. https://github.com/rubygems/rubygems/issues/3068#issuecomment-574775885
ruby --version
gem --version
sudo gem install asciidoctor This runs for a full minute... T_T Unfortunately, my workaround for Hugo's ... clumsy handling of external tools doesn't seem to work on Github Actions. 🤔 Tinker tinker... Update: Ah, I was being an idiot, I think. As my own README reminds me 🤦♂️ you have to add the working directory to |
Heh, got it. For the benefit of googlers: - name: Setup asciidoctor
run: |
sudo gem update --system 3.0.6
sudo gem install asciidoctor
sudo .github/scripts/reroute_asciidoctor.sh
ruby --version; gem --version; asciidoctor --version With this as #!/bin/bash
set -eu
binary="$(which asciidoctor)"
binary_orig="${binary}"_orig
if [[ -L "${binary}" ]]; then
echo "Can not handle links yet"
exit 1
fi
mv "${binary}" "${binary_orig}"
cat > "${binary}" <<BASH
#!/bin/bash
"${binary_orig}" \
--attribute=experimental=true \
--attribute=icons=font \
"\$@"
BASH
chmod +x "${binary}"
echo "Updated '${binary}' to call '${binary_orig}' with extra parameters." I guess it's easy to pull out the extra parameters so they appear in the workflow YAML instead, but not tonight. :'D |
I reopened this for updating the README. @reitzig Could you review this pull-request? reitzig/today-i-learned#1 |
Very cool, thanks for your efforts! Which change of the README do you have an in mind? Do you need me to do something? I feel like doing this -- adding asciidoctor to a hugo setup, specifically, with workarounds -- could be a dedicated action. I'd be happy to collaborate! |
We are going to add a new section under Tips - README.md like the section for autoprefixer and postcss-cli. If you will work on this, I'll gladly merge it. - name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- run: gem install asciidoctor
- run: |
alias asciidoctor="asciidoctor --attribute=experimental=true --attribute=icons=font"
hugo --minify |
Just to point out the alternative here: https://github.com/reitzig/actions-asciidoctor |
Is your feature request related to a problem? Please describe.
I use AsciiDoc in my site. I would like to use this GitHub action, but it doesn't seem to contain asciidoctor.
Describe the solution you'd like
Similar to extended mode, an option to add asciidoctor to this action (assuming it's too heavy a dependency to always include).
Describe alternatives you've considered
Using another action: the ones I checked seem less refined and maintained than this one.
Additional context
Additional facilities to add command-line parameters for asciidoctor would be gread, cf
gohugoio/hugo#6561
The text was updated successfully, but these errors were encountered: