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

reveal.js 4.0 support #370

Closed
obilodeau opened this issue May 27, 2020 · 16 comments · Fixed by #431
Closed

reveal.js 4.0 support #370

obilodeau opened this issue May 27, 2020 · 16 comments · Fixed by #431

Comments

@obilodeau
Copy link
Member

4.0.0 was released last week and with it enough breaking changes for us to mandate another breaking one.

However, one thing we will need to do in the meantime is to change all of our links to the reveal.js README to point to their new 3.9 branch. They released a dedicated documentation site and stripped their README of all the stuff. I think master and maybe -1, -2 major releases should point to the right location (given it's only some vim regex wizardry at this point) and adjust all the links for our next major release.

@gautaz
Copy link

gautaz commented Jan 27, 2021

Hello,

Reveal.js 4.1.0 was since released and it notably fixes the autoplay feature which no longer works on both youtube and vimeo.

No hurry, this is just a follow up for this issue :-).

@ggrossetie
Copy link
Member

Hi!

I think you meant to link: https://github.com/hakimel/reveal.js/releases/tag/4.1.0 right?

and it notably fixes the autoplay feature which no longer works on both youtube and vimeo.

I'm not sure if I follow... could you please explain again?
For reference, Asciidoctor reveal.js 4.1.0 is using reveal.js 3.9.2. As far as I know, Asciidoctor reveal.js 4.1.0 is not compatible with reveal.js 4+.

@obilodeau
Copy link
Member Author

Compatibility matrix should make this clearer. Reveal.js 4.x is not supported right now.

image

@ggrossetie
Copy link
Member

Compatibility matrix should make this clearer. Reveal.js 4.x is not supported right now.

It would be a bit odd to add a row in the compatiblity matrix no?

Asciidoctor reveal.js version reveal.js version
No compatible release (yet) >= 4.0
4.x 3.9 - 3.8
3.x, 2.x, 1.x 3.7-3.0
Unversioned releases 2.x

Instead, we could probably add a NOTE to state that reveal.js 4.x is not yet supported?

@gautaz
Copy link

gautaz commented Feb 1, 2021

I think you meant to link: https://github.com/hakimel/reveal.js/releases/tag/4.1.0 right?

and it notably fixes the autoplay feature which no longer works on both youtube and vimeo.

I'm not sure if I follow... could you please explain again?
For reference, Asciidoctor reveal.js 4.1.0 is using reveal.js 3.9.2. As far as I know, Asciidoctor reveal.js 4.1.0 is not compatible with reveal.js 4+.

@Mogztter Oops! You're right, I have mixed up the release notes.
I stumbled upon these while trying to understand why autoplay is not currently working with asciidoctor-revealjs while using revealjs 3.9.2 (I'm using the latest docker container image from the docker hub: asciidoctor/docker-asciidoctor).
Sorry for interfering with this issue...

@edl7878
Copy link
Contributor

edl7878 commented Jun 5, 2021

According to reveal.js 4.x upgrading document:
https://revealjs.com/upgrading/

It is just some asset file paths are changed. Is it possible to issue a new asciidoctor-reveal.js for the 4.0.x of reveal.js?

And for the new features such as layout of new reveal.js, there are ways for users to hake in their adoc file, such as passthrough HTML tags such as style tag.

@ggrossetie
Copy link
Member

I haven't had the time to look at it closely but, since this issue is labeled as "help wanted", feel free to submit a pull request, I will gladly review it.

I can also assist if you need help to get started 🤗

@edl7878
Copy link
Contributor

edl7878 commented Jun 6, 2021

On windows10, following the doc:
https://docs.asciidoctor.org/reveal.js-converter/latest/project/hacking/

when run: bundle exec rake build

an error occurred: The git source https://github.com/opal/opal.git is not yet checked out. Please run bundle install before trying to start your application

PS C:\asciidoctor-reveal.js> bundle install
Fetching https://github.com/opal/opal.git
error: could not lock config file .git/modules/spec/mspec/config: No such file or directory
warning: Could not unset core.worktree setting in submodule 'spec/mspec'
error: could not lock config file .git/modules/spec/ruby/config: No such file or directory 
warning: Could not unset core.worktree setting in submodule 'spec/ruby'
error: could not lock config file .git/modules/test/cruby/config: No such file or directory
warning: Could not unset core.worktree setting in submodule 'test/cruby'
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies...
Fetching rake 13.0.3
Installing rake 13.0.3
Fetching asciidoctor 2.0.15
Installing asciidoctor 2.0.15
Fetching corefines 1.11.0
Installing corefines 1.11.0
Installing diffy 3.4.0
Fetching htmlbeautifier 1.3.1
Installing htmlbeautifier 1.3.1
Fetching minitest 5.14.4
Installing minitest 5.14.4
Fetching mini_portile2 2.4.0
Installing mini_portile2 2.4.0
Fetching nokogiri 1.10.10 (x64-mingw32)
Installing nokogiri 1.10.10 (x64-mingw32)
Fetching asciidoctor-doctest 2.0.0.beta.7
Installing asciidoctor-doctest 2.0.0.beta.7
Using asciidoctor-revealjs 4.2.0.pre.dev from source at `.`
Fetching docopt 0.6.1
Installing docopt 0.6.1
Fetching ruby-beautify2 0.98.0
Installing ruby-beautify2 0.98.0
Errno::EACCES: Permission denied @ rb_file_s_symlink - (bin/ruby-beautify,
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ruby-beautify2-0.98.0/bin/rbeautify)
An error occurred while installing ruby-beautify2 (0.98.0), and Bundler cannot
continue.
Make sure that `gem install ruby-beautify2 -v '0.98.0' --source
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  asciidoctor-templates-compiler was resolved to 0.6.0, which depends on
    ruby-beautify2
PS C:\asciidoctor-reveal.js> bundle exec rake build
The git source https://github.com/opal/opal.git is not yet checked out. Please run `bundle install` before trying to start your application
PS C:\asciidoctor-reveal.js>

@ggrossetie
Copy link
Member

Thanks for raising this issue.
I'm not sure why but some important steps are missing from the hacking/contributing guide. Maybe we forgot to add them because they are described somewhere else or maybe just an overlook.

Anyway, I think we need to add prerequisites in the contributing guide:

  • Recommend to install/use rvm (optional)
  • Install Ruby version x.y.z
  • Install git
  • Recommend to install/use nvm (optional)
  • Install Node version x.y.z
  • Install Ruby dependencies: bundle install
  • Install JavaScript dependencies: npm i

We are testing against Windows using GitHub Actions and it seems to work.

I think the root cause is:

Errno::EACCES: Permission denied @ rb_file_s_symlink - (bin/ruby-beautify,
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ruby-beautify2-0.98.0/bin/rbeautify)

I would recommend to use rvm to install gem dependencies in the user space.
If it does not work we should probably report this issue at: https://github.com/jirutka/ruby-beautify2

@ggrossetie
Copy link
Member

Alternatively, I think you can use bundle --path=.bundle/gems --binstubs=.bundle/.bin. It should install dependencies locally (inside the project directory).

@ggrossetie
Copy link
Member

@edl7878
Copy link
Contributor

edl7878 commented Jun 6, 2021

I have made a pull request:
#427

basd on my test, new layout of reveal.js is workable, such as r-fit-text.

image

Since old code base default revealjsdir is node_modules/reveal.js, I havn't modified this default value, which means users would have to define :revealjsdir: in their adocs explicitly for now.

@ggrossetie
Copy link
Member

Thanks, I will review it this week.

Since old code base default revealjsdir is node_modules/reveal.js, I havn't modified this default value, which means users would have to define :revealjsdir: in their adocs explicitly for now.

The default value is node_modules/reveal.js when using Asciidoctor.js (JavaScript). As far as I understand, this is default value is still valid with reveal.js 4.x no?
When using Asciidoctor (Ruby) the default value is reveal.js.

@edl7878
Copy link
Contributor

edl7878 commented Jun 7, 2021

As user git clone reveal.js 4.x the folder structure likes below:
image
reveal.js is under dist folder, it is documented by reveal.js in:
https://revealjs.com/upgrading/

I don't know why the default :revealjsdir: value is varied between asciidoctor.js and Asciidoctor(Ruby).

I think when converting adoc to html, if reveal.js is not needed, for asciidoctor.js, the default value of :revealjsdir: can be reveal.js too. So that for both Asciidoctor and Asciidoctor.js the default values are the same.

By the way, I use bundle exec asciidoctor-revealjs test.adoc to convert the adoc file.

@ggrossetie
Copy link
Member

I don't know why the default :revealjsdir: value is varied between asciidoctor.js and Asciidoctor(Ruby).

Because reveal.js is declared as a npm dependency in the package.json:

"reveal.js": "3.9.2"

So when you do npm i @asciidoctor/reveal.js it will also install reveal.js in the node_modules folder. So using node_modules/reveal.js as a default value when using Asciidoctor.js makes a lot of sense.

@edl7878
Copy link
Contributor

edl7878 commented Jun 8, 2021

OK, got it, thanks.

ggrossetie pushed a commit to ggrossetie/asciidoctor-reveal.js that referenced this issue Jun 26, 2021
- Upgrade to Highlight.js 10
- Upgrade to reveal.js 4.1.1
ggrossetie pushed a commit to ggrossetie/asciidoctor-reveal.js that referenced this issue Jun 26, 2021
- Upgrade to Highlight.js 10
- Upgrade to reveal.js 4.1.1
ggrossetie added a commit that referenced this issue Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants