GithubHelp home page GithubHelp logo

Comments (9)

lask79 avatar lask79 commented on September 21, 2024 1

Pull request provided

from asciidoctor-vscode.

ggrossetie avatar ggrossetie commented on September 21, 2024

Part of me thinks that it's a bad idea to generate a different HTML output when Antora support is enabled. @mojavelinux what do you think?

from asciidoctor-vscode.

lask79 avatar lask79 commented on September 21, 2024

I took a look at the code and the only a little thing that needs to change is this:

Change
<div id="content"> => <div id="content" class="doc">

Nothing more. And then voila. When you copy your ui-bundle to e.g. .asciidoctor/preview and then set the preview .style to ./.asciidoctor/preview/css/site.css 95% of the css is working and it looks like your antora site.

from asciidoctor-vscode.

lask79 avatar lask79 commented on September 21, 2024

What I am missing somehow is a way to take a look at the generated html so that the css could be debugged. I made that change in a fork of this extension and tested it successfully. As mentioned 95% were working fine. But there are a few little things that I would like to take a deeper look at.

from asciidoctor-vscode.

lask79 avatar lask79 commented on September 21, 2024

If that is working then you could get even further to provide a configuration to point to a url where the UI bundle for antora could be found (zip) and extract it to .asciidoctor/preview. The user can then decide if he would like to commit it to git or put it to git ignore.
And it could be cached so that this extension does this only once or when the extraction folder was deleted.

from asciidoctor-vscode.

mojavelinux avatar mojavelinux commented on September 21, 2024

Part of me thinks that it's a bad idea to generate a different HTML output when Antora support is enabled. @mojavelinux what do you think?

I'm amenable to the idea being suggested here. I wrote the stylesheet for Antora with the idea that eventually the HTML converter is going to label the article container with a class attribute. I think it's better than depending on an ID. And the HTML isn't sacred since an extended or replacement converter can customize it. All we want to ensure is that the default stylesheet continues to work.

I should also mention that the IntelliJ plugin already does what is being proposed here. See https://github.com/asciidoctor/asciidoctor-intellij-plugin/blob/27bd9d223e2561fdc29add10d57965523f0e2ea1/src/main/java/org/asciidoc/intellij/AsciiDocWrapper.java#L822

from asciidoctor-vscode.

mojavelinux avatar mojavelinux commented on September 21, 2024

I will once again emphasize that this plugin should be observing what is being done in the IntelliJ plugin. This conversation has already taken place in the IntelliJ plugin and a solution implemented. Let's not reinvent the wheel for every feature and try to collaborate more with that project in cases problems have already been solved there.

from asciidoctor-vscode.

lask79 avatar lask79 commented on September 21, 2024

@ggrossetie I can create a pull request if you like. I only struggle with the auto formatting on that project which adds semicolons and other things on the asciidoctorWebViewConverter.ts. If you can point me to the settings that should be set to avoid that or to format correctly, please tell me.

I am also willing to work on some other antora related stuff if you need some help here. I am not a typescript expert yet but I am a quick learner 🙂

from asciidoctor-vscode.

ggrossetie avatar ggrossetie commented on September 21, 2024

I think it's better than depending on an ID

👍🏻

I should also mention that the IntelliJ plugin already does what is being proposed here
Let's not reinvent the wheel for every feature and try to collaborate more with that project in cases problems have already been solved there

Oh, I didn't know that!
That's one of the thing we should add in the "AsciiDoc editor specification" 😉

from asciidoctor-vscode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.