Comments (9)
Pull request provided
from asciidoctor-vscode.
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.
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.
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.
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.
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.
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.
@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.
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)
- Test "Antora support with single documentation component" is flaky HOT 1
- Preview stops working if reference to bibliography entry exists in 3.2.1 HOT 5
- `npm install` reports 9 vulnerabilities on `master` HOT 1
- Quotes have a dark overlay in preview but not in .pdf HOT 4
- `package.json` and `package-lock.json` are not in sync after `prepare branch for development [no ci]` HOT 2
- Add test coverage reporting
- Project README / CHANGELOG is Markdown instead of AsciiDoc
- Asciidoc: Export Document as PDF --> prompts user every time HOT 1
- Preview scroll offset wrong when includes are used HOT 1
- Make error more prominent
- Preview scroll offset wrong when working with tables HOT 1
- Disabling SSL verification HOT 2
- Syntax highlighting broken if a variable is used with bash source
- Preview not rendering checkboxes in checklist
- Ctrl + Alt + V break HOT 1
- [Windows Only][Antora Support] `include::example$something` not working on windows
- Cant use asciidoctor in my own extension as soon as i active asciidoctor-vscode extension HOT 7
- Antora preview doesn't work if version is not specified in antora.yml
- Callout and Syntax Highlighting in code blocks
- Right-click causes incorrect multi-select behavior HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciidoctor-vscode.